Repository navigation
End a Kiro Crew session when Crew is done with it - #1181
Conversation
Crew keeps one kiro-cli process for a chat and its in-process sub-agents; state.json's status is never updated at the end, so tombstone.json is the signal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Summary by QodoEnd Kiro sessions when Crew finishes or replaces them
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
1.
|
Crew rewrites the session map in place, so a missing or unreadable entry must persist before it counts; a replaced entry naming another session is proof. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A count cap let a busy Crew keep a sub-agent's directory out of every scan; its directory is created at spawn, just before the session starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Qodo finding 3 (test comment embeds run metadata): fixed in e1fc668 — the fixture summary now says only that the records are in the shapes Crew writes, with no run-specific identifiers. |
A cancel before the hub connects skips the final drain and end POST, and a watcher restarted later must still find a sub-agent spawned long before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No GitHub issue — AI-3192
What & why
Kiro has no session-end hook, so the watcher ends a Kiro session when its
kiro-cliprocess exits. Kiro Crew keeps one process running for a whole chat and, by default, runs its sub-agents inside that same process, so a finished sub-agent, or a chat Crew had moved to a new session, stayed active until Crew itself stopped. For a Kiro session on a machine with Crew, the watcher now also polls Crew's files once connected, and ends the session ascrew_finishedwhen Crew writes the sub-agent'stombstone.json, or when the session map shows the chat now names another session.Where to look
crew_finishedsession below the buffering threshold still flushes its lines and posts its end.Verification
🤖 Generated with Claude Code