fix(telegram): keep killed-session resume guidance task-scoped (#2109) - #2110
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #2109
--resume 8b8e10af-0776-4706-aae6-72c95bebbd73 failed
konard
marked this pull request as ready for review
July 27, 2026 14:35
Contributor
Author
Working session summaryImplemented and finalized the fix for issue #2109.
No upstream Codex issue was filed: official Codex documentation confirms the resume syntax, while the evidence showed Hive Mind supplied an unrelated session ID. PR: #2110 This summary was automatically extracted from the AI working session output. |
Contributor
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (580.6K + 19.1M cached) input tokens, 59.9K output tokens, $27.561656 cost 🤖 Models used:
📎 Log file uploaded as Gist (7178KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Contributor
Author
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2109.
Problem
A killed
/codextask advertised8b8e10af-0776-4706-aae6-72c95bebbd73as resumable even though its actual Codex thread was019f980e-a0fd-75e1-907b-9167319836ad.The last real marker was about 3.99 MB before EOF. The completion monitor searched only the final 256 KiB, then selected the newest UUID-named log from start-command's shared Docker directory. That file belonged to another task. The retry therefore failed with
no rollout found.The monitor also rendered terminal
solvesyntax because immediate, queued, isolated-queued, and durable session paths did not preserve the actual Telegram alias.Solution
commandAliasand original arguments through immediate execution, both queue backends, session tracking, and bot restarts/solve,/claude, or/codexaccording to the command the user actually sentdocs/case-studies/issue-2109/Reproduction and regression coverage
The production-shaped fixture creates:
Session IDmarker is more than 256 KiB before EOF;/codex; andBefore the implementation, the focused suite failed all 14 original assertions: it selected the unrelated thread, emitted
solve, and lost alias/argument context in every launch path.tests/test-issue-2109-killed-resume.mjsnow passes 18/18 assertions, including all requested Telegram aliases, queue/restart persistence, and a marker split at a scan boundary. Existing issue #1927 resume coverage also passes 31/31.The resulting guidance for the reported task is attributable and Telegram-native:
Case study and research
Codex officially supports
codex exec resume <SESSION_ID>. Similar upstream reports concern missing rollout materialization, but this incident is different: the first log proves that the advertised8b8e…ID never belonged to the task, and the retry log proves Hive Mind supplied it. Codex rejected the unknown ID correctly, so no upstream issue was filed.Incident screenshots
These are the two original Telegram states from the issue. The change affects generated notification content rather than layout; the post-fix notification text is verified through the real completion monitor in the automated regression above.
Verification
--resume 8b8e10af-0776-4706-aae6-72c95bebbd73failed #2109 focused regression — 18/18 passedkilled#1927 resume regression — 31/31 passedorigin/mainis an ancestor of the final branch commits