continue-custom/core/tools
Keita A. 5d19470aa9
fix: add default timeout for terminal command tool execution (#10550)
* fix: add default timeout for terminal command tool execution

Terminal commands with waitForCompletion=true had no timeout, risking
indefinite hangs. Adds a 2-minute default timeout with graceful
SIGTERM -> 5s grace period -> SIGKILL escalation. Both streaming
and non-streaming code paths are covered. The SIGKILL timer is
properly cleared if the process exits during the grace period.

* fix: correct process running check and clear SIGKILL timer

Replace `childProc.killed` with `exitCode === null && signalCode === null`
for accurate process-state detection, and clear sigkillTimeoutId in error
handlers to prevent delayed kills after rejection.

Applied to both streaming and non-streaming paths.

---------

Co-authored-by: amabito <192487536+amabito@users.noreply.github.com>
Co-authored-by: amabito <amabito@local>
2026-03-24 11:04:28 -07:00
..
definitions feat: make create/read rule tools disabled by default (#10543) 2026-02-16 12:15:57 -08:00
implementations fix: add default timeout for terminal command tool execution (#10550) 2026-03-24 11:04:28 -07:00
policies prettier 2025-10-16 19:08:31 -07:00
systemMessageTools fix: harden system message tools and wire toolOverrides to system message path (#10485) 2026-03-13 12:52:05 -07:00
applyToolOverrides.ts feat: add tool prompt override support in .continuerc.json (#9314) 2026-02-02 21:55:21 -08:00
applyToolOverrides.vitest.ts feat: add tool prompt override support in .continuerc.json (#9314) 2026-02-02 21:55:21 -08:00
builtIn.ts add read skill tool 2025-12-30 12:51:16 +05:30
callTool.ts feat: limited MCP App support (#10132) 2026-02-05 19:07:44 -08:00
constants.ts feat: tool call args preprocessing (#7992) 2025-09-30 18:49:29 -07:00
index.ts read skill is a tool definition 2026-01-06 17:31:04 +05:30
mcpToolName.ts feat: limited MCP App support (#10132) 2026-02-05 19:07:44 -08:00
mcpToolName.vitest.ts fix: core type error 2025-09-24 17:41:46 -07:00
parseArgs.ts fix: support object-type arguments in tool call parsing 2026-01-21 18:16:12 +08:00
parseArgs.vitest.ts Address comments from @RomneyDa 2025-12-02 20:28:45 +00:00
searchWebGating.vitest.ts fix test lints 2026-01-06 17:58:53 +05:30