Skip to content

Codex exec resume rejects --search; follow-up turns die (exit 2) #799

Closed

Description

@currentbits

Problem

After #795 (omit --sandbox on resume), Codex follow-up turns with web search on fail immediately:

error: unexpected argument '--search' found
Usage: codex exec resume --json --skip-git-repo-check --model <MODEL> --config <key=value> <SESSION_ID> [PROMPT]

Seen on Codex CLI 0.152.0 after nightly-202609011148-d77e608e.

Root cause

electron/providers.js buildArgs still does args.push("--search") after exec / exec resume. On 0.152.0:

  • codex exec --search is rejected (unexpected argument)
  • codex --search exec is accepted (global flag before the subcommand)
  • codex exec -c web_search=live and codex exec resume -c web_search=live are accepted

Issue #174 assumed --search was an exec subcommand flag. It is not anymore.

Fix

When webSearch is true, pass -c web_search=live (same -c channel as effort). Do not emit --search after exec. Fresh and resume both.

Activity

  1. currentbits commented on Sep 1, 2026

    @currentbits
    OwnerAuthor

    PR: #802

    Clean branch off origin/main (coder/codex-search-web-search-live-799). Codex buildArgs now emits -c web_search=live instead of --search on both fresh exec and exec resume. Confirmed on Codex CLI 0.152.0: --search after those subcommands is rejected; the -c form parses.

    The earlier uncommitted copy on coder/codex-resume-no-search was still sitting locally and never included workflow-search.test.js. That test file is not on origin/main (workflow.js there still does not forward thread.webSearch), so this PR only updates electron/test/codex-search.test.js.

    Leaving this issue open until the PR lands. No --enable computer_use; #800 is untouched.

  2. added
    plan:done
    and removed
    plan:doing
    on Sep 1, 2026
  3. currentbits commented on Sep 1, 2026

    @currentbits
    OwnerAuthor

    Landed from Solenta thread "Fork: Fork: We have an issue wiht codex". Closed on merge.

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

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions