Skip to content

[Bug]: Merge Push fails if Codex isn't set up #31005

Closed

Description

@maxkloker

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

Error message: Text generation failed in generatePrContent: Failed to spawn Codex CLI process

The toast comes from T3 Code. When I use its "create PR" button, it asks an AI model to write the PR title and description (that's the generatePrContent step). It's set to use the Codex CLI for that.

It can't start Codex because codex isn't installed in my case, or at least isn't on your PATH: Get-Command codex found nothing on this machine.

Expected behavior

Should use the current model IMHO

Actual behavior

Just fails

Impact

Minor bug or occasional failure

Version or commit

0.1.7

Environment

Windows

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

No response

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Nov 4, 2026
  2. Exotic209093 commented on Nov 5, 2026

    @Exotic209093
    Contributor

    I looked into this on main at 337c585 (reading the code, not reproducing it at runtime).

    The PR title/body, commit message and branch name all use the "Text generation model" setting, which defaults to Codex gpt-6-luna (packages/contracts/src/settings.ts:1320). Codex is enabled by default whether or not the CLI is installed (settings.ts:1400-1424), and the settings fallback (apps/server/src/serverSettings.ts:509-539) only moves away from a disabled provider, not one whose binary is missing. TextGeneration.generate has a fallback that checks installed and auth (apps/server/src/textGeneration/TextGeneration.ts:88-123), but it only fires when the usage window is exhausted.

    Workaround: Settings → Threads → Text generation, and pick a model from a provider you have installed. Settings → Source control → "Use a separate source control writer model" does the same for commit/PR/branch text only.

    It isn't Codex-specific: Claude fails the same way ("Failed to spawn Claude CLI process", ClaudeTextGeneration.ts:248). Codex is just the default.

    Related: #26962 (same cause, thread titles), #5182, #28906. #29607 (open) falls back when the selected provider isn't installed or signed in, and since it changes the shared generate path it should cover generatePrContent too. #31255 (open) makes the toast name the model and link to its setting.

  3. Muzammil-Bit commented on Nov 6, 2026

    @Muzammil-Bit
    Contributor

    Note

    🤖 Claude Opus 5.5 responding on behalf of Muzammil Hussain

    This is fixed on main by #29607 (merged Nov 6). #26979 fixes it as well, but that PR has not merged and now conflicts with main.

    Both PRs make text generation move to another usable provider when the selected one can't start. Before them, it only moved when the selected model's usage window was exhausted. Commit messages, PR content and branch names all go through that same function.

    To check, I ran two dev servers, each with a fresh database. In both I set Settings → Providers → Codex → Binary path to a missing file (Codex still enabled, shown as "Not found"), left the text generation model at the default gpt-6-luna, picked Claude Haiku 5.5, and committed a new file with an empty commit message:

    main dd059b4 #26979 1e238fd
    Result Committed 9224977, "Add greet helper in greet.ts" Committed 802d564, "Add greet helper"
    Provider that wrote the message (server trace) Claude Claude
    Failed to spawn Codex CLI process none none

    I tested the commit path, not the "create PR" button, because that button would open a real PR. Both go through the same fallback. Until a build with #29607 ships, the workaround is to pick an installed provider's model in Settings → Threads → Text generation model.

  4. Yash-Singh1 commented on Nov 6, 2026

    @Yash-Singh1
    Collaborator

    Should be fixed now.

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

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions