codex - 💡(How to fix) Fix Shell tool appears stuck when a completed git push output is not surfaced promptly

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…

In Codex CLI, a git push command appeared to hang for several minutes even though the command eventually completed successfully. The UI showed the command as still running, but when the session was polled later, the push output appeared immediately and included the successful remote branch creation message.

This made it look like git push or approval handling was stuck, while the underlying process may already have completed or was waiting without visible progress.

Error Message

  • Optionally warn after N seconds with: “Command is still running; last output was X seconds ago.”

Root Cause

For commands like git push, git fetch, or git commit, delayed output can make users think the agent is stuck or doing unintended work. This is especially confusing when previous commands also involved approval prompts.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

v0.130.0

What subscription do you have?

pro 20x

Which model were you using?

gpt-5.5

What platform is your computer?

Darwin 25.4.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

iterm2

Codex doctor report

What issue are you seeing?

Summary

In Codex CLI, a git push command appeared to hang for several minutes even though the command eventually completed successfully. The UI showed the command as still running, but when the session was polled later, the push output appeared immediately and included the successful remote branch creation message.

This made it look like git push or approval handling was stuck, while the underlying process may already have completed or was waiting without visible progress.

Environment

  • OS: macOS
  • Shell: zsh
  • Repo command: git push -u origin fix/video-color-metadata
  • Network target: GitHub over HTTPS

What Happened

  1. Codex ran:

    git push -u origin fix/video-color-metadata
  2. The tool returned a running session instead of final output.

  3. The UI appeared stuck for several minutes.

  4. After polling the session, the command exited successfully and printed:

    remote: remote: Create a pull request for 'fix/video-color-metadata' on GitHub by visiting: remote: https://github.com/.../pull/new/fix/video-color-metadata remote: To https://github.com/...

    • [new branch] fix/video-color-metadata -> fix/video-color-metadata branch 'fix/video-color-metadata' set up to track 'origin/fix/video-color-metadata'.

Expected Behavior

If the process is still running, Codex should surface that clearly and continue streaming/polling progress where possible.

If the process has already completed, the final output should be surfaced promptly without requiring a delayed manual poll.

Actual Behavior

The command appeared stuck for several minutes, causing confusion about whether:

  • the shell command was still running,
  • GitHub authentication/network was blocked,
  • the approval system was waiting,
  • or the tool session had completed but output was not displayed.

Why This Matters

For commands like git push, git fetch, or git commit, delayed output can make users think the agent is stuck or doing unintended work. This is especially confusing when previous commands also involved approval prompts.

Suggested Improvement

  • Show a heartbeat/status message for long-running shell sessions.
  • Automatically poll running shell sessions more frequently after commands that usually complete quickly, such as git push.
  • Distinguish clearly between:
    • approval review pending,
    • process still running,
    • process completed but output not yet surfaced.
  • Optionally warn after N seconds with: “Command is still running; last output was X seconds ago.”

What steps can reproduce the bug?

use the auto-mode

What is the expected behavior?

should have take like 10 secs, but it took 4+minutes for the approval

Additional information

No response

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…

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 Shell tool appears stuck when a completed git push output is not surfaced promptly