What happened
A foreground tool keeps running after maka run requests a stop:
- With
--timeout 10, the CLI returns 1 after 49 seconds and the tool's marker file is present.
- With SIGINT sent after 10 seconds, the CLI returns
130 another 45 seconds later and the marker file is present.
- The request fails with
RuntimeHostProtocolError: Unknown turn.stop input field: outcome. void stopPromise.catch(() => {}) consumes the rejection, so users receive zero protocol-error diagnostics while the CLI waits for natural completion.
How to reproduce
WORKSPACE="$HOME/maka-stop-repro"
MARKER="$WORKSPACE/marker"
mkdir -p "$WORKSPACE"
cd "$WORKSPACE"
PROMPT="Execute exactly this one shell command and do nothing else: sh -c 'sleep 40; echo done > $MARKER'. Do not explain."
maka run --connection "$CONNECTION" --model "$MODEL" --yolo --timeout 10 "$PROMPT"
printf 'exit=%s marker=%s\n' "$?" "$(test -f "$MARKER" && echo present || echo absent)"
rm -f "$MARKER"
maka run --connection "$CONNECTION" --model "$MODEL" --yolo "$PROMPT" &
RUN_PID=$!
sleep 10
kill -INT "$RUN_PID"
wait "$RUN_PID"
Expected
The timeout path should stop the tool shortly after 10 seconds, return 1, and leave the marker absent. SIGINT should terminate it promptly, return 130, and leave the marker absent. A rejected stop request should surface a diagnostic.
Root cause
packages/cli/src/runtime-host-run-command.ts:466-468 forwards the entire active Turn object to turn.stop. At runtime that object also contains outcome; the stop-before-start path at packages/cli/src/runtime-host-run-command.ts:330 sends the same object. packages/runtime-host/src/protocol/turn.ts:510 accepts exactly sessionId, turnId, and runId, so protocol decoding rejects the extra field before the request reaches the Host.
Related issues: #3854 covers another client/Host outcome divergence. #3698 and #3713 cover the TUI interrupt path.
Environment
- Maka commit:
4cbe224
- OS: macOS 26.6.1
- Surface:
maka run timeout and SIGINT handling
- Node.js: 24.19.0
What happened
A foreground tool keeps running after
maka runrequests a stop:--timeout 10, the CLI returns1after 49 seconds and the tool's marker file is present.130another 45 seconds later and the marker file is present.RuntimeHostProtocolError: Unknown turn.stop input field: outcome.void stopPromise.catch(() => {})consumes the rejection, so users receive zero protocol-error diagnostics while the CLI waits for natural completion.How to reproduce
Expected
The timeout path should stop the tool shortly after 10 seconds, return
1, and leave the marker absent. SIGINT should terminate it promptly, return130, and leave the marker absent. A rejected stop request should surface a diagnostic.Root cause
packages/cli/src/runtime-host-run-command.ts:466-468forwards the entire active Turn object toturn.stop. At runtime that object also containsoutcome; the stop-before-start path atpackages/cli/src/runtime-host-run-command.ts:330sends the same object.packages/runtime-host/src/protocol/turn.ts:510accepts exactlysessionId,turnId, andrunId, so protocol decoding rejects the extra field before the request reaches the Host.Related issues: #3854 covers another client/Host outcome divergence. #3698 and #3713 cover the TUI interrupt path.
Environment
4cbe224maka runtimeout and SIGINT handling