Fix Codex image arg order#243
Conversation
- Put the Codex exec subcommand before provider extra args so image flags belong to codex exec.\n- Add regression coverage for Codex image args so -i cannot consume exec.\n\nFixes steipete#242.
|
Codex review: needs real behavior proof before merge. Reviewed June 8, 2026, 1:34 AM ET / 05:34 UTC. Summary Reproducibility: yes. from source inspection: current main passes image Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow argv reorder with regression coverage once a redacted real Codex image-summary run demonstrates the fixed command succeeds. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main passes image Is this the best way to solve the issue? Yes, the proposed reorder is the narrow maintainable fix and matches the AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 769d01f0898f. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Summary
execsubcommand before provider-specific extra args-i <image>attached tocodex execinstead of the top-level Codex command-iordering caseFixes #242.
Why
Local image summaries can currently build this argv when the Codex backend is selected:
Codex's
-i/--image <FILE>...option is variadic, soexeccan be consumed as another image argument. The remaining--output-last-messageflag is then parsed at the wrong command level and Codex exits before the summary starts.This is adjacent to the Codex argument construction discussed in #215, but that issue fixed isolation/context loading and left the
codexExtraArgs/execorder unchanged.Repo example
This came up from a repo workspace with a local WhatsApp media image. Any local JPEG should reproduce the same command shape when the Codex backend is selected:
Before this PR,
summarizecan invoke:codex -i /path/to/image.jpg exec --output-last-message /tmp/.../last-message.txt --skip-git-repo-check --json -m gpt-5.5and Codex reports:
After this PR, the command is assembled as:
codex exec -i /path/to/image.jpg --output-last-message /tmp/.../last-message.txt --skip-git-repo-check --json -m gpt-5.5Validation
pnpm test tests/llm.cli.regressions.test.ts tests/llm.cli.test.tspnpm exec oxfmt --check src/llm/cli.ts tests/llm.cli.regressions.test.tsgit diff --check