Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/agents/kiro/acp/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function spawnKiroCli(opts: SpawnOptions): AcpProcess {
cwd,
env: { ...process.env, ...env },
stdio: ["pipe", "pipe", "pipe"],
detached: true, // own process group for clean kill
detached: false, // disabled: detached causes EBADF in containers

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve a force-kill path after disabling detached

With detached: false, the spawned kiro-cli no longer owns a process group whose id is proc.pid, but shutdownProcess() still falls back to killGroup(), which calls process.kill(-proc.pid, "SIGKILL") and suppresses the resulting failure. In the scenario this fallback is meant for—kiro-cli ignores SIGTERM or leaves descendants running—the 5s grace timer resolves without killing anything, leaking the process while the caller believes shutdown completed.

Useful? React with 👍 / 👎.

});

// Handle spawn failures (e.g. ENOENT if kiro-cli not on PATH)
Expand Down
Loading