-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Summary
Claude Code's run_in_background Bash task manager kills long-running processes after ~10 minutes (exit code 144 = SIGTERM). This prevents recipe runner workstreams from completing the full 23-step DEFAULT_WORKFLOW.
Reproduction
# This gets killed after ~10 minutes
Bash(run_in_background=true, command="env -u CLAUDECODE .venv/bin/python -c '
from amplihack.recipes import run_recipe_by_name
from amplihack.recipes.adapters.cli_subprocess import CLISubprocessAdapter
adapter = CLISubprocessAdapter()
result = run_recipe_by_name(\"smart-orchestrator\", adapter=adapter, ...)
'")Exit code 144 (128+16 = SIGTERM) after ~10 minutes, even though the recipe and adapter have no timeout.
Impact
- Recipe runner with 11 workstreams through 23-step workflow = ~2-3 hours
- Gets killed at 10 minutes during the classify-and-decompose step
- Prevents any long-running agentic task from completing in background
Expected Behavior
Background tasks should run to completion without a timeout, or at minimum the timeout should be configurable and default to unlimited for agentic workloads.
Workaround
Run in foreground (blocks the conversation) or use tmux.
Root Cause
The timeout appears to be in Claude Code's internal task management (run_in_background), not in the recipe runner or CLI subprocess adapter. The adapter explicitly documents "no hard timeout" and uses proc.wait() without timeout.
Files
src/amplihack/recipes/adapters/cli_subprocess.py— confirmed no timeout- Claude Code's Bash tool
run_in_background— suspected source of the 10-min kill