# Codex asks for login everytime i use it for github operations

**URL:** <https://community.openai.com/t/codex-asks-for-login-everytime-i-use-it-for-github-operations/1390839>\
**Category:** Codex\
**Tags:** codex, codex-cli\
**Created:** [August 17, 2026, 10:58am UTC](https://community.openai.com/t/codex-asks-for-login-everytime-i-use-it-for-github-operations/1390839 "2026-08-17T10:58:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nasrul.huda](https://avatars.discourse-cdn.com/v4/letter/n/65b543/32.png) [@nasrul.huda](https://community.openai.com/u/nasrul.huda)\
**Post date:** [August 17, 2026, 10:58am UTC](https://community.openai.com/t/codex-asks-for-login-everytime-i-use-it-for-github-operations/1390839/1 "2026-08-17T10:58:03Z")

</div>

I use the CLI version of the ChatGPT Codex. Everytime i ask it to perform any github operation involving the `gh` CLI and not git` CLI like raising a PR. It asks me to login again and again. Maybe because it is working inside some sort of Sandbox. It is not the case in other agentic CLIs like Claude Code, Grok CLI, OpenCode.

---

<div class="post-metadata">

**Author:** ![OpenAI\_Support](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/openai_support/32/561845_2.png) [@OpenAI\_Support](https://community.openai.com/u/OpenAI_Support)\
**Post date:** [October 16, 2026, 5:57pm UTC](https://community.openai.com/t/codex-asks-for-login-everytime-i-use-it-for-github-operations/1390839/2 "2026-10-16T17:57:12Z")

</div>

Hey @nasrul.huda, sorry for the late reply!

Codex’s [sandbox documentation](https://learn.chatgpt.com/docs/sandboxing) and [shell environment guidance](https://developers.openai.com/codex/config-advanced#shell-environment-policy) explain how command access and inherited environment settings work, though we can’t confirm whether either caused the prompts you reported.

If this happens again on the latest Codex CLI version, please email [support@openai.com](mailto:support@openai.com) so Support can take a closer look privately.

-Sanket

---

<div class="post-metadata">

**Author:** ![SanCan](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@SanCan](https://community.openai.com/u/SanCan)\
**Post date:** [October 16, 2026, 5:57pm UTC](https://community.openai.com/t/codex-asks-for-login-everytime-i-use-it-for-github-operations/1390839/3 "2026-10-16T17:57:17Z")

</div>


