Repository navigation
fix(claude-tty): keep the idle timeout from stopping Claude while its background work runs - #170
Merged
Merged
Conversation
… background work runs A turn that waits its bound out on a quiet background command or agent stops counting it, and the idle check never counted it at all, so an hour after the last activity the suspension killed Claude with the work still running. A background command now stays marked as running until it reports, Claude stops it, or the process ends, independently of whether a turn still waits on it. An agent a turn gave up on counts the same way until it reports. The idle check waits while any such work is unreported, and checks again within the idle timeout, so a session suspends one timeout after the work reports and it goes quiet. A background command that never finishes, such as a dev server, now keeps Claude running until it is stopped or the session is closed. The test that closed an unreported agent's card through an idle suspension now gets there through Claude exiting. Closes #164 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
What happened
Closes #164.
A session whose background agents were waiting on hours-long runs was suspended for being idle, and the suspension killed Claude along with everything it had started.
When a turn gives up waiting on quiet background work, it stops counting that work.
The idle check only looked at the turn, open cards and recent activity, so an hour after the session went quiet it stopped Claude with the work still running.
What this does
suspendIfStillIdle()waits while any of that work is unreported. It checks again within the idle timeout, so the session suspends one timeout after the work reports and it goes quiet.#168 only stopped Paseo's own idle cleanup. This covers the adapter's Suspend idle Claude timer.
Tests
Merge Danger
Door: two-way
Blast Radius: claude-tty idle suspension
A background command that never finishes, such as a dev server, now keeps Claude running until it is stopped or the session is closed.
Before, the idle timeout killed it.