GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode-claimant: recovery rule for bound sessions that never received their prompt (#4758) by dezren39 · Pull Request #5338 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 4, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Fixes #4758

Phase 3 of design #4912 (claimant session contract): a bound session that never received its prompt previously had no recovery path — not a launch candidate, resend already spent, gone-session rule inapplicable while the empty session existed.

poll.py (read-only discovery)

  • New stuck_bound output (top-level + per-queue): claimed opencode-lane tasks bound to a root session with no terminal marker (time.idle/outcome), NOT in the server's active set, silent for at least ACTIVE_WINDOW_MS (the existing 30-minute zombie window — one threshold, not two), and with the task's lease expired. Every unknown fails closed (unreadable active set, missing session, unparseable lease all veto). Entries carry attempts/max_attempts so the claimant can pick the branch. Zero-message verification is deliberately NOT claimed from the session list — the claimant must verify it before acting.
  • is_candidate now accepts stage launch_failed alongside handed_off as a recorded yield, so a task reclaimed by the recovery rule becomes a launch candidate again instead of being stranded by its own recovery checkpoint.

prompt.md (claimant contract)

  • Step 1 gains the recovery rule: verify zero messages (any message/marker/activity vetoes — a live, progressing session is never reclaimed) → DELETE the verified zero-message session per-id FIRST (a failed or unverifiable delete keeps the binding, fail closed) → attempts remain: checkpoint launch_failed as the task's worker, clearing session_id (explicit null) and keeping the prior id in the audit field launch_failed_session_id; attempts exhausted: terminally fail with the bound session id in --execution. The checkpoint/fail progress record is the notification Tend's fleet-watchdog reads — no new channel.

Tests — python3 -m unittest pm-stack/opencode-claimant/test_poll.py: 36 pass (15 new: stuck-bound classifier vetoes, lease parsing, launch_failed candidacy). Live poll.py run from this branch emits stuck_bound correctly (0 rows at run time).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
developing-today[bot]
opencode-claimant: recovery rule for bound sessions that never receiv…
05d887d
…ed their prompt (#4758)

Phase 3 of design #4912. poll.py now surfaces stuck_bound candidates (bound root session, no terminal marker, not in the server active set, silent >= ACTIVE_WINDOW_MS, task lease expired; fail closed on any unknown) and accepts the launch_failed yield stage so a reclaimed task becomes a launch candidate again. prompt.md gains the operative rule: verify zero messages, DELETE the empty session first (failed delete keeps the binding, fail closed), then reclaim to unbound via a launch_failed checkpoint that clears session_id and keeps the prior id in launch_failed_session_id, or terminally fail at the attempts cap with the session id in --execution. The task progress record is the watchdog notification. 36 unittest cases pass (15 new).
@dezren39
dezren39 requested a review from a team as a code owner November 4, 2026 07:17
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5391a448-f2b2-4f7a-ae0a-ebe44c81759b
Commits

Reviewing files that changed from the base of the PR and between 62aba6b and c55557f.

Files selected for processing: 6
  • pm-stack/opencode-claimant/README.md
  • pm-stack/opencode-claimant/migration-0022.sql
  • pm-stack/opencode-claimant/poll.py
  • pm-stack/opencode-claimant/prompt.md
  • pm-stack/opencode-claimant/test/install.test.mjs
  • pm-stack/opencode-claimant/test_poll.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T08:24:03.379656Z c55557f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 4, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05d887df71

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/opencode-claimant/prompt.md Outdated
Comment on lines +89 to +93
`worker_id` — `checkpoint <id> --worker <worker_id> --stage
launch_failed` with progress that CLEARS `session_id`
(an explicit `"session_id": null`) and
keeps the prior id in the audit field `launch_failed_session_id`
(plus `launch_failed_at` and the reason). Stage `launch_failed`

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 4, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Clear the ledger binding before making recovered tasks launchable

For a stuck task with attempts remaining, this recovery clears progress.session_id but leaves the deleted session's ID in agent.repo_task_lane_ledger.session_id. The normal launch path calls bind_repo_task_lane_session, whose guard in pm-stack/opencode-claimant/migration-0021.sql:83–84 rejects a different existing ledger binding. Consequently, the next fire creates a replacement session but cannot bind or prompt it, leaving the task stranded and potentially creating additional empty sessions on subsequent fires. Recovery needs to clear both binding stores safely before restoring launch eligibility.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 4, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in c55557f. Migration 0022 adds a recovery mode to bind_repo_task_lane_session that locks the task and ledger rows, compares the prior session ID in both stores, and atomically clears both while recording launch_failed/audit data and consuming an attempt. The claimant calls it only after the prior session is verified absent (or verified empty and deleted); mismatches fail closed. Normal binding remains guarded, and the contract test covers the two-store compare-and-clear.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39 dezren39 mentioned this pull request Nov 4, 2026
opencode-claimant: bound session that never received its prompt (task 6722) has no recovery path — stuck claimed forever #4758
Closed
@github-actions github-actions Bot assigned dezren39 Nov 4, 2026
developing-today[bot] added 2 commits November 4, 2026 02:20
developing-today[bot]
Fix claimant recovery ledger binding
89e951c
developing-today[bot]
Merge branch 'main' of https://github.com/developing-today/code into …
c55557f
…queue/9309-4758-claimant-recovery
@dezren39
dezren39 merged commit ee58657 into main Nov 4, 2026
2 of 3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/9309-4758-claimant-recovery branch November 4, 2026 10:26
@dezren39 dezren39 mentioned this pull request Nov 8, 2026
design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912
Closed
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

opencode-claimant: bound session that never received its prompt (task 6722) has no recovery path — stuck claimed forever

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.