Codex Desktop native GitHub UI does not refresh in the background
Summary
Codex Desktop's native GitHub / PR UI appears to fetch on startup, reset, or route mount, but it does not keep GitHub state refreshed while Codex is in the background.
This makes the native GitHub surface stale during normal multi-window workflows where Codex is open but not focused.
Environment
- Codex Desktop:
26.623.70822 - Build:
4559 - App/server CLI version observed in local thread metadata:
0.142.4 - macOS: arm64 desktop
- Installed app path inspected:
/Applications/Codex.app
Expected behavior
Native GitHub state should continue refreshing in the background, including:
- PR board data
- PR body
- PR comments
- PR checks
- thread/repo Git metadata where applicable
The user should not need to reset, reload, or reopen the native GitHub UI to see current state.
Actual behavior
The native GitHub UI refreshes on startup/reset/mount, but then stale data remains visible while Codex is open in the background. Returning to the app or resetting/remounting can make it sample fresh state again.
Local Git itself is correct. The stale state appears to be Codex's cached/thread/UI metadata, not the repository.
Investigation notes
I inspected the installed Codex app bundle and local read-only state. The likely issue is that native GitHub refresh is implemented as renderer-page polling rather than a durable app-level background refresh.
Evidence from the bundled app:
- The PR board uses
gh-pr-boardwithintervalMs: THIRTY_SECONDSandstaleTime: THIRTY_SECONDS. - PR detail queries such as
gh-pr-comments,gh-pr-body, andgh-pr-checksuse interval polling as well. - The shared query runtime maps
intervalMsto React QueryrefetchInterval. - The React Query polling path is focus-gated unless
refetchIntervalInBackgroundis set. - The
gh-pr-*query configs I inspected did not setrefetchIntervalInBackground. - Codex also has local Git watcher invalidations for
git/*query keys such asstatus-summaryandbranch-diff-stats, but I did not find those watcher invalidations wired togh-pr-board,gh-pr-comments,gh-pr-body, orgh-pr-checks.
So the current design appears to depend on focus/visibility-sensitive renderer polling, while the expected behavior is background refresh independent of whether the PR page is foregrounded.
Why this is likely not local Git corruption
Live Git commands report the current branch and HEAD correctly. Separately, older Codex thread rows can retain old git_sha values after the repo has moved forward, while newer thread rows sample the current SHA. That suggests stale Codex metadata/UI cache rather than a broken local repository.
Suggested fix direction
Short-term:
- Set
refetchIntervalInBackground: trueon the native GitHub PR query configs where background refresh is expected. - Ensure the main renderer/webContents is not throttling the required refresh loop if the refresh remains renderer-owned.
Longer-term:
- Move GitHub refresh into the Codex app-server/main-process lifecycle and push/invalidate renderer state from there, so refresh does not depend on a mounted/focused renderer page.
- Add invalidation/update coverage for thread Git metadata when repo HEAD changes.
Validation that would confirm
Open the Codex native PR board, observe gh-pr-board / related gh-pr-* requests while foregrounded and then while Codex is backgrounded for more than 60 seconds. If requests stop until reset/remount/focus, that confirms the focus/background polling issue.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Nice investigation, thank you! It seems odd to me that this issue is not talked about more widely, given the size of Codex' user base.
Which makes me wonder if there is something local to us/our Git(hub) setup that drives this bug. I couldn't find anything and entirely reinstalling Codex including caches etc. did not fix it.
It's just curious that this isn't a major bug popping up everywhere on X. 🤔
Note: I'm not seeing this issue at all with Conductor, so it would point towards Codex being the culprit, as you identified.
@behrendtio Thank you! It has been driving me insane lately!
I spent a good few hours trying to figure out what was actually causing it to happen, I still feel like there must be something to do with our installs 🤔
Because I have looked everywhere and cannot find many people with the same issue, there are a few, but not many at all! I get it with none of my other apps, like Cursor etc!
Can confirm the issue still persists on the latest version, with the new UI.
The new pull request panel works, but the actual project/repo chat UI panel is still stale and does not update.
Yep, can also confirm as of today, Codex version 26.707.72221, the PR panel updates but the small UI panel does not:
<img width="917" height="509" alt="Image" src="https://github.com/user-attachments/assets/36099ff6-5c7c-47f1-b757-63481c528fef" />