Skip to content

feat(shell): default 120s foreground run_shell timeout - #1087

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-8019-default-2-min-foreground-run_shell-timeout-background-job
Sep 16, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-8019-default-2-min-foreground-run_shell-timeout-background-job

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Foreground run_shell defaults to a 120s timeout (schema default 120000 ms); callers can still pass an unbounded per-call timeout.
  • Background jobs have no default timeout.
  • Watchdog slack accounts for the foreground default so in-flight work is not treated as silence.

Verification

  • bun run typecheck, bun run build, and bun run test pass

Fixes CL-8019

Summary
Foreground run_shell now times out at 120s when timeout is omitted. A
positive per-call timeout is the bound with no ceiling. Background
run_shell stays unbounded unless timeout is set. Watchdog arms on the
effective foreground timeout plus 1s slack.

Verification
bun test ./src/plugins/shell-guard-plugin.test.ts ./src/tui/tool-execution-watchdog.test.ts ./src/settings.test.ts ./src/prompts.test.ts ./src/shell/background-shell.test.ts ./src/agent/background-shell-tool.test.ts ./src/agent/posix-tool-plugins.test.ts
bun run typecheck
bun run check
Summary
run_shell schema timeout copy now says the default is foreground-only
and to omit timeout on background:true. Advertise uses the same
default as resolveShellTimeoutMs when only maxTimeoutMs is set.

Verification
bun test ./src/plugins/shell-guard-plugin.test.ts
bun run typecheck
bun run check
@linear-code

linear-code Bot commented Sep 16, 2026

Copy link
Copy Markdown

CL-8019

@TheGreatAxios
TheGreatAxios merged commit 15ff750 into main Sep 16, 2026
13 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-8019-default-2-min-foreground-run_shell-timeout-background-job branch September 16, 2026 02:05
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.

1 participant