codex - 💡(How to fix) Fix Codex Mobile remote new thread cannot choose worktree or starting branch

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When starting a new Codex task from Codex Mobile / ChatGPT mobile connected to a Mac running the Codex App, I can choose the project and adjust model / permissions, but I do not see a way to choose:

  • Local vs Worktree execution
  • the starting Git branch
  • an existing or permanent worktree target

This is a workflow and safety problem for local development. From mobile, it is easy to accidentally start work against the primary local checkout, for example main, instead of an isolated worktree or intended feature branch.

Root Cause

The mobile remote-control feature is most useful when I am away from the Mac and want to start or supervise work asynchronously. In that context, I often cannot easily inspect the host machine’s current Git state before sending the first prompt.

For serious repositories, the execution target is not a cosmetic setting. Before an agent starts editing files, I need to know and control:

  • which checkout it will modify
  • whether it will use an isolated Codex-managed worktree
  • which branch or commit the worktree starts from
  • whether the selected project is my foreground local checkout, a permanent worktree, or some other workspace

Prompt-level guardrails like “run git status first and stop if unexpected” help, but they are weaker than first-class UI selection and confirmation. The unsafe case is that a mobile-created thread starts in a checkout I did not intend, and I only notice after files have already changed.

Fix Action

Fix / Workaround

Workarounds

Current workaround is to manually create a dedicated worktree on the Mac host and register it as a separate project, then select that project from mobile. I also have to add prompt instructions such as:

Code Example

First run git status --short --branch and git rev-parse --show-toplevel. If the branch/path is not the expected worktree, stop and ask before editing. Do not create or switch branches unless explicitly requested.
RAW_BUFFERClick to expand / collapse

Summary

When starting a new Codex task from Codex Mobile / ChatGPT mobile connected to a Mac running the Codex App, I can choose the project and adjust model / permissions, but I do not see a way to choose:

  • Local vs Worktree execution
  • the starting Git branch
  • an existing or permanent worktree target

This is a workflow and safety problem for local development. From mobile, it is easy to accidentally start work against the primary local checkout, for example main, instead of an isolated worktree or intended feature branch.

Why this matters

The mobile remote-control feature is most useful when I am away from the Mac and want to start or supervise work asynchronously. In that context, I often cannot easily inspect the host machine’s current Git state before sending the first prompt.

For serious repositories, the execution target is not a cosmetic setting. Before an agent starts editing files, I need to know and control:

  • which checkout it will modify
  • whether it will use an isolated Codex-managed worktree
  • which branch or commit the worktree starts from
  • whether the selected project is my foreground local checkout, a permanent worktree, or some other workspace

Prompt-level guardrails like “run git status first and stop if unexpected” help, but they are weaker than first-class UI selection and confirmation. The unsafe case is that a mobile-created thread starts in a checkout I did not intend, and I only notice after files have already changed.

Steps to reproduce

  1. On a Mac, open the Codex App and enable mobile remote control.
  2. On an iPhone, open ChatGPT > Codex mobile and connect to that Mac host.
  3. Start a new thread from the mobile UI.
  4. Select a local Git repository project on the host.
  5. Open the available controls in the composer.

Actual behavior

The mobile new-thread UI lets me select the project and configure model / reasoning / permissions, but I do not see controls equivalent to the desktop Codex App worktree flow:

  • no Local vs Worktree selector
  • no starting branch selector
  • no explicit confirmation of the effective checkout / worktree / branch that will receive edits

The UI therefore does not make it clear whether the task will run in my primary local checkout or in an isolated worktree.

Expected behavior

Codex Mobile should provide parity with the Codex App new-thread workflow for Git-backed projects, or clearly state that the mobile flow is limited.

At minimum, before submitting a mobile-created task, the UI should let the user choose:

  1. Local checkout vs Worktree
  2. Starting branch for worktree creation
  3. Existing / permanent worktree when the host has one registered as a project

It should also show a clear pre-submit execution target, for example:

  • project path or repo root
  • current branch, detached HEAD, or selected base branch
  • whether the run will use Local or a Codex-managed worktree
  • the worktree path when known

A conservative option would be to require an explicit confirmation when starting from mobile against a protected or primary branch such as main / master.

Related documentation / context

The Remote Connections docs say mobile can start new threads in projects on the connected host:

https://developers.openai.com/codex/remote-connections

The Worktrees docs describe the desktop flow where a new thread can select Worktree and choose the starting branch:

https://developers.openai.com/codex/app/worktrees

From a user’s point of view, these two features naturally overlap: if mobile can start a new local task on the Mac host, it should also expose the same Git target controls that make desktop local tasks safe.

Possibly related issues, though not exact duplicates:

  • #19681 asks for iOS/Mac session continuity including current branch/session context.
  • #16531 covers cases where the thread UI can drift from the actual worktree / branch context.
  • #20757 requested broader mobile companion support for local, worktree, and cloud tasks.

Workarounds

Current workaround is to manually create a dedicated worktree on the Mac host and register it as a separate project, then select that project from mobile. I also have to add prompt instructions such as:

First run git status --short --branch and git rev-parse --show-toplevel. If the branch/path is not the expected worktree, stop and ask before editing. Do not create or switch branches unless explicitly requested.

This works only as a discipline, not as a safe product affordance.

Requested outcome

Please add first-class branch / worktree targeting to Codex Mobile remote new-thread creation, or document the current limitation explicitly so users understand that mobile-created local tasks may start in the selected project’s current checkout.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Codex Mobile should provide parity with the Codex App new-thread workflow for Git-backed projects, or clearly state that the mobile flow is limited.

At minimum, before submitting a mobile-created task, the UI should let the user choose:

  1. Local checkout vs Worktree
  2. Starting branch for worktree creation
  3. Existing / permanent worktree when the host has one registered as a project

It should also show a clear pre-submit execution target, for example:

  • project path or repo root
  • current branch, detached HEAD, or selected base branch
  • whether the run will use Local or a Codex-managed worktree
  • the worktree path when known

A conservative option would be to require an explicit confirmation when starting from mobile against a protected or primary branch such as main / master.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex Mobile remote new thread cannot choose worktree or starting branch