fix: lower default auto-kill idle timeout from 180 to 15 minutes#375
Merged
Conversation
Detached terminals previously survived up to 3 hours of idle, which accumulates running-but-orphaned PTYs toward the 50-terminal cap. Lower the default `safety.autoKillIdleMinutes` to 15 so idle detached terminals are reaped promptly and the running count stays well under the limit. Also drop the Safety slider min/step from 10 to 5 so the new 15-minute default is a reachable slider stop and finer values are selectable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Lowers the default
safety.autoKillIdleMinutesfrom 180 → 15 minutes.Why
Detached terminals (the result of plain pane/tab close, browser reload, or any websocket disconnect) keep their PTY running in the background and only get reaped once idle ≥
autoKillIdleMinutes. At the old 180-minute default these accumulate as running-but-orphaned terminals and push against the 50-terminal cap (runningCount()counts detached survivors). Dropping the default to 15 minutes reaps idle detached terminals promptly while still letting actively-producing background jobs (which reset the idle timer on output) survive.This is a conservative first step — it does not change close/detach semantics, only the idle reaping window. Active terminals are unaffected; the timeout remains user-configurable in Settings → Safety.
Changes
shared/settings.ts— defaultautoKillIdleMinutes180 → 15src/components/settings/SafetySettings.tsx— Safety slidermin/step10 → 5 so the new default is a reachable slider stopAGENTS.md— update the documented default (180 → 15 mins)settings.test.ts; update the slider-range selector inSettingsView.behavior.test.tsxTesting
test:vitestonshared/settings,terminal-lifecycle,SettingsView.core,SettingsView.behavior— all greentsc --noEmitcleanterminal-lifecycle.test.ts(kill at threshold, exempt-while-attached, reset-on-activity, disabled-when-≤0) unchanged and passing🤖 Generated with Claude Code