Provider registry M2+M3: claude-code and codex Strict backends - #82
Open
tzhouam wants to merge 1 commit into
Open
Provider registry M2+M3: claude-code and codex Strict backends#82tzhouam wants to merge 1 commit into
tzhouam wants to merge 1 commit into
Conversation
…erves repo_map
Completes the provider registry's declared backends (doc/RFC-provider-registry.md).
- claude-code: headless `claude -p --output-format json`, prompt on stdin,
iteration budget mapped to --max-turns, our step contract via
--system-prompt (+--exclude-dynamic-system-prompt-sections). Governance
is fully PREVENTIVE: built-ins denied wholesale (--disallowedTools) and
only the MCP bridge allowed (--mcp-config + --strict-mcp-config), so
every tool call passes tools.dispatch; session tool activity comes from
the bridge-trace delta. Cost/served-model parsed from the JSON result
(live-probed on claude 2.1.232).
- codex: `codex exec --json -s read-only`, bridge wired purely via -c
mcp_servers overrides, prompt on stdin ("-"). Sandbox is the preventive
layer for writes/network; broad sandbox reads are a documented
limitation. Offline-tested against recorded 0.145.0 event shapes (no
ChatGPT login on the dev machine); auth_gap() reports the login fix in
strict_readiness and doctor before any run starts.
- transports share sanitized_env() in base; cursor gains an auth_gap too.
- tool bridge now also serves the on-demand repo_map (rebuilt from the
spec via the same runtime factory) and fixes doc_search printing the
wrong hit field; repo knowledge slice resolves through the adapter
manifest. skill/memory search stay in-process only (cross-process
candidate writes deliberately not opened).
Live e2e on this branch: claude-code reviewed vllm-omni#6175 end-to-end
(light pass + zero-yield escalation to a 2-lens ensemble, all sessions on
the harness, 53/53 tool calls bridged, zero native); codex refused at
readiness with the exact login fix. Full offline suite green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tzhouam
added a commit
that referenced
this pull request
Aug 19, 2026
git-apply of f625192 (providers/claude-code-codex-backends) onto the v15 tree: claude-code transport (built-ins denied, bridge-only — fully preventive), codex transport (read-only sandbox), sanitized_env in base, bridge knowledge tools (doc_search/doc_read/repo_map via the runtime factories). Conflict resolved in tool_bridge.py: the M2 knowledge-tools registration and the v15 archaeology-tools registration now coexist. MoA member test updated: a claude-code member resolves post-M2. Enables Fable in the recall seats via review_lens_backends (adversary/round2 -> claude-code:claude-fable-5). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Part of #80 (RFC — provider registry). Completes the declared backends: M2 claude-code and M3 codex, plus the tool bridge now serving the on-demand
repo_mapand adoc_searchoutput fix. Follows #81 (M1: registry + tool bridge + cursor).claude-code (M2) — live-verified on subscription auth
Headless
claude -p --output-format json: iteration budget →--max-turns, our step contract replaces the vendor system prompt (--system-prompt+--exclude-dynamic-system-prompt-sections), prompt on stdin. Governance is fully preventive — built-ins denied wholesale (--disallowedTools) and only the MCP bridge allowed (--mcp-config+--strict-mcp-config+--allowedTools mcp__infermatrix-tools), so every tool call flows throughtools.dispatch; per-session cost and served model come from the CLI's JSON result.Live e2e (Strict review of vllm-omni#6175 through the real thin-server → reserved-subprocess flow): the light pass found nothing on the 1-line PR, the zero-yield escalation kicked in, and the 2-lens standard ensemble ran entirely on the harness — 3 sessions (17/18/24 turns),
claude-fable-5served, ~$2.0–2.7/session tracked, 53/53 tool calls bridged (grep×20,list_dir×17,read_file×16 inbridge_trace.jsonl), zero native tools. The review validated the pytest import-mode mechanism and found a second broken importer beyond the PR description. Run:run-20260814-181055-4df62f.codex (M3) — offline-tested; readiness gate live-verified
codex exec --json -s read-only --skip-git-repo-check, bridge wired purely via-c mcp_servers.*config overrides (nothing written into the session tree), prompt on stdin. The read-only sandbox is the preventive layer for writes/network; broad sandbox reads are a documented limitation of this backend class. The dev machine has no ChatGPT login, so the transport is exercised offline against recorded codex-cli 0.145.0 event shapes, and the newauth_gap()check makes the live behavior honest:Also in this PR
sanitized_env()shared inproviders/base.py(cursor now uses it too);auth_gap()on the transport contract, wired intostrict_readinessand doctor (cursor + codex implement it).repo_map(rebuilt from the bridge spec via the same runtime factory, dispatched with the in-process extra-tool semantics) and resolves the repo knowledge slice through the adapter manifest; fixeddoc_searchprinting a nonexistent hit field. Still in-process-only:skill_search/memory_search(cross-process candidate writes deliberately not opened)._UNSHIPPEDmilestone mechanism is kept (empty) for future backends.Verification
ruff checkclean on all new/authored code.🤖 Generated with Claude Code