Skip to content

fix(kanban): check GitHub PR state before applying active_pr respawn guard - #29492

Closed
nasymonk wants to merge 1 commit into
NousResearch:mainfrom
nasymonk:fix/kanban-active-pr-guard
Closed

fix(kanban): check GitHub PR state before applying active_pr respawn guard#29492
nasymonk wants to merge 1 commit into
NousResearch:mainfrom
nasymonk:fix/kanban-active-pr-guard

Conversation

@nasymonk

Copy link
Copy Markdown

Summary

The active_pr respawn guard previously treated any GitHub PR URL in a recent task comment as evidence of an active PR, blocking the task from being re-spawned for 24 hours — even if the PR was already closed/merged.

This left operators stuck with respawn_guarded {"reason": "active_pr"} on a loop, with no supported recovery path except waiting 24h or manually editing SQLite.

Fix

  • Extract the PR URL and call the GitHub API to check if the PR is still open
  • Closed/merged PRs → skip the guard → task can be re-spawned
  • On API errors (rate-limit, network) → fall back to safe "assume active" behavior

Testing

Verified against the exact scenario from #29458:

Fixes #29458

…guard

The respawn guard previously treated any GitHub PR URL in a recent task
comment as evidence of an active PR, blocking the task from being
re-spawned for 24 hours — even if the PR was already closed/merged.

Now checks the GitHub API to verify PR state. Closed/merged PRs skip
the guard so operators aren't stuck waiting 24h after closing a stale PR.

On API errors (rate-limit, network), falls back to the safe assume
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard labels May 20, 2026
@dannyfranca

Copy link
Copy Markdown

Cross-linking #46204 since it appears to cover the same active_pr respawn-guard area.

If #29492 was an earlier or partial attempt, #46204 is intended to cover the closed/stale PR recovery case plus an explicit operator-clear path. Happy to align or supersede if that keeps the fix easier to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Kanban active_pr respawn guard has no operator clear path and ignores closed PRs

3 participants