Skip to content

docs(backends): record why Claude reports no tool execution evidence (#2875) - #4074

Merged
schlessera merged 2 commits into
mainfrom
docs/2875-claude-tool-evidence
Nov 16, 2026
Merged

schlessera merged 2 commits into
mainfrom
docs/2875-claude-tool-evidence

Conversation

@schlessera

@schlessera schlessera commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Closes #2875

What changed

The investigation outcome is negative, and it is recorded beside the #2834 classification in docs/decisions/governed-writable-workers.md ("Claude tool execution evidence — 2026-11-15 (#2875)"). No condition the host can check proves that a journaled Claude call ran no project hook and no brain-owned MCP code, so the Claude backend still reports no toolExecution evidence and every Claude result stays observed. Two tests now pin this. One is a backend test: a Claude turn with a project PostToolUse hook and the brain's .mcp.json server, or with neither at turn start, runs Read, Grep, Glob, two mcp__brain-ui__ reads and mcp__brain__brain_search to their results. It fails if any of them reports evidence. The other is a host test: the schedule classification treats evidence reported for any Claude tool name as unproven.

Why this shape

The issue's brief accepts a documented negative conclusion with source evidence, and it forbids emitting read evidence without proof. I checked the installed SDK 0.3.293 and its bundled CLI against the proof conditions:

  • Journaled turns are interactive, with settingSources: ["project"] and no strictMcpConfig.
  • The template brain's .mcp.json runs brain mcp for the whole session. That server evaluates brain.config.ts and its modules, opens brain.db and drives compute jobs.
  • The CLI watches the settings files, skills, plugin directories and managed settings, and reloads them mid-session.
  • Managed hooks run even under disableAllHooks.
  • The public Query API returns no effective hook set.
  • Tier B settings can be released by policy, and .claude/skills/agents are not protected.

A positive path would need either a runtime-verified, session-stable empty hook and MCP set, or a maintainer ruling to turn hooks or the brain MCP server off for interactive turns. The decision record names both as the conditions for reopening this. Neither is authorized here.

Proof

bun run check:pr --base origin/main   # exit 0, receipt below
bun run test packages/ui-backend-claude/tests/tool-execution-evidence.test.ts   # 2 pass
bun run test packages/ui-server/tests/tool-observation-schedule.test.ts         # 9 pass

Mutation receipts. Each mutation was restored afterwards, with git diff --stat empty:

  • Backend. Added (inputs.req as StartTurnRequest).toolExecution?.(serverMsg.toolUseId, "worker_read") to forwardFrames in packages/ui-backend-claude/src/turn-stream.ts. Both cases fail on CLAUDE_REPORTS_NO_TOOL_EXECUTION_EVIDENCE (0 pass, 2 fail).
  • Host. Changed toolObservation to accept name === "Read" for worker_read. The test fails on TOOL_OBSERVATION_CLASS (8 pass, 1 fail).

scripts/prove-native-host.ts --observation-timing was not run, because no Claude read qualifies, so there is no proven read to time. This is recorded in the decision entry.

Collisions (bun scripts/collisions.ts --json --pr 4074, head f07e9f2e3): closure reports only, no path or unknown report. The details are in a PR comment.

{"version":1,"kind":"brain-check-pr-receipt","head":"75be389c19415ba085cc8e4065ebbb9c7978dc68","base":"origin/main","mode":"focused","startedAt":"2026-11-16T21:03:54.544Z","finishedAt":"2026-11-16T21:04:47.002Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":13071.154937999998},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":143.03626799999984},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":121.35486300000048},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":19.796644000001834},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":39084.509815}]}

Checklist

  • Focused local preflight/behavioral receipts passed; hosted proof runs at confirmation.
  • Acceptance criteria are met by the negative outcome, as the issue's brief allows: (1) the proof conditions are recorded; (2) a test fails if a hooked or brain-MCP Claude call reports evidence; (3) a proven Claude read cannot be measured because none exists, and this is stated in the record.
  • Milestone 0.45.0 is set on the PR and the issue.
  • No changeset: docs and tests only, nothing a consumer can see.
  • No personal data; the leakage gate passed.
  • Nothing in the machine surface moved; toolExecution stays @internal and unchanged.
  • Docs updated.
  • No guard changed: the backend behaviour is unchanged, and only the tests pin it.
  • Provider history: nothing on a turn's path changed.

Anything left open

Nothing. Reopening needs a runtime capability or a maintainer ruling, and the decision record names both.

🤖 Generated with Claude Code

…2875)

A journaled Claude turn loads project settings and .mcp.json, the default
brain runs the brain MCP server for the whole session, the CLI reloads
settings, skills and plugins mid-session, and the host cannot read the
effective hook set. No call is proven to have run no project hook or
brain-owned MCP code, so every Claude result stays observed.

Guard both sides: the backend reports no evidence with or without a
project hook and brain MCP server configured, and the host classifies any
evidence for a Claude tool name as unproven.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera schlessera added this to the 0.45.0 milestone Nov 15, 2026
@schlessera schlessera added type: feat A new capability or a change in user-visible behaviour. area: backends AgentBackend implementations and the seam they share. labels Nov 15, 2026
@schlessera

Copy link
Copy Markdown
Owner Author

Collisions at head f07e9f2e3d68021d79fb92f0abcf2e6ac957e0f9 (bun scripts/collisions.ts --json --pr 4074): closure reports only, and no path or unknown report. The overlapping closures:

@schlessera
schlessera marked this pull request as ready for review November 16, 2026 22:26
@schlessera
schlessera merged commit 4541b40 into main Nov 16, 2026
52 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: backends AgentBackend implementations and the seam they share. type: feat A new capability or a change in user-visible behaviour.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

backends: report Claude tool execution evidence where no project hook or brain MCP code can run

1 participant