You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Claude provider: hooks in a project agent file are silently skipped in folders only opened through T3 #43790
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
Claude Code runs the hooks: in a project agent file (<project>/.claude/agents/*.md) only if the project folder is trusted. T3 Code starts Claude Code without a terminal, so the trust dialog never appears, and T3 records no trust itself.
Create a project folder that claude has never been run in from a terminal (no projects["<folder>"] entry in ~/.claude.json).
Add <folder>/.claude/agents/checker.md with a PreToolUse hook on Read that denies one file.
Open the folder in T3 Code, start a Claude thread at Full access, and have it run checker to read that file.
Expected behavior
The read is refused, or the thread says the agent's hooks were not loaded.
Actual behavior
The read succeeds and the hook never runs. The agent's tools: list and the folder's .claude/settings.json hooks still work, so nothing looks wrong.
Agent-file hooks are used as fences, for example a reviewer agent that must not read the implementer's source. Here the fence fails open, silently.
Cause. Claude Code skips the hooks and reports it only in its debug log, which T3 does not enable (message under Logs). The same check skips MCP servers defined in an agent file. The bundled Claude Agent SDK has a workspaceTrust option for a host app to attest trust. ClaudeAdapterV2.ts does not pass it (checked at 856b105, nightly 5151, and on main as of 2026-11-26).
Related.#43157 adds a per-project trust question in T3. As of 2026-11-26 its diff does not pass trust to Claude Code or mention agent files, so this case would remain. Our threads were at Full access and the agent hooks were still skipped.
Possible fixes. Pass the project's trust to Claude Code through workspaceTrust, or show Claude Code's skip message in the thread.
Impact
Major degradation or frequent failure
Version or commit
0.1.12-nightly.20261123.5151 (856b105)
Environment
macOS, Claude provider at Full access, Claude Code 2.1.330 (same check in 2.1.327), bundled @anthropic-ai/claude-agent-sdk 0.3.321
Logs or stack traces
# Built by Claude Code for its debug log. Not visible in a T3 thread; text taken from the Claude Code build.
Skipping frontmatter hooks foragent '<name>': the folder its definition file came from is not trusted (source: projectSettings). Run Claude Codein that folder once and accept the trust dialog, or set projects[<folder>].hasTrustDialogAccepted: truein<config file>.
Workaround
Set projects["<folder>"].hasTrustDialogAccepted: true in ~/.claude.json. The hook runs once T3 next resumes the thread.
Activity