Repository navigation
fix(server): Claude Plan no longer asks again for a tool approved for the session - #36340
juliusmarminge wants to merge 2 commits into
Conversation
…#23918) Failing repro: after Always allow this session on mcp__t3-code__t3_thread_read in a Full access Plan turn, the next call raises another approval request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the session In Plan the Claude CLI records the session rule T3 Code sends back for "Always allow this session", but its Plan check still asks for every tool without a read-only annotation, so each t3_thread_read call raised a new approval card. The adapter now remembers a whole-tool session grant and answers the mode's own ask from it. An ask from a hook, an ask rule or a safety check carries a different reason and still reaches the user. Fixes #23918 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Claude now remembers explicit whole-tool session approvals instead of repeatedly prompting for mode-based requests. The change preserves separate ask-rule and safety-check handling and does not change default permissions. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Interim status while watching the pull request; no code changed in this pass. The brief listed no items to change. Pull request 36340 is open at 06ecc14, mergeable, with no reviews, no line comments and no issue comments at the time of reading. Its checks (Test Server 1-8, Lint, Build and Typecheck, Test, and the Macroscope checks) were queued or in progress, none failed. watch_pull_request is on for the pull request; the final result follows once checks pass and no high-rated bot finding is open.
Fixes #23918
Reproduction on main
Commit 9efd960 (origin/main). Ran
T3CODE_DEV_SEED=0 vp run devin a fresh worktree and drove the web UI with headless Playwright, since the preview browser was blocked on this host. Created a project and a Replay (dev) thread with 5 turns as the thread to read. Plan is no longer a composer toggle after #33131, so in a Full access Claude Haiku 5.5 thread I asked Claude to call create_threads with interactionMode "plan", runtimeMode "full-access", and a prompt to make 4 sequential t3_thread_read calls (view activity, afterPosition -1, then nextPosition, limit 2). The child opened with permissionMode plan. In the child thread I answered each Command approval card with More -> "Always allow this session". Observed: 4 approval cards for mcp__t3-code__t3_thread_read (afterPosition -1, 1, 3, 5). The dev database's runtime-request projection has 4 command requests on one provider turn, all resolved acceptForSession, 3 of them created after the first was resolved. Also added a failing adapter test (branch factory/repro-23918): in a Full access Plan turn, the second canUseTool call for mcp__t3-code__t3_thread_read after acceptForSession raises a new approval request.Evidence
Run the web app with a fresh synthetic five-turn history. In Claude Haiku 5.5, Full access + Plan, request four sequential t3_thread_read calls using activity, limit 2, and positions -1, 1, 3, 5. Choose More → Always allow this session whenever asked. Environment: Chromium, light theme, 1440×1000.
The base recording is split before the fourth approval following an automation click failure. Both runs completed all four reads in one provider turn. Seed and launch script, browser driver, sanitized runtime summary.
Not shown:
Tests
None in this pass. Read the pull request, its reviews, comments and the head commit's check runs over the REST API: no failures, checks still running.
Not in this change
incheck, and the older comment in claudeApprovalPresentation saying the SDK drops decision_reason_type is now out of date.Who did the work
Run by the t3code factory in T3 Code.