Codex no longer can run git push but it can before

Resolved 💬 7 comments Opened Jan 30, 2026 by kayuling Closed Jan 31, 2026
💡 Likely answer: A maintainer (guidedways, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.92.0

What subscription do you have?

ChatGPT Plus

Which model were you using?

gpt-5.2-codex xhigh

What platform is your computer?

Darwin 24.6.0 arm64 arm

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

Antigravity's Terminal

What issue are you seeing?

ICommands I ran in the Codex sandbox:

  1. git push

Result:
fatal: unable to access {deleted my real repo name}: Could not resolve host: github.com

I also confirmed:

  • git remote -v shows the correct GitHub URL.
  • git status -sb shows the branch is tracking origin/paywall-project-details.

So the push failed due to the sandbox not reaching github.com, not because of the repo or branch.

What steps can reproduce the bug?

Uploaded thread: 019c0e2e-bdf3-70a3-b5e5-

What is the expected behavior?

should be able to git push for me

Additional information

_No response_

View original on GitHub ↗

7 Comments

guidedways contributor · 5 months ago

Just guessing here - try adding this to .codex/config.toml

web_search = "live"

Does that work for you?

swordfish444 contributor · 5 months ago

…This looks like expected behavior under the sandbox: read-only / workspace-write intentionally block network access (see codex-rs/README.md “Selecting a sandbox policy via --sandbox”).

So git push inside the sandbox will fail DNS/egress unless you run without sandboxing, e.g. codex --sandbox danger-full-access … (ideally inside a container/VM), or just do the git push from your host shell outside Codex.

Also, web_search = "live" only affects the model’s web_search tool — it won’t grant network to shell commands.

@etraut-openai likely close as “by design/docs” unless the reporter was already using danger-full-access and still can’t resolve github.com.

kayuling · 5 months ago

Web search functionality is working as expected and it can fetch websites and do web search with no issue but just failing when running git push.

Codex was able to run push command in the past few days but it started to fail a few hours ago.
Understood that within sandbox it won't have access to github.com.

etraut-openai contributor · 5 months ago

I don't think this is related to web search.

You suggested that this might be a recent regression. I'm not aware of any changes that we made that would explain this. Could you confirm that if you downgrade to the previous release the problem goes away?

kayuling · 5 months ago

Unfortunately no longer able to reproduce the bug now. Codex can run git push now. Thanks for everyone.

sjorsverhoef · 3 months ago

experiencing this again

williamukoh · 2 months ago

Experiencing same too. It means for everything environment created by Codex, you'll need to configure Personal Access Tokens