Permission policies control whether the Agent needs human approval before performing a tool action. This is the foundation of human-in-the-loop control — it lets you balance Agent autonomy with human oversight.Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
Three Policies
When the Agent attempts to invoke a tool, the runtime checks the tool’spermission value:
| Policy | Behavior | Best for |
|---|---|---|
allow | The Agent runs the action without confirmation | Low-risk operations (reading files, viewing status) |
ask | The Agent pauses and waits for human approval | High-risk operations (deleting files, network requests) |
deny | The Agent cannot perform the action | Forbidden operations (production deployments, sensitive data) |
Configuration
Set thepermission field on each tool object inside the tools array:
Pending Action Mechanism
When the Agent triggers a tool withask:
- The Agent emits a Pending Action event.
- The Session moves to idle (awaiting human input).
- The client receives a pending-action notification over SSE.
- Approval is given via the Turn Resolve API.
- The Agent continues execution.
Turn Resolve API
End-to-End Example
1. Create an Agent with the ask Policy
2. Send a Task that Triggers a Tool Call
3. Listen on SSE and Receive a Pending Action
4. Approve the Action
5. Or Deny It
When you deny, include a
reason. The Agent uses the reason to adjust its plan and try again.Policy Recommendations
| Scenario | Suggested configuration |
|---|---|
| Internal development | All allow for maximum efficiency |
| Production operations | bash ask, text_editor allow |
| Demos or evaluation | All ask for full control |
| Read-only analysis | bash deny, text_editor deny |
FAQ
Q: What’s the default if I don’t setpermission? A: The default is allow — the Agent executes directly.
Q: Do pending actions time out? A: Yes — they follow the Session’s idle timeout. After it elapses, the Session may be reclaimed.
Q: Can a single turn have multiple pending actions? A: Currently each turn has at most one pending action. The Agent requests confirmation step by step.
Q: Can ask be applied dynamically based on command content? A: Today the policy applies per tool type. Finer-grained rules (such as command-pattern matching) are planned.