Codex duplicate GitHub comment posting when gh issue comment action is retried
What version of Codex CLI is running?
0.139.0
What subscription do you have?
Not provided for this report.
Which model were you using?
Not provided / not model-specific.
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What terminal emulator and version are you using (if applicable)?
Windows Terminal + PowerShell (pwsh.exe in Codex environment).
Codex doctor report
not available
What issue are you seeing?
When I ask Codex to post a single GitHub issue comment via gh, it can be posted twice.
Observed pattern:
- I asked for one
gh issue comment ...action. - The first call had an uncertain execution outcome (timeout/network uncertainty).
- The action retried.
- GitHub ended up receiving duplicate comment(s) with the same body.
I recently reported an unrelated plan-mode issue and noticed this behavior while following up; after retry behavior, duplicates were created for the same intended single post.
What steps can reproduce the bug?
1) Ask Codex to execute a single gh issue comment <id> --repo <owner/repo> --body ....
2) In the same run, if tool execution timing is uncertain (timeout/retry path), it can issue the same command twice.
3) Confirm in GitHub UI that two identical comments were created even though request intent was one comment.
Please include if possible:
- Thread id:
019e38d6-eeb8-7680-ab3c-ee4272a17c2a - Desktop version currently observed: 26.608.12217
What is the expected behavior?
A single requested action should create exactly one GitHub comment, with no dedupe/retry posting.
Additional information
This happens after an update/restart cycle and appears to be a non-deterministic state/acknowledgement issue. It is hard to distinguish success/failure when a command times out, so adding idempotency guard before reissue would help prevent duplicates.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗