You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex duplicate GitHub comment posting when gh issue comment action is retried #27283
CLIIssues related to the Codex CLIbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)tool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
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?
Ask Codex to execute a single gh issue comment <id> --repo <owner/repo> --body ....
In the same run, if tool execution timing is uncertain (timeout/retry path), it can issue the same command twice.
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.
A possible implementation direction here is to treat side-effecting shell commands as “unknown outcome” after a timeout instead of immediately reissuing them.
For gh issue comment specifically, a practical guard could be:
before retrying the same command, query the target issue’s latest comments;
compare author + normalized body, or a short body hash if the original body is still available in the tool-call metadata;
if a matching recent comment exists, surface the URL as the result instead of running the command again.
The broader fix may be a generic idempotency layer for known side-effecting commands, but even a narrow “verify-before-retry for GitHub comments” path would prevent the highest-impact version of this bug without changing normal retry behavior for read-only commands.
CLIIssues related to the Codex CLIbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)tool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
Activity
SylvainWinning commentedon Jun 10, 2026
A possible implementation direction here is to treat side-effecting shell commands as “unknown outcome” after a timeout instead of immediately reissuing them.
For
gh issue commentspecifically, a practical guard could be:The broader fix may be a generic idempotency layer for known side-effecting commands, but even a narrow “verify-before-retry for GitHub comments” path would prevent the highest-impact version of this bug without changing normal retry behavior for read-only commands.