Skip to content

Use native attachment flags for codex (-i) and opencode (-f) instead of prompt-text paths #176

Closed

Description

@currentbits

Problem

codex exec -i screenshot.png attaches images to the initial prompt, and opencode run -f <file> attaches files directly (codex cheat sheet, opencode CLI docs). Solenta flattens all attachments, for every provider, into a prompt-text section "- Image: /abs/path ... Inspect them with your file tools" (electron/runner.js:3399-3410).

Impact

The text-path workaround costs a tool round-trip, fails when the agent's sandbox or permissions cannot read the path (compounds the codex read-only sandbox issue), and bypasses the CLIs' own image preprocessing.

Fix direction

Pass the native flag per provider in buildArgs (attachments are already sanitized upstream at electron/runner.js:3376-3391); keep the prompt-text fallback for providers without a flag.

Activity

  1. added
    enhancement
    plan:todo
    on Aug 16, 2026
  2. added
    plan:doing
    plan:done
    and removed
    plan:todo
    plan:doing
    on Sep 9, 2026
  3. currentbits commented on Sep 9, 2026

    @currentbits
    OwnerAuthor

    Codex vision models now pass image attachments as codex exec -i <path>… (after exec / exec resume <id>, before --json so clap FILE... cannot swallow the trailing prompt). Spark (gpt-5.3-codex-spark) is text-only and does not get -i; its images stay in the prompt-path list, same as folders/files (no native folder/file flag). Tokens stay in env, never argv.

    Tests: electron/test/codex.test.js (runner argv) and electron/test/providers.test.js (buildArgs). Parent epic #1162. OpenCode -f and Spark composer hide are not in this change (#1167 still open).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions