Codex App: add a safe Pull latest action for the active branch
What variant of Codex are you using?
Codex App
What feature would you like to see?
Please add a first-class, safe Pull latest / Update branch action for the currently selected branch in Codex App.
Today, when working in the desktop app, the branch/workspace UI shows Git context, diffs, and PR-related state, but there does not appear to be a direct app-level way to update the current branch from its upstream remote before continuing work. Users either need to leave Codex and run Git manually, or ask the agent to do it through a chat/tool workflow.
Desired behavior:
- Show whether the active branch is ahead/behind/diverged from its upstream, for example
mainvsorigin/mainorfeature/foovsorigin/feature/foo. - Provide a visible action such as Pull latest, Update from remote, or similar near the branch/Git controls.
- Fetch before deciding what action is safe.
- If the branch can be fast-forwarded, update it with a safe operation such as
git pull --ff-only. - If the worktree has uncommitted changes, staged files, untracked files that may conflict, local-only commits, or branch divergence, stop and explain the situation instead of silently merging/rebasing.
- Offer clear next steps for unsafe states, such as commit/stash/cancel, or ask the user whether they want a merge or rebase when the branch has diverged.
- After a successful update, refresh the app's branch, diff, PR, and worktree status without requiring a restart or manual terminal check.
Why this would be useful:
- Reduces stale-branch work. Codex may spend time fixing code that has already changed upstream, or create changes on top of an outdated base.
- Reduces merge conflicts and noisy diffs before PR creation or review.
- Keeps the user inside the Codex App for a routine Git maintenance action that is directly related to the branch context the app already displays.
- Helps users who are not Git experts understand whether it is safe to pull, rather than asking them to infer the right command from terminal state.
- Makes long-running Codex sessions safer: before asking Codex to continue, review, or open a PR, the user can bring the branch up to date deliberately.
- Aligns with the contribution guidance that feature proposals should start as issues, and with the PR guidance that branches should be up to date before review.
This should be app-first because the missing piece is the desktop branch/Git UI action, but the underlying status model could also help other Codex surfaces that show branch state.
Additional information
I searched for related open issues before filing. The closest matches I found were adjacent but not exact duplicates:
- openai/codex#19787 asks for a broader repo hygiene agent/mode that can reason about dirty worktrees, divergence, and whether it is safe to pull/push. This request is narrower: a concrete branch update action in the Codex App UI.
- openai/codex#18961 asks to create a worktree based on a remote branch. This request is about updating the current tracked branch from its upstream.
- openai/codex#16782 and openai/codex#17840 mention automations/prompts that try to pull latest, but those are about automation/network failure rather than a manual app-level branch update control.
- openai/codex#15681 and openai/codex#23809 cover base branch selection/diff comparison issues, which are related to Git context but not to pulling the latest upstream branch.
I can attach a screenshot of the current UI state in a follow-up comment if it helps show where the action would fit.