qwen-code/docs
LaZzyMan 11c48a9c7c feat(cli,core): add Auto approval mode with LLM classifier (#auto-mode)
Add a fifth approval mode positioned between Auto-Edit and YOLO that uses
an LLM classifier to evaluate each tool call and auto-approve safe ones
while blocking risky ones — letting agents work autonomously on long
sessions without forcing users to confirm every shell/network call.

Three-layer filter when L4 returns 'ask'/'default':
  L5.1 acceptEdits fast-path: Edit/Write inside workspace -> allow
  L5.2 safe-tool allowlist:   Read/Grep/LS/TodoWrite/... -> allow
  L5.3 LLM classifier:        two-stage (fast/thinking) via sideQuery

Anti-injection: assistant text and tool results are stripped from the
classifier transcript; each tool projects its args through a new
`toAutoClassifierInput` method to redact sensitive/voluminous fields.

Pending action is rendered as a user-role text turn so it survives the
OpenAI Chat Completions converter (which drops orphan tool_calls).

Safety: fail-closed on classifier failure; denial-tracking caps
3 consecutive blocks / 2 consecutive unavailable before falling back
to manual confirmation; dangerous allow rules (Bash interpreter
wildcards, any Agent/Skill allow) are temporarily stripped while in
AUTO and restored on exit — settings.json is never modified.

Config:
  --approval-mode auto                                 # CLI flag
  tools.approvalMode: "auto"                           # settings.json
  permissions.autoMode.hints.{allow,deny}: string[]    # natural-lang
  permissions.autoMode.environment: string[]
2026-05-18 10:10:23 +08:00
..
design docs: user + design docs for --json-schema structured output (#4051) 2026-05-17 23:10:34 +08:00
developers feat(serve): preflight and env diagnostics routes (#4175 Wave 3 PR 13) (#4251) 2026-05-18 07:29:05 +08:00
e2e-tests feat(tools): add generic worktree support — EnterWorktree/ExitWorktree + Agent isolation (#4073) 2026-05-14 18:00:30 +08:00
plans feat(cli): add structured memory diagnostics JSON (#3785) 2026-05-17 19:52:46 +08:00
users feat(cli,core): add Auto approval mode with LLM classifier (#auto-mode) 2026-05-18 10:10:23 +08:00
_meta.ts feat: refactor docs 2025-12-05 10:51:57 +08:00
index.md fix: lint issues 2025-12-19 15:52:11 +08:00