Kiro acp#5
Merged
Merged
Conversation
Kiro multiplexes `session/update` for the main session and every
spawned subagent crew over one ACP channel, each tagged with its
originating sessionId. Previously every subagent tool call, assistant
message, and content delta landed on the main chat as flat inline
rows — the "chaotic" UX relative to Claude Code's native Work-log
grouping.
Match Claude Code's behavior: subagent work appears as a collapsible
Work-log group with live per-tool activity inside, and the main
thread stays clean.
- Thread `sessionId` through every `AcpParsedSessionEvent` variant and
through `AcpAssistantSegmentState` in `AcpSessionRuntime`, so
KiroAdapter can tell main-session events apart from subagent events.
- Track in-flight subagents in `KiroSessionContext.subagentTasks`,
keyed by ACP sessionId, and translate `_kiro.dev/subagent/list_update`
roster transitions into `task.started` / `task.completed` envelopes.
On session teardown, flush dangling tasks as `status: "stopped"` so
the Work-log spinner doesn't hang.
- Emit one `task.progress` per distinct subagent `toolCallId` (tracked
per-subagent in `seenToolCallIds`) so the Work-log shows live
activity inside the group while the crew is running, instead of
sitting silent between start and end markers.
- Format each progress row as `"{title}: {detail}"` via a new exported
`formatSubagentToolLabel` helper so rows read "Read file: src/foo.ts"
or "Ran command: bun test" instead of the bare category.
- Drop subagent ContentDelta / AssistantItem / PlanUpdated / ModeChanged
events from the main thread — they're subagent internals the user
shouldn't see.
The UI needs no changes — `deriveWorkLogEntries` already groups
task.progress/task.completed under a collapsible Work-log widget.
PATCH.md updated: new integration-points row for AcpRuntimeModel,
bumped AcpSessionRuntime row, added a user-facing feature bullet, new
row in the conflict-zones table, and a session-reflection entry.
Tests: 18 new cases — 10 around roster parsing + diff semantics
(missing sessionId, unknown status, started/completed emission,
idempotence on re-sends, implicit termination on disappearance) and
8 on `formatSubagentToolLabel` (title+detail combining, command
fallback, title-only, detail-only, identical dedup, kind fallback,
empty "Working" fallback, whitespace trimming).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat(kiro): group subagent activity into Work-log entries
Kiro supports session/set_model but NOT session/set_config_option. AcpSessionRuntime.setModel routes through setConfigOption, which Kiro rejects with -32601 "Method not found". Call session/set_model directly via the raw request interface in KiroAdapter, keeping shared ACP infrastructure untouched so Cursor (which uses setConfigOption) is unaffected. Also updates session.model immediately after a successful switch (matching ClaudeAdapter/OpenCodeAdapter pattern) and removes the redundant model assignment from the post-prompt session update. Adds 3 integration tests: - switches model in-session without restarting the process - updates session.model immediately after in-session model switch - does not call setModel when model is unchanged between turns Mock agents updated with handleSetSessionModel for forward compat.
…witch fix(kiro): use session/set_model for in-session model switching
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main up to date