Repository navigation
D: pass the plan schema to Claude; refuse Codex in planning and questions (#75) - #97
Merged
Merged
Conversation
…ions (#75) Claude's planning command now carries the mounted schema as --json-schema. The container profile refuses a command whose schema text differs from the mounted file, and the adapter returns Claude's structured_output as bare JSON. Codex 0.153.4 reads files only through its shell, which read-only phases keep off. Decision (c): Codex is refused in planning and questions, so Ask is Claude-only. The decision is recorded in docs/implementation/agent-isolation.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Structured envelopes can bypass the required subtype check, and the live schema probe remains nondeterministic.
Review effort: Balanced
Findings: 2
Open (3)
What changed in this PR
Adds schema-constrained Claude planning and disables Codex where shell-free file access is unavailable.
Changes:
- Passes the mounted planning schema to Claude and extracts structured output.
- Refuses Codex for planning and questions.
- Updates Ask, tests, UI, and documentation for Claude-only questions.
| File | Description |
|---|---|
agents/adapters/claude.ts |
Reads schemas and parses structured output. |
agents/adapters/codex.ts |
Refuses unsupported phases before allocation. |
agents/container/profile.ts |
Binds commands to mounted schema bytes. |
agents/policy.ts |
Adds schema validation and phase restrictions. |
runner/question-container.ts |
Makes Ask Claude-only. |
runner/question-worker.ts |
Removes Codex startup support. |
runner/store.ts |
Rejects new Codex question settings. |
web/public/app.js |
Updates question-agent settings UI. |
web/cli.ts |
Updates CLI guidance. |
test/agent-adapter-cleanup.test.ts |
Moves Codex cleanup fixtures to review. |
test/agent-adapter.test.ts |
Tests schema reading, parsing, and refusals. |
test/agent-container.test.ts |
Tests mounted-schema binding. |
test/agent-launch.test.ts |
Updates launch fixtures for allowed phases. |
test/agent-policy.test.ts |
Tests schema arguments and phase policy. |
test/agent-supervisor.test.ts |
Adds live structured-output coverage. |
test/browser/review.spec.ts |
Tests Claude-only settings. |
test/question-agent.test.ts |
Tests Codex refusal and credential isolation. |
test/questions.test.ts |
Tests legacy Codex database handling. |
README.md |
Documents Claude-only Ask support. |
prompts/plan-author.md |
Documents the Claude planning path. |
docs/plan-format.md |
Updates plan-generation documentation. |
docs/implementation/agent-isolation.md |
Records the Codex decision and schema controls. |
docs/implementation/planning-audit.md |
Updates E4 recording expectations. |
docs/implementation/read-only-review.md |
Updates Ask provider documentation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…s, const probe marker, error status for failed save Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a-75 # Conflicts: # docs/implementation/agent-isolation.md # test/question-agent.test.ts # test/questions.test.ts
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.


Who this is for: reviewers of lane D and of E4/G4, which call D for planning. What it does: closes #75. The answer schema now reaches the vendor, and the open Codex question is decided and built.
Summary
createClaudeCommandpasses the exact text of the mountedschema.jsonas--json-schema. Claude 2.1.281 takes the schema text, not a path.structured_output.parseClaudeOutputreturns that as JSON text, so E2 needs no parser change. A result whosesubtypeis notsuccesscounts as a provider failure.CLAUDE_CODE_OAUTH_TOKEN.docs/implementation/agent-isolation.md, "Codex in read-only phases".Checks before launch
The planning schema is read through the profile's bounded, no-follow reader before any Docker work. The reader now also opens with
O_NONBLOCK, so a FIFO fails instead of blocking. The schema must be a regular file with one link, at most 64 KiB of UTF-8, and a JSON object with"type": "object".Testing
--json-schemawith--permission-mode plan,--restrictedand--tools Read,Glob,Grep) with Claude Code 2.1.282 on the host. It returnedsubtype: successand the expectedstructured_output.CODEBOOST_RUN_AUTH_PROBES=1 npx vitest run test/agent-supervisor.test.ts -t "Claude"on 2026-10-01. The questions probe returns plain text, and the planning probe returns a schema-constrained answer as bare JSON.Known gaps
scripts/record-planning.tson the E4 branch still starts Codex for planning and must drop it.🤖 Generated with Claude Code