[codex] Recover unavailable OpenCode sessions (BLO-18012) - #1245
Merged
Conversation
Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
🔗 Paperclip issue: BLO-18012 |
1 similar comment
|
🔗 Paperclip issue: BLO-18012 |
kkroo
marked this pull request as ready for review
August 10, 2026 19:32
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: 9fd70e9
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- The retry lineage, bounded attempts, and stale deferred-wake checks preserve task-scoped recovery semantics across normal dispatch and startup reconciliation.
- Parser coverage separates structured OpenCode session errors from incidental text, reducing false reset triggers.
Recommended Action
- Ready to merge once the required checks pass.
allyblockcast
approved these changes
Aug 10, 2026
allyblockcast
left a comment
Collaborator
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: 9fd70e9
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- The retry lineage, bounded attempts, and stale deferred-wake checks preserve task-scoped recovery semantics across normal dispatch and startup reconciliation.
- Parser coverage separates structured OpenCode session errors from incidental text, reducing false reset triggers.
Recommended Action
- Ready to merge once the required checks pass.
13 tasks
13 tasks
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.
Thinking Path
Linked Issues or Issue Description
Supersedes #926.
Refs #926 and BLO-18012.
No independently authored successor or equivalent implementation was found. #1103, already merged, supplies the related fresh-session prompt only; this PR adds the typed heartbeat recovery and startup-reconciliation lifecycle absent from current
master.What Changed
Session unavailablefailures assession_unavailablewhile preserving the existing fresh-session attempt.Verification
Passed locally after rebasing onto
08b6f449:pnpm --filter @paperclipai/adapter-opencode-local typecheckpnpm --filter @paperclipai/server typecheckpnpm exec vitest run --no-file-parallelism packages/adapters/opencode-local/src/server/parse.test.ts— 4/4 passedpnpm --filter @paperclipai/server exec vitest run --no-file-parallelism src/__tests__/recovery-classifiers.test.ts src/__tests__/heartbeat-retry-scheduling.test.ts src/__tests__/heartbeat-stale-queue-invalidation.test.ts src/__tests__/recovery-stale-issue-lock-sweep.test.ts src/__tests__/heartbeat-process-recovery.test.tsgit diff --check origin/master...HEADThe server suite emitted the known optional external-adapter warning for the absent
taalas-chatjimmy-wrapper; it exited successfully.pnpm-lock.yamlis unchanged.Risks
Medium: this changes recovery timing and session-reset coordination around failed OpenCode runs. The main risk is an incorrectly replayed or suppressed retry; bounded attempts, retry identity, supersession checks, and focused lifecycle tests cover those paths. No migration, API change, or healthy-session behavior change is included.
Model Used
OpenAI Codex (GPT-5), using GitHub inspection, isolated local code changes, and focused TypeScript/Vitest verification.
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template