Skip to content

fix: own backend turn cancellation across ACP and native adapters - #834

Merged
AlexanderZ-Band merged 4 commits into
mainfrom
fix/fixpython-own-backend-turn-cancellation-across-acp-INT-1841
Oct 19, 2026
Merged

AlexanderZ-Band merged 4 commits into
mainfrom
fix/fixpython-own-backend-turn-cancellation-across-acp-INT-1841

Conversation

@AlexanderZ-Band

@AlexanderZ-Band AlexanderZ-Band commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Cancelling a local handler does not necessarily stop work accepted by an external backend, and replacement turns must wait for the prior stop to settle.

What

Introduce BackendTurns with owned, bounded cancellation, late-handle binding and settlement barriers. Integrate ACP and its inherited adapters, Cursor ACP, Codex and Claude SDK with the retained-room lifecycle. Add RetainedRoom.wait_released() so Claude cancellation joins the existing physical-close owner, with primitive tests and protocol/process probes.

Scope

Bottom layer of the backend cancellation stack split from #791. Closes INT-1841; contributes to INT-1133. The conformance guard covers migrated adapters; subsequent layers add the remaining backends and the complete exported-adapter inventory guard. Runtime and bridge fixes are independent.

Stack: #834 → #835 → #791. Independent fixes: runtime #832 and bridge #833.

@linear-code

linear-code Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

INT-1841

INT-1133

@AlexanderZ-Band AlexanderZ-Band left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Blocking — would be REQUEST_CHANGES on a PR by someone else. Full-PR cycle 1 found one verified issue; root-cause fix and regression validation follow.

Comment thread src/band/adapters/claude_sdk.py Outdated

@AlexanderZ-Band AlexanderZ-Band left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Full-PR cycle 2: no verified findings across all six review groups. Converged after fixing the cycle-1 issue. Focused boundary checks pass; combined full-unit validation is still running.

@AlexanderZ-Band
AlexanderZ-Band added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit f4e1ca7 Oct 19, 2026
43 checks passed
@AlexanderZ-Band
AlexanderZ-Band deleted the fix/fixpython-own-backend-turn-cancellation-across-acp-INT-1841 branch October 19, 2026 08:39
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