-
Notifications
You must be signed in to change notification settings - Fork 408
Codex image summaries fail because -i consumes exec #242
Copy link
Copy link
Closed
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerThis issue is about auth, provider routing, model choice, or SecretRef resolution.This issue is about auth, provider routing, model choice, or SecretRef resolution.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerThis issue is about auth, provider routing, model choice, or SecretRef resolution.This issue is about auth, provider routing, model choice, or SecretRef resolution.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Summary
Local image summaries fail when the Codex CLI backend is selected because
summarizeputs Codex image args before theexecsubcommand:Codex's
-i/--image <FILE>...option accepts multiple files, 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.Reproduction
This came up from a repo workspace with a local WhatsApp media image. The exact file is not important, any local JPEG that uses the Codex backend should exercise the same argv shape:
Observed failure:
Running the same Codex invocation with
execbefore-iworks:Expected behavior
The Codex backend should invoke image summaries as:
Likely cause
buildAssetCliContext()correctly adds Codex image attachment args as:But the Codex provider path in
src/llm/cli.tsappends those extra args beforeexec. This is adjacent to the Codex argument construction touched by #215, but #215 fixed isolation/context loading and did not change the relative order ofcodexExtraArgsandexec.Proposed fix
Move the Codex subcommand before provider-specific extra args:
and add a regression test asserting that
execappears before-ifor image summaries.