GeezerVison is showing github.com — fix(server): Claude agent-file hooks run at Full access in folders opened only through T3 by juliusmarminge · Pull Request #43811 · pingdotgg/t3code
Conversation
Claude Code only runs the hooks and MCP servers in a project agent file (.claude/agents/*.md) once the folder is trusted. T3 starts Claude Code without its trust dialog, so in folders opened only through T3 those hooks were skipped and the thread said nothing about it, even at Full access. Claude sessions at Full access now attest workspace trust for their folder through the SDK's workspaceTrust option, so the agent's hooks run. As with accepting Claude Code's own trust dialog, Claude Code records the folder as trusted.
Fixes #43790
Reproduction on main
Commit f4b2523 (origin/main, 2026-11-26). Made a fresh git folder under /tmp with no projects[] entry in ~/.claude.json, containing secret.txt and .claude/agents/checker.md with frontmatter tools: Read and hooks: PreToolUse: [{matcher: Read, hooks: [{type: command, command: <script that appends its stdin to a log and exits 2 when the input mentions secret.txt>}]}]. Started T3CODE_DEV_SEED=0 vp run dev (fresh database), paired in the preview browser, added the folder through Add project > Local folder, picked Claude Sonnet 5.5 at Full access and sent: 'Use the Agent tool with subagent_type "checker" to read secret.txt in this folder. Do not read it yourself. Report exactly what the checker returned.' Result: the thread answered with the file contents ('TOP SECRET: the canary word is PELICAN-7731'), the hook log file was never created (the hook never ran), and the thread said nothing about skipped hooks. Control on the same folder, calling the bundled @anthropic-ai/claude-agent-sdk 0.3.321 query() directly with the same prompt, bypassPermissions and settingSources [user, project, local]: without workspaceTrust the secret was read and the hook did not run; with workspaceTrust {accepted: true, directory: } the hook ran and the agent answered 'READ REFUSED ... checker hook: secret.txt is fenced off'.
Evidence
Added a fresh, previously untrusted git folder through Add project > Local folder. Its checker agent had a PreToolUse Read hook refusing secret.txt. With Claude Sonnet 5.5 at Full access, asked the parent to delegate the read to checker. Base exposed PELICAN-7731 without creating the hook log; head ran the hook and reported READ REFUSED.
Environment on both sides: Linux web dev app, fresh database with T3CODE_DEV_SEED=0, preview Chromium, light theme, 1280×800 viewport. Sidebar cropped for privacy; workspace paths redacted.
Reproduction seed script
Not shown:
- Agent-file MCP server loading was not exercised; this reproduction verifies agent-file command hooks.
- Permission modes other than Full access were not exercised.
Tests
vp test run src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts (apps/server): 513 passed, including the new attests workspace trust only in %s cases
vp run typecheck (apps/server): exit 0
vp run check:changed: knip, graphql, typecheck (3 packages) and test (2 files) passed
- Direct SDK repro (scratch, not committed): without
workspaceTrust the hook did not run and the secret was read; with it the hook ran and refused the read
- PR CI on e380167: all 38 checks passed
Not in this change
- Below Full access (Supervised, Auto-accept edits, Auto, Plan), agent-file hooks and MCP servers are still skipped in untrusted folders and the thread says nothing; the per-project trust flow in feat(claude): a project's Claude Code settings are trusted once per project #43157 is meant to cover that.
- The SDK's Options type does not declare
workspaceTrust even though sdk.mjs and the CLI read it; that is an upstream typing gap.
Who did the work
- Written by Claude Opus 5.5, in Claude Code
- Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
- Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5
Run by the t3code factory in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ened only through T3
Claude Code skips the hooks and MCP servers in a project agent file until the
folder is trusted, and the SDK never shows its trust dialog, so a folder only
ever opened through T3 silently ran agents without their hooks. A session at
Full access already runs anything in the folder, so it now attests trust with
the SDK's workspaceTrust option.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Thread transfer impact
✅ Thread transfer remains within every enforced ceiling.
| Provider |
Metric |
Main baseline |
This PR |
Impact |
PR ceiling |
|
| Codex |
Total thread wire |
5.0 KiB |
5.0 KiB |
0 B (0.0%) |
6.8 KiB |
✅ |
| Codex |
Thread snapshot wire |
3.8 KiB |
3.8 KiB |
0 B (0.0%) |
4.9 KiB |
✅ |
| Codex |
Live turn WebSocket wire |
1.2 KiB |
1.2 KiB |
0 B (0.0%) |
2.0 KiB |
✅ |
| Codex |
Live turn WebSocket decoded |
21.5 KiB |
21.5 KiB |
0 B (0.0%) |
24.4 KiB |
✅ |
| Codex |
Live turn messages |
1 |
1 |
0 (0.0%) |
8 |
✅ |
| Claude |
Total thread wire |
5.0 KiB |
5.0 KiB |
0 B (0.0%) |
6.8 KiB |
✅ |
| Claude |
Thread snapshot wire |
3.8 KiB |
3.8 KiB |
0 B (0.0%) |
4.9 KiB |
✅ |
| Claude |
Live turn WebSocket wire |
1.2 KiB |
1.2 KiB |
0 B (0.0%) |
2.0 KiB |
✅ |
| Claude |
Live turn WebSocket decoded |
21.9 KiB |
21.9 KiB |
0 B (0.0%) |
24.4 KiB |
✅ |
| Claude |
Live turn messages |
1 |
1 |
0 (0.0%) |
8 |
✅ |
Other scenarios
All 64 scenario measurements match main.
All 64 scenario measurements
| Provider |
Scenario |
Metric |
Main baseline |
This PR |
Impact |
PR ceiling |
|
| Codex |
short turn resume |
WebSocket decoded |
10.5 KiB |
10.5 KiB |
0 B (0.0%) |
12.7 KiB |
✅ |
| Codex |
short turn resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Codex |
long turn running, cold open |
HTTP decoded |
281.7 KiB |
281.7 KiB |
0 B (0.0%) |
302.7 KiB |
✅ |
| Codex |
long turn running, cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Codex |
long turn running, history page |
HTTP decoded |
92.4 KiB |
92.4 KiB |
0 B (0.0%) |
107.4 KiB |
✅ |
| Codex |
long turn running, history page |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Codex |
long turn finished, cold open |
HTTP decoded |
381.5 KiB |
381.5 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Codex |
long turn finished, cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Codex |
long turn finished, socket cold open |
WebSocket decoded |
381.6 KiB |
381.6 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Codex |
long turn finished, socket cold open |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Codex |
long turn finished, socket cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Codex |
long turn finished, work page |
HTTP decoded |
186.2 KiB |
186.2 KiB |
0 B (0.0%) |
200.2 KiB |
✅ |
| Codex |
long turn finished, work page |
rows |
150 |
150 |
0 (0.0%) |
150 |
✅ |
| Codex |
idle thread resume |
WebSocket decoded |
65 B |
65 B |
0 B (0.0%) |
200 B |
✅ |
| Codex |
idle thread resume |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Codex |
fleet shell snapshot |
HTTP decoded |
42.4 KiB |
42.4 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Codex |
fleet shell snapshot |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Codex |
fleet shell subscribe |
WebSocket decoded |
65 B |
65 B |
0 B (0.0%) |
200 B |
✅ |
| Codex |
fleet shell subscribe |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Codex |
fleet shell resume check |
HTTP decoded |
18 B |
18 B |
0 B (0.0%) |
100 B |
✅ |
| Codex |
fleet shell resume check |
rows |
0 |
0 |
0 |
0 |
✅ |
| Codex |
stale shell reload |
HTTP decoded |
42.4 KiB |
42.4 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Codex |
stale shell reload |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Codex |
stale shell resume |
WebSocket decoded |
140 B |
140 B |
0 B (0.0%) |
400 B |
✅ |
| Codex |
stale shell resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Codex |
stale todo list cold open |
HTTP decoded |
72.4 KiB |
72.4 KiB |
0 B (0.0%) |
83.0 KiB |
✅ |
| Codex |
stale todo list cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Codex |
stale todo list cold open |
nodes |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Codex |
stale todo list cold open |
subagents |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Codex |
stale todo list cold open |
plans |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Codex |
stale todo list cold open |
providerTurns |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Codex |
stale todo list cold open |
checkpoints |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Claude |
short turn resume |
WebSocket decoded |
10.6 KiB |
10.6 KiB |
0 B (0.0%) |
12.7 KiB |
✅ |
| Claude |
short turn resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Claude |
long turn running, cold open |
HTTP decoded |
283.3 KiB |
283.3 KiB |
0 B (0.0%) |
302.7 KiB |
✅ |
| Claude |
long turn running, cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Claude |
long turn running, history page |
HTTP decoded |
93.4 KiB |
93.4 KiB |
0 B (0.0%) |
107.4 KiB |
✅ |
| Claude |
long turn running, history page |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Claude |
long turn finished, cold open |
HTTP decoded |
384.2 KiB |
384.2 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Claude |
long turn finished, cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Claude |
long turn finished, socket cold open |
WebSocket decoded |
384.3 KiB |
384.3 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Claude |
long turn finished, socket cold open |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Claude |
long turn finished, socket cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Claude |
long turn finished, work page |
HTTP decoded |
188.1 KiB |
188.1 KiB |
0 B (0.0%) |
200.2 KiB |
✅ |
| Claude |
long turn finished, work page |
rows |
150 |
150 |
0 (0.0%) |
150 |
✅ |
| Claude |
idle thread resume |
WebSocket decoded |
66 B |
66 B |
0 B (0.0%) |
200 B |
✅ |
| Claude |
idle thread resume |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Claude |
fleet shell snapshot |
HTTP decoded |
43.0 KiB |
43.0 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Claude |
fleet shell snapshot |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Claude |
fleet shell subscribe |
WebSocket decoded |
66 B |
66 B |
0 B (0.0%) |
200 B |
✅ |
| Claude |
fleet shell subscribe |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Claude |
fleet shell resume check |
HTTP decoded |
18 B |
18 B |
0 B (0.0%) |
100 B |
✅ |
| Claude |
fleet shell resume check |
rows |
0 |
0 |
0 |
0 |
✅ |
| Claude |
stale shell reload |
HTTP decoded |
43.0 KiB |
43.0 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Claude |
stale shell reload |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Claude |
stale shell resume |
WebSocket decoded |
140 B |
140 B |
0 B (0.0%) |
400 B |
✅ |
| Claude |
stale shell resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Claude |
stale todo list cold open |
HTTP decoded |
73.4 KiB |
73.4 KiB |
0 B (0.0%) |
83.0 KiB |
✅ |
| Claude |
stale todo list cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Claude |
stale todo list cold open |
nodes |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Claude |
stale todo list cold open |
subagents |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Claude |
stale todo list cold open |
plans |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Claude |
stale todo list cold open |
providerTurns |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Claude |
stale todo list cold open |
checkpoints |
1 |
1 |
0 (0.0%) |
2 |
✅ |
Baseline: 43530f9 · PR result: e380167 · Source CI: success
Scenario and decoded snapshot size
10 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.
- Codex decoded thread snapshot: 108.5 KiB
- Claude decoded thread snapshot: 108.8 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 26, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
The Claude adapter now adds workspace trust to query options when the permission mode is bypassPermissions and the working directory is non-null. Tests cover this case and verify that auto and default do not add workspace trust.
Changes: Claude workspace trust
| Layer / File(s) |
Summary |
Trust query options apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts, apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts |
The query options type adds optional workspace trust. The adapter sets it for a non-null working directory in bypassPermissions mode. Tests check that auto and default do not set workspace trust. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: diegoagdiaz, josephv123, yash-singh1
Merge Risk: Minimal · up to e3801
-
At Full access, Claude sessions now attest workspace trust, so agent-file hooks and MCP servers load in folders opened only through T3. Lower permission modes are unchanged. No merge-blocking risk was found.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: Claude agent-file hooks running at Full access in folders opened only through T3. The changeset adds workspace trust attestation for bypassPermissions (Full access) se… |
| Linked Issues check |
 |
[#43790] The issue asks that agent-file hooks and MCP servers not be silently skipped in folders opened only through T3. It offers two fixes: pass project trust to Claude Code through workspaceTrust… |
| Out of Scope Changes check |
 |
The source change is limited to one code path (makeClaudeQueryOptions) and one type addition. The new workspaceTrust field is required for the #43790 fix. The inline comment that notes the SDK typ… |
| Description check |
 |
The description follows the repository template closely. It has all four required sections (Problem, Change, Scope, Verification) plus the agent attribution line. The Problem section states the bug an… |
Full details: Title check
-
Explanation
The title names the main change: Claude agent-file hooks running at Full access in folders opened only through T3. The changeset adds workspace trust attestation for bypassPermissions (Full access) sessions, which matches the title. The title is 89 characters, which is long, but it is specific and conventional.
Full details: Linked Issues check
-
Explanation
[#43790] The issue asks that agent-file hooks and MCP servers not be silently skipped in folders opened only through T3. It offers two fixes: pass project trust to Claude Code through workspaceTrust, or surface Claude Code's skip message. Its scope is Claude at Full access. The diff in ClaudeAdapterV2.ts (makeClaudeQueryOptions) adds workspaceTrust: { accepted: true, directory: input.cwd } when options.permissionMode === "bypassPermissions" and cwd is non-null. This matches the issue's first proposed fix and its Full access scope. The type ClaudeAgentSdkQueryOptions gains the matching optional workspaceTrust field. The PR description reports new tests (attests workspace trust only in %s) that assert trust is set only for bypassPermissions. The test file was not inspected in this review. The before-and-after evidence in the PR description is still pending. That evidence is not a coding requirement. Below Full access, the issue's scope does not apply to this PR.
Full details: Out of Scope Changes check
-
Explanation
The source change is limited to one code path (makeClaudeQueryOptions) and one type addition. The new workspaceTrust field is required for the #43790 fix. The inline comment that notes the SDK type gap explains a necessary workaround. The non-Full-access cwd branch keeps its prior behavior and does not add trust. The PR description states that other permission modes and the per-project trust flow in #43157 are not changed. The test changes described in the summary cover the same behavior. No unrelated change was identified in the reviewed diff.
Full details: Description check
-
Explanation
The description follows the repository template closely. It has all four required sections (Problem, Change, Scope, Verification) plus the agent attribution line. The Problem section states the bug and its environment. The Change section explains the fix: Full access sessions pass workspaceTrust through the SDK so agent-file hooks run. The Scope section links the issue #43790 that shows the bug. The Verification section gives focused test commands, a direct SDK repro, and a reproduction on main with observed before and after results. It also states what was not checked: MCP server loading and permission modes other than Full access. The template asks for a short recording for UI changes, and this change is server-side, so no UI evidence is needed. The Evidence section and the before/after media links are extra material beyond the template. The PR objectives say before-and-after evidence was still being captured, which conflicts with the description's claim that the evidence is attached. The attribution line is present and names the model and harness.
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 43530f9 and e380167.
Files selected for processing: 2
-
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
imetn
added a commit
to imetn/t4code
that referenced
this pull request
Nov 27, 2026
…ake latch stall for v0.1.12-t4.11
- Fix Antigravity (pingdotgg#43713) background wakeup reply stall by releasing the ACP wake latch and retiring cancelled wake slices in onRunEndedWithoutStarting, checking postSettleContinuationEnabled and runningBackgroundTaskIds before re-offering, and bumping continuationGeneration on runtime termination.
- Port Tier 1 upstream PRs: pingdotgg#43908 (i18n ICU/gt-i18n crash fixes), pingdotgg#43834 (Antigravity ACP support), pingdotgg#43789 (Antigravity usage model IDs & xhigh), pingdotgg#43854 & pingdotgg#43811 (Claude held notifications & workspace trust), pingdotgg#43825 (desktop pinch/wheel zoom), pingdotgg#43896 (GitVcsDriver index check), pingdotgg#43824 (MCP app frame links).
- Port Tier 2 upstream PRs: pingdotgg#43833 (file download from Files panel & chat links), pingdotgg#43826 (preserve right panel on fork/rewind), pingdotgg#43869 (client sentFrom context with T4 Code/T4 Connect labels).
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|