Skip to main content
A coding agent with exec security configured as an allowlist. Commands matching the allowlist patterns run immediately; everything else suspends for user approval. Users can reject commands and provide feedback so the agent adjusts its approach.

Configure exec security

Define the agent

Handle approval events

When the agent tries to run a command that isn’t in the allowlist, the workflow suspends. The client catches the suspend event, shows the command, and collects the user’s decision.

How it works

  1. The exec tool checks each command against the allowlist patterns
  2. Matching commands (e.g., node hello.js) run immediately
  3. Non-matching commands (e.g., npm install chalk) suspend the workflow
  4. The client receives a suspend event with the command details
  5. If rejected with feedback, the agent reads the feedback and tries a different approach
  6. The ask_user tool lets the agent proactively ask for clarification

Run it

The demo task asks the agent to install an npm package (which requires approval) and run node scripts (which are allowlisted). You’ll see the difference between auto-approved and manually-approved commands in action. Open http://localhost:5173 to view your agents and workflows, run them from the UI, and see execution traces. Python example on GitHub | TypeScript example on GitHub