Skip to content

fix: retire a room's ACP process after it refuses to open a session - #762

Closed
bandzalkin wants to merge 2 commits into
mainfrom
fix/acp-recycle-failed-session
Closed

bandzalkin wants to merge 2 commits into
mainfrom
fix/acp-recycle-failed-session

Conversation

@bandzalkin

@bandzalkin bandzalkin commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Retire a room's ACP runtime when its agent process refuses session setup, so the next message reaches a fresh process instead of repeatedly hitting the same wedged process. Refresh onto upstream 97f83301f6506f5a8cddac8d1b57e73b7d992f87 without changing the original ownership contract.

Changes

  • A session setup failure other than ACPConfigError retires the room's runtime before propagating the original turn failure; a later turn can reload the persisted session in a fresh process.
  • Retire only while the failed setup still owns the room. Under one session-lock hold, avoid tearing down a newer pending setup or published session.
  • Keep Cursor's parked-decision cleanup inside the room-retirement hook. Local Band MCP startup errors and configuration-error handling retain their existing boundaries.
  • Preserve session-refusal and stale-owner interleaving regressions; add an Unreleased changelog entry, leaving 5.1.0 unchanged.

Testing

Fresh current-main ACP/converter/shared-backend/conformance/Strands affected suite: 1778 passed, 69 skipped, 11 warnings, exit 0. uv sync --all-packages --locked --extra dev and all five pre-commit hooks passed.
Published head adds only the required changelog entry to tested code head 72585ebb8ed90102015f0872ec309d07c1474469.
No live-service or native-provider acceptance is claimed; remote CI is separate.

Commit range and merge order

Complete prerequisite range: 97f83301f6506f5a8cddac8d1b57e73b7d992f87..c18df71c7584b22a7babf898019fe37489ceaa10.
Merge #762 before the stacked Copilot room-scoped MCP resolver PR. This lane is independent of #763 and the Codex/Claude stack. Related: #709.

bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 9, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 9, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 9, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 9, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 10, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 10, 2026
@AlexanderZ-Band
AlexanderZ-Band force-pushed the fix/acp-recycle-failed-session branch from 9f73170 to 7efb9e4 Compare October 10, 2026 06:21
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 10, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 10, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 10, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 10, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 11, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 11, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 11, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 11, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 11, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 11, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 11, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 11, 2026
Refresh the refused-session retirement prerequisite onto cd6bde7 without importing its inherited stack. Retain a newer setup's process and run Cursor retirement state cleanup inside the shared ownership lock. Preserve current upstream busy-session and ACP prompt/tool behavior.

Source base: 55c70f2
Source head: 7efb9e4 (fix/acp-recycle-failed-session)
Accepted prerequisite role: f1558b3
Conflicts: none; current Cursor session unbinding retained.
Verification: deferred to integration owner; no checks run.

Upstream-PR: #762
@bandzalkin
bandzalkin force-pushed the fix/acp-recycle-failed-session branch from 7efb9e4 to c18df71 Compare October 13, 2026 20:35
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 14, 2026
Source-Base: 97f8330
Source-Head: c18df71
Applied-Over: 851c9c6
Conflict-Notes: None; exact source delta, excluding CHANGELOG.md and FORK-CHANGES.md
Upstream-PR: band-ai#762
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 14, 2026
Source-Base: 97f8330
Source-Head: c18df71
Applied-Over: 851c9c6
Conflict-Notes: None; exact source delta, excluding CHANGELOG.md and FORK-CHANGES.md
Upstream-PR: band-ai#762
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 15, 2026
Source-Head: 9e84760b4cb44105eeb922832e980fe109f35641
Applied-Over: 2a98142
Conflict-Notes: Watchdog probe keeps its try/finally over band-ai#789's TurnOutcome.ADVANCED result; adds band-ai#762's wedged-process scenario to roomownership/test_recovery.py as the probe proving band-ai#709 supersedes it; ledger lists the f807d62 port
Always replay; fork process and coverage dispositions only.
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 15, 2026
Source-Head: 9e84760b4cb44105eeb922832e980fe109f35641
Applied-Over: 8e06491
Conflict-Notes: Watchdog probe keeps its try/finally over band-ai#789's TurnOutcome.ADVANCED result; adds band-ai#762's wedged-process scenario to roomownership/test_recovery.py as the probe proving band-ai#709 supersedes it; ledger lists the f807d62 port
Always replay; fork process and coverage dispositions only.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 15, 2026
Source-Head: 9e84760b4cb44105eeb922832e980fe109f35641
Applied-Over: 8e06491
Conflict-Notes: Watchdog probe keeps its try/finally over band-ai#789's TurnOutcome.ADVANCED result; adds band-ai#762's wedged-process scenario to roomownership/test_recovery.py as the probe proving band-ai#709 supersedes it; ledger lists the f807d62 port
Always replay; fork process and coverage dispositions only.
@bandzalkin

Copy link
Copy Markdown
Contributor Author

Closing: superseded by #709. Merged #709 retires a room's ACP process through its retained owner when session setup fails (_fail_turn → room.retained.recover), so the next turn reaches a fresh process. Checked on main: a generic ACP room and a Cursor room both recover from a process that refuses every session/new with no change from this PR, and both cases fail when _fail_turn stops recovering the room. #799 is rebased onto main without this PR.

@bandzalkin bandzalkin closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant