fix: reject incompatible Codex effort before spawn - #380
Conversation
Co-Authored-By: cmuxlayerCodex running gpt-5.6-sol <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_fe21e775-1245-4c51-aad3-d43bb9f0c90c) |
📝 WalkthroughWalkthroughThe Codex effort contract now supports only ChangesCodex effort alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af1e3d1441
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export const CODEX_EFFORT_VALUES = [ | ||
| "low", | ||
| "medium", | ||
| "high", | ||
| "xhigh", | ||
| "max", | ||
| "ultra", |
There was a problem hiding this comment.
Preserve low and max for compatible launchers
Restricting the shared enum unconditionally removes low and max even when the installed launcher supports them; the preceding contract explicitly allowed these values, and max is used for pinned lanes. Thus upgrading cmuxlayer breaks valid callers and prevents them from selecting supported effort levels merely because a different environment might retain an older function. Keep the stable tool inputs and perform the compatibility check against the actual launcher before resource creation instead.
AGENTS.md reference: AGENTS.md:L44-L47
Useful? React with 👍 / 👎.
Co-Authored-By: cmuxlayerCodex running gpt-5.6-sol <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_e453b23b-520c-43fc-b84b-95128e7dad6f) |
Summary
spawn_agentto the cross-version Codex effort set accepted by live launcher functionsVerification
bun run typecheckbun run buildbun run test— 107 files passed; 2,492 tests passed; 1 skippeddist/index.jsMCP probe rejectedeffort:"low"with the four-value enum and created no worktree or branchcoderabbit review --agent— 0 findings across 4 changed filesRefs #379 (remaining fixes tracked in #381)
— cmuxlayerCodex (worker) · codex/gpt-5.6-sol
Note
Medium Risk
Changes agent dispatch validation and advertised effort options; callers using
lowormaxwill fail spawn, but incompatible values are blocked before worktree/surface creation.Overview
Codex effort for
spawn_agentis narrowed tomedium,high,xhigh,ultraso the MCP schema andresolveSpawnEffortmatch what the installed repoGolem launcher (~/.config/ralphtools/golem-dispatch.zsh) accepts in practice. Values such aslowandmaxthat may exist in a newer golems checkout are rejected at validation with a clearer error before any worktree, branch, or surface is created.The
spawn_agenteffort field description is updated to list only those four values and to document the live launcher default (XHIGH when omitted), replacing stale references to a six-value ladder and an older default.Drift/parity tests now read the installed dispatch script (not the golems repo path), parse the Codex effort ladder from
_golem_parse_codex_flags, and assertCODEX_EFFORT_VALUESequals that ladder. Server tests cover schema acceptance/rejection and a preflight failure path that ensures incompatible effort does not trigger worktree or surface setup.Reviewed by Cursor Bugbot for commit 6c41c43. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Reject incompatible Codex effort values before worktree or surface creation
"low"and"max"fromCODEX_EFFORT_VALUESin model-policy.ts, leaving the accepted ladder asmedium,high,xhigh,ultrato match the installed launcher at~/.config/ralphtools/golem-dispatch.zsh.resolveSpawnEfforterror message format fromAccepted values: ...to(expected: ...)and updates thespawn_agentzod schema description to reflect the new ladder.spawn_agentwithcli=codexandeffort=lowreturns a structured error with no worktree or surface side effects.effort=lowandeffort=maxare now rejected before any spawn occurs; previouslymaxwas accepted.Macroscope summarized 6c41c43.
Summary by CodeRabbit
Bug Fixes
medium,high,xhigh, andultra.Tests