Skip to content

fix(cli): keep the stop follow-up in kilo run - #1402

Merged
blafourcade merged 5 commits into
nextfrom
fix/kilo-run-keeps-the-stop-follow-up
Nov 26, 2026
Merged

blafourcade merged 5 commits into
nextfrom
fix/kilo-run-keeps-the-stop-follow-up

Conversation

@blafourcade

Copy link
Copy Markdown
Contributor

Summary

In kilo run, a Stop follow-up never landed: the bridge ran the Stop script asynchronously, and run drained and exited first. The shared bridge runtime now runs a Stop script synchronously before it answers, so the follow-up is queued before the drain.

  • Probed: Kilo 7.8.32 landed the follow-up 3 of 3, and OpenCode 1.19.3 does not regress, 3 of 3.
  • One spawn contract (scriptRun, failedRun) serves both runners. A Stop script that hangs, exits non-zero, fails to spawn, or gets a refused argument is reported and sends no follow-up. Each guard is mutation-proven.
  • Limit, stated in docs/COMPATIBILITY.md: a Stop script runs inside the host's event hook, so the host waits for it, up to 5 s on every idle.
  • Goldens: the opencode and kilo hooks-routes fixtures, which embed the generated bridge.

Closes #1320

🤖 Generated with Claude Code

blafourcade and others added 5 commits November 26, 2026 12:06
kilo run drains the session as soon as nothing holds it, so a follow-up
requested after an await came too late. The Stop script now runs
synchronously in the shared bridge runtime and its prompt is sent at once.

Refs #1320

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ronous Stop path

The sync and async runners now take command, argv, cwd, timeout and input
from one place, and both report a spawn that refuses its arguments. Tests
cover a hanging, failing and non-spawning Stop script; the blocking limit
is stated once in COMPATIBILITY.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e-stop-follow-up

# Conflicts:
#	cli/src/contexts/tools/domain/behaviours/kilo/kilo-hooks-bridge.model.ts
#	cli/src/contexts/tools/domain/bridges/bridge-source.ts
#	cli/tests/golden/snapshots/framework-build/golden.json
#	cli/tests/golden/snapshots/translate-install/golden.json
@blafourcade
blafourcade marked this pull request as ready for review November 26, 2026 12:12
@blafourcade
blafourcade requested a review from a team as a code owner November 26, 2026 12:12
@blafourcade
blafourcade merged commit 9e7e919 into next Nov 26, 2026
5 checks passed
@blafourcade
blafourcade deleted the fix/kilo-run-keeps-the-stop-follow-up branch November 26, 2026 12:12
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