Skip to content

fix: stop delegated work and helpers at conversation limits - #1907

Merged
santoshkumarradha merged 10 commits into
devfrom
fix/stop-descendant-work
Oct 23, 2026
Merged

santoshkumarradha merged 10 commits into
devfrom
fix/stop-descendant-work

Conversation

@santoshkumarradha

@santoshkumarradha santoshkumarradha commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Stopping a conversation now ends its delegated run, background jobs and automatic helpers. --max-hours ends owned work at the deadline and explains how to continue in a new conversation. A pending run start cannot revive after Stop.

Page Stop prevents a pending isolated landing from continuing into checking or narration. History now shows the live task once instead of re-adding its stale saved record, so opening the task reaches its working room and Stop control. A home merge already in progress retains its actual result; usage from requests already sent remains billable. Window detach behavior is unchanged.

Actual terminal evidence

All scenarios used isolated fictional counter projects and drove the real terminal controls.

Scenario Observed result
Page Stop History showed one task; entered its live room and confirmed Stop. Child output stopped, no checker/acceptance/resume. Request starts stayed at 2 and heartbeat at 15 bytes for 10 seconds.
16-second conversation limit Owned child stopped before the terminal limit message. Disclosed stopped state and exact stored time-limit reason verified. Request starts stayed at 2 and heartbeat at 30 bytes for 10 seconds.
No-limit control Child kept writing beyond 18 seconds, then stopped through the real task page. Request starts stayed at 2 and heartbeat at 105 bytes for 10 seconds after Stop.
Live multi-turn workflow Normal chat, delegated 120-second bash counter, actual task-page Stop. Partial output retained and unchanged for 10 seconds; no checking or acceptance. All 16 recorded calls used OpenRouter deepseek/deepseek-v4.1-flash.

Scripted scenarios passed in 95.02 seconds; the live workflow passed in 28.58 seconds. Each scripted run also verified unchanged nonzero prompt/output/cache/cost totals after Stop.

Regression checks

Reproduced before fixing: conversation Stop left an owned run active, auxiliary retries continued, late landing overwrote stopped state, and history duplicated the live task. Focused cancellation, admission, landing, helper and history regressions pass, including race checks.

make pr-ready completed successfully. All selected session tests passed across eight shards. One unrelated credit-selection assertion (TestLowCreditReadSwapsOnlyAnUntouchedImplicitConversation) fails identically on the unchanged dev base; the gate independently reproduced and classified that baseline failure. No test assertion or skip was weakened to hide it.

Closes #1350.
Closes #1352.

@santoshkumarradha
santoshkumarradha marked this pull request as ready for review October 23, 2026 03:17
@santoshkumarradha
santoshkumarradha merged commit 39fdbea into dev Oct 23, 2026
8 checks passed
@santoshkumarradha
santoshkumarradha deleted the fix/stop-descendant-work branch October 23, 2026 03:22
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.

Max hours ends chat but leaves its delegated run running Page Stop shows an acceptance card and keeps spending

1 participant