Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Start a Claude thread with the permission mode set to Auto (Claude Code auto mode).
- Get the auto-mode classifier to deny a tool call. The most reliable trigger I hit: the conversation contains detailed security findings (e.g. the agent read a TODO list describing open vulnerabilities, or is fixing an auth bypass). From then on the classifier refuses to assess further Bash calls ("cannot assess the action due to earlier conversation content"). A plain deny rule or any other classifier block behaves the same way.
- The agent receives the denial as a failed tool call, can't proceed, and ends its turn.
Expected behavior
The thread signals that it needs me: a "needs attention" status (like a pending approval) instead of "Completed", a row such as "2 actions denied by auto mode" with the classifier's reason, and ideally a one-click "switch to Default / Full access and retry".
Actual behavior
The thread shows Completed and auto-settles. Nothing in the sidebar or the timeline distinguishes "finished the task" from "gave up because auto mode blocked it", so I only notice hours later when I open the thread. In Default mode the same action raises a permission prompt and the thread shows as waiting.
From the source (commit cafe620e):
- In auto mode no permission callback is installed (
ClaudeAdapterV2.ts:1723-1727), and the classifier denies inside the CLI beforecanUseTool, so no runtime request is ever created. - The SDK already reports these denials: every
resultmessage carriespermission_denials({tool_name, tool_use_id, tool_input}, visible in the replay fixtures), but no production code reads it; it only appears in tests and fixtures. terminalStatusFromResult(ClaudeAdapterV2.ts:2536-2569) looks only at abort reasons, API errors andis_error, so a successful result with denials becomescompleted;ThreadSettlementService.ts:139-164only holds back for pending requests, active runs or background work.- The Grok adapter already turns an auto-mode block into a pending request (
testkit/fixtures/grok_auto_blocked_command), so there is precedent.
Possible fix: in the result branch, read permission_denials, drop the tool-use ids T3 itself denied (ExitPlanMode capture, user declines, cancelled questions), and for the rest emit a system notice row and mark the run as needing attention so it isn't auto-settled. Caveat: the entries carry no reason or source, so the reason has to come from the matching tool_result error text.
Impact
Major degradation or frequent failure
Version or commit
0.0.46-nightly.20261011.2967 (source references: cafe620e)
Environment
macOS 26 (Mac mini, T3 server running 24/7), Claude Code 2.1.296, Agent SDK 0.3.276, Claude Max subscription
Workaround
Switch the thread to Full access (or Default) by hand and send "continue". For threads that will touch security-sensitive content, start them in Full access.
Activity
juliusmarminge commentedon Oct 11, 2026
Note
Grok responding on behalf of Julius.
This is a real bug, and I confirmed it in the code on main. In Auto mode, the CLI's classifier blocks tool calls before
canUseToolruns, so T3 never creates a pending request. The SDK does list those denials inresult.permission_denials, but no production code inClaudeAdapterV2.tsreads that field.terminalStatusFromResultonly checks for aborts, API errors andis_error, so a turn that hit denials still ends ascompletedand gets auto-settled. The Grok adapter already turns an auto-mode block into a pending request (see thegrok_auto_blocked_commandfixture), so the Claude adapter is behind on this.This isn't a CLI limitation. The denial entries don't include a reason, but the matching
tool_resulterror text does. Open PR #15360 (for #15353) changes Auto mode's ask-rule handling, but it doesn't touchpermission_denialsor the terminal status mapping, so it won't fix this.Scope for a fix:
resultbranch, readpermission_denialsand drop the tool-use ids that T3 denied itself (ExitPlanMode capture, user declines, cancelled questions).tool_result, and mark the thread as needing attention so it isn't auto-settled.A one-click "switch mode and retry" button is a separate feature, so please suggest it in Ideas. Until this is fixed, switch the thread to Default or Full access and send "continue". Related: #15503.
fix(harness): end a Claude turn blocked by silent denials as needing …
juliusmarminge commentedon Oct 22, 2026
Fresh triage: this is a reported completion-status bug, not a reported exploitable vulnerability. Scanned all 948 open issues for auto-mode, denial and completion symptoms plus the quoted classifier error; no matching duplicate found. Source inspected at c274a25: Claude result status does not inspect permission_denials. This is source inspection, not runtime reproduction. Changing how permission denials produce attention or settlement state crosses the automated triage approval/mode boundary, so this needs maintainer handling. Leaving the issue open; no code changes or PR.
juliusmarminge commentedon Oct 22, 2026
Fresh reproduction on 8acbefefc5: Linux web dev app, Claude CLI 2.1.303, Claude Opus 5.5, Auto mode. A scratch project deny rule for
Bash(printf T3_DENIAL_PROBE*)blocked the command; Claude stopped, the native result containedpermission_denials, and the persisted run status wascompletedwith no attention request. Two Auto attempts produced the same result. No matching duplicate among 927 open issues; the existing approval-escalation PR addresses a different symptom. Runtime transcript, recording. The earlier permissions-boundary stop no longer applies under the revised triage brief.