Skip to content

feat!: Claude writes and fixes; Codex only reviews - #832

Merged
kixelated merged 6 commits into
mainfrom
quest/m0/claude-writers
Nov 23, 2026
Merged

kixelated merged 6 commits into
mainfrom
quest/m0/claude-writers

Conversation

@kixelated

@kixelated kixelated commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m0/claude-writers.md: Claude Code writes and fixes, and Codex only reviews.

Changes

  • Writers (src/cli/models.ts): no writer list names Codex any more. XS through L list one Claude entry each, and XL stays Fable high, then Opus xhigh. A quest whose writers are all at their usage limit now waits instead of starting on Sol. The writer A/B arms are unchanged. An iterate on a PR Sol wrote finds no quest models --writer gpt-6.1-sol entry, so it takes its size's first entry, as the guide already says for a retired model.
  • Land fixer (src/cli/land-fix.ts): quest land fix runs claude -p by default instead of codex exec. It keeps the same isolation:
    • The only credential is the proxy's client key, sent as ANTHROPIC_API_KEY to the proxy that ANTHROPIC_BASE_URL names. --bare never reads a stored login.
    • --bare, --setting-sources "", --strict-mcp-config, --disable-slash-commands, and the disabled built-in AGENTS.md plugin stand in for --ignore-user-config: no CLAUDE.md, AGENTS.md, hook, plugin sync, settings, MCP server, or skill loads from HOME or the checkout.
    • The prompt goes in with --append-system-prompt, ranking above the data, as Codex's developer_instructions did; stdin carries only the failure log, the PRs, and the known flaky tests.
    • It runs with --no-session-persistence, --dangerously-skip-permissions (the container is the sandbox, so IS_SANDBOX=1 lets it run as root), and only the shell and file tools. CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 is set because the container reaches only the proxy and dependency hosts.
    • The model is read from the run's own output. A new Init reader replaces Codex's banner reader: it takes the system/init event on the stream-json stdout and ignores anything after the first conversation event, since that is where the PRs' code shows up. It falls back to --model, then unknown.
    • Efforts are Claude's, minus max: low, medium, high, xhigh. Codex's minimal is gone.
    • Limits, hand-back, result validation, and the pipe relay are unchanged.
  • The default attribution when a result names no agent changes from Codex to Claude.
  • Updated the docs (README writer table, land fixer section, quest land fix help) and the quests that linked this one.

Public API

  • Breaking: quest land fix reads ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY instead of OPENAI_BASE_URL and OPENAI_API_KEY. --agent defaults to claude, --effort and --fixer-effort drop minimal, and --agent-arg replaces claude -p arguments. To migrate, the host's fixer wrapper passes an Anthropic Messages endpoint (no /v1) and its client key, or keeps Codex with --agent codex --agent-arg ....
  • quest models and quest unblocked --json no longer list Codex entries, and quest models <size> --writer gpt-6.1-sol is an error. There is no wire impact.

Decisions

These are choices I made without asking, listed for review:

  • Kept no Claude fallback below each XS to L writer, such as Sonnet under Opus. The Plan's point is that waiting costs little, and a subscription's limit is mostly shared across its models anyway.
  • The fixer's model stays the wrapper's to pass (--model), with no new --fixer-model on the daemon. This matches how Codex was configured.
  • Maintainer, 2026-11-22 (pick round): this PR merges now: ✅ /quest-merge (rejected: hold until the host is ready; /quest-iterate to default the fixer to Codex for now). The host stays on its pinned quest release, so kixel-ai/dotfiles' quest bump that picks this up waits for the host's Anthropic route on the model proxy and Claude Code in the fixer container, which dotfiles' quest tree plans.
  • The fixer's init reader treats a JSON line that is no object as wrapper noise, and matches the AGENTS.md plugin by its name, source, or path, since builds name plugins either way (Pullfrog's findings).
  • The fixer disables Claude Code's built-in cc-plugin-agents-md plugin, which --bare still loads and which injects the checkout's AGENTS.md as instructions, matching Codex's project_doc_max_bytes=0. An init event that still lists an agents-md plugin, such as after a rename, kills the run and fails loudly.
  • Merged main for the queue's conflict: took main's deletion of quest/m1/model-config.md (moq-dev/quest#834), whose only change here was a link. Main's new quest/m0/writer-fallbacks.md linked and required this PR's quest file, which this PR deletes, so its links now point to this PR and its Required drops the entry. That quest's newer decision (Claude, then Codex, then Gemini writers) supersedes this PR's "no fallback below each writer" choice above. It is planned there and builds on this PR, so nothing here changes.
  • Coordinator, 2026-11-23, for review (the maintainer was away): at the design checkpoint after Pullfrog's third round with findings (review): ✅ continue with this approach (rejected: rethink it). The approach is the maintainer's own Plan decisions, the round raised only a comment nit, and the earlier code-level findings were refuted.
  • Fixed that round's nit: the fixerEffort comment in src/cli/land-watch.ts named Codex's model_reasoning_effort; it now names the fixer's --effort. A comment-only fix from an all-low round needs no new local review, per /quest-merge.

Validation

  • just check and just test pass (1591 tests), and again at the comment fix's head.

  • Unit tests cover:

    • the fixer's default claude -p flags, its refusal without the Anthropic variables, and its effort choices;
    • that only the proxy key is forwarded (CLAUDE_CODE_OAUTH_TOKEN and GH_TOKEN are dropped);
    • the init reader across wrapper noise, a system event before init, a forged init after the conversation starts, and an invalid model name;
    • the new writer lists in quest models and quest unblocked --json.
  • I ran it end to end: the real Claude Code 2.1.325 binary through quest land fix --agent <binary> --model claude-haiku-5-5 --effort low on a scratch repository, with a fresh HOME, env -i, and the host gateway as ANTHROPIC_BASE_URL with a dummy key. Its init event showed:

    • apiKeySource: ANTHROPIC_API_KEY
    • permissionMode: bypassPermissions
    • mcp_servers: [], skills: [], slash_commands: []
    • tools Bash, Edit, Read (this build folds Write, Glob, and Grep into those; naming them is harmless)
    • model: claude-haiku-5-5

    A ui_invalidate system event came before init, which the reader skips. After the review's fixes, the same binary with the final flags, including --settings and --append-system-prompt, accepted them all, and its init event no longer listed cc-plugin-agents-md@builtin. The gateway rejected the dummy key (401), and the fixer failed loudly with exit 1. A real run needs the host proxy's Anthropic route; see Follow-ups.

  • I checked the limit path the Plan asked about. quest agent reports a usage limit as limited, exit 3 (test/agent.test.ts), and /quest-run skips a quest whose list runs out. A limit on the first request leaves no claim. A limit that hits after quest start pushed its claim leaves a draft that --unclaimed hides, so I added a follow-up.

  • This is not a reviewer or review-prompt change: REVIEWERS and src/cli/review.ts are untouched. Only a comment above REVIEWERS lost its mention of Sol as a writer. So quest eval run is not required.

Follow-ups

  • /quest-run releases a claim its writers' limits stranded (S): run.md releases the claim when a quest's whole list stops on limits with nothing but the claim commit. Maintainer, 2026-11-22: ✅ keep (rejected: drop), recorded in its Plan. No open decisions.

  • For kixel-ai/dotfiles' quest tree (the maintainer's host): the land fixer's wrapper and container now need:

    • an Anthropic Messages route on the host's model proxy, and a proxy client key passed as ANTHROPIC_API_KEY with ANTHROPIC_BASE_URL, in place of the OpenAI variables;
    • Claude Code installed in the fixer container, with a writable fresh HOME;
    • the wrapper's --model (and the daemon's --fixer-effort, now low to xhigh) set to the Claude model and effort the fixer should run.

    The dotfiles quest that bumps its quest pin to a release with this PR waits for the first two, so the host keeps its Codex fixer until they land; a bump before them would fail each fix round loudly.

Overlap

Open PRs that touch the same files, to merge when they land: moq-dev/quest#831 (reviewer table) and moq-dev/quest#819 (risk tiers).

Models

Size: M

  • Implementer: Claude Code, claude-opus-5-5, unknown effort (arm A)
  • Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, XS)
  • Implementer: Claude Code, claude-opus-5-5, low effort (iterate, XS)

🤖 Generated with Claude Code

(Written by Opus 5.5)

Review

Rewritten by quest review after each round.

  • Head: 014995b

  • Base: origin/main at 2aaf6bd

  • Risk: high, Hosts running the land fixer wrapper must now supply ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY instead of OPENAI_*, or `quest land fix` throws before it runs, and the fixer's agent, credentials, tool set, and permission mode all change, with `--dangerously-skip-permissions` now running Claude Code in the container for every repository's merge queue. A revert restores the Codex path, but any host that already deployed the new wrapper contract, and every PR record written as "Claude" in the interim, must be reconciled by hand.

  • Classified: high by Claude Code, claude-haiku-5-5, low effort, session 68d7b030-c546-4db2-86fe-2a3dcc604af0

  • Reviewer: Codex, gpt-6.1-sol, high effort

  • Session: 01a20712-54a4-7a61-b484-392e6c4f7df0, round 1

  • Score: 9/10, Static review found no actionable regressions and consistent handling of the altered contracts, though builds and tests were not run as instructed.

  • Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

  • Reviewer: Claude Code, claude-sonnet-5-5, medium effort, second

  • Session: b9f9e2f4-284b-4011-b8a4-fb8a7b375bfb, round 2

  • Score: 8/10, The head is unchanged since the last review, and the author's cited evidence checks out for the findings I could verify, so nothing remains that blocks landing.

  • Rounds: 2; first round 7 (medium 6, low 1); findings 7 (medium 6, low 1): fixed 0, refuted 7, open 0

  • Findings: none

  • The last round's findings, at 014995b:

    • Refuted: medium, src/cli/land-fix.ts:349: AGENTS.md plugin refusal regex over-matches; Failing loudly on over-match is a deliberate tradeoff, the `enabledPlugins: false` setting is the primary control, and the scan is only a secondary tripwire.
    • Refuted: medium, src/cli/land-fix.ts:47: Init.read stops at the first non-system JSON object; Stopping at the first non-system object is deliberate so that PR content cannot forge an init event, and Claude Code's stream-json emits init first.
    • Refuted: medium, src/cli/land-fix.ts:278: `minimal` effort removed from EFFORTS without notice; `minimal` was a Codex-only effort, the change is declared breaking (`feat!`), and the repo skips backwards compatibility.
    • Refuted: medium, src/cli/land-fix.ts:336: Permission skip paired with IS_SANDBOX=1 and no turn or budget cap; The container is the documented sandbox and runs are bounded by the existing time and output limits, the same as under Codex; `IS_SANDBOX=1` only lifts the root refusal.
    • Refuted: low, src/cli/models.ts:22: Stale reviewer-ordering comment; The REVIEWERS comment describes Sol as a reviewer, which is still accurate, and the claimed phrase is not in models.ts.
    • Refuted: medium, README.md:1488: README documents a non-Claude --writer fallback that is not implemented; assets/AGENTS.md:228 documents the rule that a PR whose writer no list names takes its size's first entry that can run, so the README matches the guide.
    • Refuted: medium, quest/m0/limited-claim-release.md:17: Quest depends on `quest start --release` and a run.md skip section that do not exist; `quest start --release` exists at src/cli/main.ts:579 and assets/AGENTS.md:160, and assets/skills/run.md:32 has the skip section, so the quest's dependencies exist.
  • Reviewer: Codex, gpt-6.1-sol, xhigh effort, shadow

  • Session: 01a20712-54a8-7fd3-8dec-b843a93cbb49

  • Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0

kixelated and others added 2 commits November 22, 2026 20:57
Quest-Claim: 3810aad27106d15a
No writer list names Codex's model, so a quest whose Claude writers are at
their limit waits for them. `quest land fix` runs Claude Code bare through
the host's model proxy (ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY) instead of
Codex, recording the model its init event names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kixelated kixelated changed the title Claude writes and fixes; Codex only reviews feat!: Claude writes and fixes; Codex only reviews Nov 23, 2026
The prompt goes to Claude Code as its system prompt, the built-in AGENTS.md
plugin is disabled and its presence fails the run, and the init reader decodes
across chunks without truncating.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kixelated
kixelated marked this pull request as ready for review November 23, 2026 05:19
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 794142e0-ff79-49d7-875c-0ffec4b41f91
Commits

Reviewing files that changed from the base of the PR and between 2aaf6bd and 2a001e2.

Files selected for processing: 16

  • README.md
  • quest/m0/README.md
  • quest/m0/claude-writers.md
  • quest/m0/limited-claim-release.md
  • quest/m0/review-seats.md
  • quest/m0/writer-fallbacks.md
  • quest/m1/model-check.md
  • src/cli/land-fix.ts
  • src/cli/land-fixer.ts
  • src/cli/land-watch-fix.ts
  • src/cli/land-watch.ts
  • src/cli/main.ts
  • src/cli/models.ts
  • test/cli.test.ts
  • test/land-watch.test.ts
  • test/land.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Two rough edges in the fixer's init reader. Nothing else is blocking.

Approach: Sound. Removing Codex from the writer lists and swapping the land fixer to claude -p in bare mode does what the quest's Plan asks. It keeps the proxy-key-only credential model and puts the prompt above the untrusted data.

Reviewed changes

All three commits on quest/m0/claude-writers were reviewed.

  • Writer lists: WRITERS XS–L now list one Claude entry each, so quest models --writer gpt-6.1-sol errors and the coordinator falls back to the size's first entry.
  • Land fixer argv: the default claude -p runs with --bare, --setting-sources "", --strict-mcp-config, the built-in AGENTS.md plugin disabled, the prompt passed in --append-system-prompt, and stream-json output.
  • Init reader: replaces Codex's banner reader. It reads the model and plugins from the first system/init event on stdout and kills the run if an agents-md plugin loaded.
  • Credentials/env: the fixer now gets ANTHROPIC_BASE_URL/ANTHROPIC_API_KEY, IS_SANDBOX=1, and CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1. The tests assert that CLAUDE_CODE_OAUTH_TOKEN and GH_TOKEN are dropped.
  • Efforts and attribution: EFFORTS drops minimal, and the default author()/comment() attribution becomes Claude.
  • Docs and quests: README tables and the land fix help are updated, and the follow-up limited-claim-release.md is added.

One stale reference outside the diff: the doc comment on effort at src/cli/land-watch.ts:74 still reads "The fixer's model_reasoning_effort." The PR updated the matching comment in land-watch-fix.ts.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread src/cli/land-fix.ts Resolved
Comment thread src/cli/land-fix.ts Resolved
@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision (2026-11-22, /quest-run pick round):

  • This PR: ✅ /quest-merge (rejected: hold until the host is ready; /quest-iterate to default the fixer to Codex for now). The host keeps running quest v0.23.2 until kixel-ai/dotfiles bumps its pin, so the dotfiles quest bump that picks this up must wait for the host's Anthropic route on the model proxy and Claude Code in the fixer container. That work is planned in dotfiles' quest tree.
  • Follow-up quest/m0/limited-claim-release.md: ✅ keep (rejected: drop).

(Written by Claude Opus 5.5 with high effort)

…gin by name, source, or path

Also record keeping quest/m0/limited-claim-release.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kixelated

Copy link
Copy Markdown
Collaborator Author

The pick round's answers are recorded at 7c08a87: quest/m0/limited-claim-release.md's Plan records keeping it, and the PR body's ## Decisions and ## Follow-ups record that this merges now while the dotfiles pin bump waits for the host's Anthropic proxy route and Claude Code in the fixer container.

(Written by Opus 5.5)

pullfrog[bot]
pullfrog Bot previously approved these changes Nov 23, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Reviewed the delta since the prior pullfrog review (4eef8bb..7c08a87).

  • Non-object JSON skipped: Init.read now treats a JSON value that is no object (7, true, "x") as wrapper noise, so it no longer ends the init scan early.
  • Plugin guard widened: it collects name, source, and path from each plugin entry, so the agents-md kill fires on either the documented {name, path} shape or {source}.
  • Tests: cover scalar noise before init and both plugin shapes.
  • Quest doc: records the maintainer's pick in limited-claim-release.md.

Both prior threads are addressed and resolved.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

Takes main's deletion of quest/m1/model-config.md and points
writer-fallbacks.md at this PR instead of the quest it finishes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues in the merge. One earlier doc nit is still open.

Reviewed changes

The only commit since the last Pullfrog review (7c08a87) is a merge of main (2aaf6bd). It changes quest docs and no code.

  • Took main's deletion: quest/m1/model-config.md is removed. On this branch its only change had been a link.
  • Fixed links in writer-fallbacks.md: main's new quest/m0/writer-fallbacks.md now links to this PR rather than to the claude-writers.md file this PR deletes. It also drops that file from its ## Required list. No links to claude-writers.md are left in the tree.

ℹ️ Stale fixer effort doc comment in land-watch.ts

The doc comment on effort at src/cli/land-watch.ts:74 still reads "The fixer's model_reasoning_effort." That is Codex's config key. The fixer now passes Claude's --effort, and this PR already updated the matching comment in land-watch-fix.ts.

Technical details
# Stale fixer effort doc comment

## Affected sites
- src/cli/land-watch.ts:74 — `/** The fixer's `model_reasoning_effort`. */` names Codex's config key

## Required outcome
- The comment describes the fixer's Claude `--effort`, matching the updated comment in `src/cli/land-watch-fix.ts`

Pullfrog  | Fix it ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

@kixelated

Copy link
Copy Markdown
Collaborator Author

Fixed Pullfrog's nit in 2a001e2: the fixerEffort comment in src/cli/land-watch.ts now names the fixer's --effort (low to xhigh) rather than Codex's model_reasoning_effort. It was a review-body finding with no thread to resolve.

(Written by Opus 5.5)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes since the prior Pullfrog review:

  • Fixed a stale doc comment — the fixerEffort comment in src/cli/land-watch.ts now names the fixer's --effort (low to xhigh) instead of Codex's model_reasoning_effort.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 1cb53f1 Nov 23, 2026
4 checks passed
@kixelated
kixelated deleted the quest/m0/claude-writers branch November 23, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant