fix(mcp): let a Task Capsule record its acting Host - #22
Merged
Conversation
benchwork_open_task minted every Task Capsule with a hardcoded codex Host and exposed no way for a non-Codex Tier 1 Host to describe itself, so a truthful claude-code provenance was refused with VALIDATION_REJECTED. Athanor was right to refuse; the defect was in the MCP boundary, in a module whose own docstring claims to be host-neutral. open_task now accepts the same optional host_session argument that complete_task and fail_task already took. The default remains codex so existing clients are unchanged, and an unregistered Host is refused at the boundary instead of being minted and later rejected by Ward. This is an additive optional field under the MCP API Policy; the 38 frozen tool names are unchanged. Found by the Claude Code CLI Tier 1 Host trial, which is recorded under examples/phase2-final/host-claude-code together with the repaired loop: Capsule TK-B280B5160682 with host claude-code, Ward PASS, and Receipt RC-47D74468807A. Claude Code CLI moves from PENDING_HOST_VALIDATION to PASS.
Endofthestars
force-pushed
the
codex-handoff/claude-code-host-validation
branch
from
July 31, 2026 12:56
53e2573 to
b3e8cbf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Continues the REPAIR work from #21. That round left three items open; this one closes the only one that was actionable here — the Claude Code CLI Tier 1 Host validation — by actually running the trial rather than inspecting the contract.
What the trial found
Read-only discovery passed immediately: a fresh Claude Code CLI
2.1.220conversation connected to the Benchwork MCP server and discovered all 38 registry tools, withbenchwork_statusandbenchwork_next_actionsreturningok: true/mcp-tool-result/1.0— both from an explicit request and from the broad "What should we do next for this study?" with 26 non-MCP tools still available.The bounded Task loop did not pass.
benchwork_open_taskminted every Task Capsule with a hardcodedcodexHost and exposed no way for the acting Host to declare itself, so truthfulclaude-codeprovenance was refused:Athanor was right to refuse. The defect was in the MCP boundary — in a module whose own docstring claims to be host-neutral. Notably the trial Host reported the rejection instead of resubmitting a false
codexprovenance to force a green run.This is exactly what the evidence policy means by "contract inspection is insufficient":
hosts.pyalready exported aClaudeCodeHostAdapter, the Capsule schema already enumeratedclaude-code, and Ward already admitted it. Only a live Host reached the one line that did not.The fix
benchwork_open_tasknow accepts the same optionalhost_sessionargument thatbenchwork_complete_taskandbenchwork_fail_taskalready took, and mints the Capsule for that Host.codex, so existing clients behave exactly as before.Result
The repaired loop completed end to end, verified independently from Chronicle rather than from the agent's self-report:
TK-B280B5160682, capabilitybench.code.inspectclaude-codePASSok: true, ReceiptRC-47D74468807AThe recorded provenance carries the real
--session-id, so it cross-checks against the transcript that produced it. The Host used onlyReadalongside the Benchwork tools, matching the Capsule Circle. The source repository never acquired a.benchwork/directory.Claude Code CLI moves from
PENDING_HOST_VALIDATIONtoPASS.HOST-IDE-001andWAITING_FOR_DISCLOSURE_AUTHORIZATIONare untouched — neither was exercised here.Gate
178 unittest cases OK, 175 pytest passed + 46 subtests, ruff clean, mypy clean on 35 files, 92 schemas validated, doc links verified, release policy permitted.
Coverage note:
maincurrently measures 79.93% locally, just under the configuredfail_under = 80. This branch raises it to 80.01%.Evidence:
examples/phase2-final/host-claude-code/