Repository navigation
fix(core,client): keep sessions busy until their background work reports back - #60500
Open
kitlangton wants to merge 1 commit into
Open
kitlangton wants to merge 1 commit into
kitlangton wants to merge 1 commit into
Conversation
kitlangton
force-pushed
the
t902-job-tools
branch
from
October 30, 2026 06:38
94a61e6 to
0a464d8
Compare
kitlangton
force-pushed
the
t902-session-jobs
branch
2 times, most recently
from
October 30, 2026 06:42
bce1433 to
59a7878
Compare
kitlangton
force-pushed
the
t902-job-tools
branch
from
October 30, 2026 13:58
0a464d8 to
4db06c2
Compare
kitlangton
force-pushed
the
t902-session-jobs
branch
from
October 30, 2026 13:59
59a7878 to
df6fe39
Compare
kitlangton
force-pushed
the
t902-job-tools
branch
from
October 30, 2026 14:53
4db06c2 to
8ee2473
Compare
kitlangton
force-pushed
the
t902-session-jobs
branch
3 times, most recently
from
November 3, 2026 20:03
d2f2c92 to
4cf993e
Compare
kitlangton
force-pushed
the
t902-session-jobs
branch
from
November 3, 2026 21:54
4cf993e to
abf1c59
Compare
kitlangton
force-pushed
the
t902-session-jobs
branch
from
November 3, 2026 21:55
abf1c59 to
4272592
Compare
3 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A session that moved a tool to the background now stays busy until that tool reports back and its turn finishes, instead of showing idle in between.
The server owns the busy state and reports it with the existing
session.statusevent. Sessions with no background work go idle exactly as before. Stacked on #60497.🔍 Origin: reported in #51810 and #56660
❌ Before
✅ After
session.status(busy/idle) only when that changes, routed by session so moves never misroute it.GET /api/session/activereports the same thing, so clients hydrate one value on reconnect.session.status; the done sound waits foridle. Older servers keep the old behavior.📊 Proof
shellwithbackground: true)New tests in core (status sequence with a slow notice, Stop, held/detached jobs, bus routing across a move), server (active list), client store and mini TUI.
👀 Read:
packages/core/src/job.ts,holds/waking: a held job keeps counting until its notice has woken the session, so the session never blips idle in between.packages/core/src/session/execution.ts,refreshStatus. The rest is routine.yield_afterstill counts until it finishes (Stop cancels it).Checks run
bun test test/job.test.ts test/session-execution.test.ts test/bus-session-routing.test.ts test/session-run-coordinator.test.ts test/bus.test.ts test/tool-job.test.ts test/tool-auto-background.test.ts test/session-shell.test.ts test/tool-subagent.test.tspass. Intest/tool-shell.test.ts, the 2 "conditional substitutions" tests fail on the base branch too.bun test test/session-active-jobs.test.tspassesbun test test/solid-data.test.tspassesbun test test/mini/stream-v2.transport.test.tspassesbun run typecheckin schema, core, protocol, server, client, tui, app: no errors