Skip to content

fix: lower default auto-kill idle timeout from 180 to 15 minutes#375

Merged
danshapiro merged 1 commit into
mainfrom
fix/autokill-default-15min
May 30, 2026
Merged

fix: lower default auto-kill idle timeout from 180 to 15 minutes#375
danshapiro merged 1 commit into
mainfrom
fix/autokill-default-15min

Conversation

@danshapiro
Copy link
Copy Markdown
Owner

What

Lowers the default safety.autoKillIdleMinutes from 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 — default autoKillIdleMinutes 180 → 15
  • src/components/settings/SafetySettings.tsx — Safety slider min/step 10 → 5 so the new default is a reachable slider stop
  • AGENTS.md — update the documented default (180 → 15 mins)
  • Tests: pin the default in settings.test.ts; update the slider-range selector in SettingsView.behavior.test.tsx

Testing

  • test:vitest on shared/settings, terminal-lifecycle, SettingsView.core, SettingsView.behavior — all green
  • tsc --noEmit clean
  • Existing autokill behavior tests in terminal-lifecycle.test.ts (kill at threshold, exempt-while-attached, reset-on-activity, disabled-when-≤0) unchanged and passing

🤖 Generated with Claude Code

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>
@danshapiro danshapiro merged commit 8accd1d into main May 30, 2026
1 check passed
@danshapiro danshapiro deleted the fix/autokill-default-15min branch May 30, 2026 06:53
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.

2 participants