Skip to content

Kiro acp#5

Merged
hrishikeshmane merged 4 commits into
mainfrom
kiro-acp
Apr 21, 2026
Merged

Kiro acp#5
hrishikeshmane merged 4 commits into
mainfrom
kiro-acp

Conversation

@hrishikeshmane
Copy link
Copy Markdown
Owner

@hrishikeshmane hrishikeshmane commented Apr 21, 2026

main up to date

hrishi mane and others added 4 commits April 20, 2026 18:56
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
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Apr 21, 2026
@hrishikeshmane hrishikeshmane merged commit 24dd509 into main Apr 21, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant