You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(ai-vault): list Kiro V3 engine sessions alongside the default store - #24938
#26695 added Kiro to Agent Session History by reading the default engine's store, $KIRO_HOME/sessions/cli/. Sessions from Kiro's opt-in V3 engine (kiro-cli chat --v3) live in a different store, ~/.kiro/sessions/<workspace-hash>/sess_<uuid>/, so they still never show up. This PR adds that store to the same kiro source. V3 sessions now list next to the default-engine ones and reopen the same way.
This PR was rebuilt on top of #26695. Agent registration, search negotiation, the resume command and the parse cache now come from main unchanged. What's left is the V3 store.
What Changed
Before (on main): only default-engine Kiro sessions are listed. V3 sessions are missing from history and search.
After: each V3 session lists as a kiro row with its title, workspace, model, message count and timestamps. Its preview and search text come from the transcript. Resume uses the same kiro-cli chat --tui --resume-id <sess_id> command main already builds.
Reads session.json: title, workspacePaths[0] as cwd, modelId, createdAt, lastModifiedAt.
Streams the sibling messages.jsonl with the same consumeCompleteJsonlLines the default-engine parser uses. user entries are prompts. assistant entries count only for operationType: 'Say'; reasoning, summaries and tool calls are skipped.
The kiro entry moves out of the shared sources table, which is near its max-lines limit, and gains the V3 store as a second root.
filePredicate, contentDependencyPath and the parser dispatch tell the two stores apart by path shape.
Keeping both roots in one entry matters for search: constituentRoots only knows roots that the table declares.
Directory walk: with KIRO_HOME unset, cli/ sits inside the V3 root. The V3 walk skips cli/, UUID-named directories (default-engine task state) and dot directories (.index), and enters only sess_<uuid>. Nothing is listed twice, and search attributes each file to its own root (longest-prefix ownership).
Docs: Kiro joins the agent list in the session history page.
Why
Probed with kiro-cli 2.27.1 on Windows 11.
Run
Result
--v2 with KIRO_HOME pointed at a temp dir
The session is written to $KIRO_HOME/sessions/cli/<uuid>.json + .jsonl.
--v3 with the same KIRO_HOME
The session is written to the real ~/.kiro/sessions/<hash>/sess_<uuid>/. V3 ignores KIRO_HOME, so the V3 root is the home's .kiro. It is not resolveKiroHomeDir().
kiro-cli chat --resume-id sess_… (no --v3)
Reopens the session on V3 with the same sess_ id, and the previous turn is remembered, so the resume command needs no change.
V2 and V3 ids never collide: a UUID versus a sess_<uuid>. No dedupe is needed.
Linked Issue
Refs #17662. The default engine is covered by #26695; this adds --v3 sessions.
Visual Proof
N/A, no new UI. These are rows in the existing history list.
For a real-data check, I scanned this machine's ~/.kiro with this branch's scanAiVaultSessions. It returned 12 kiro rows with 0 issues: all 7 default-engine sessions and all 5 V3 sessions on disk. V3 rows resume with cmd /d /s /c "cd /d ""…"" && kiro-cli chat --tui --resume-id ""sess_…""".
Testing
Automated (Windows 11):
session-scanner-kiro-v3-parser.test.ts:
manifest and transcript parsing
malformed and unreadable manifest or transcript
no transcript yet
title fallback to the first prompt
directory name winning over a disagreeing manifest id
whole-content parsing
path matching for all four separator mixes
the directory walk rules
session-scanner-kiro-v3.test.ts:
real nested layout: one default and one V3 row, with decoys under cli/, UUID, .index and dot directories not listed
both resume commands
search listing attributes each file to its own root
V3 root stays under home when KIRO_HOME moves the cli/ store
Kiro-related files, re-run after merging current main: 9 files, 45 passed.
Wider AI Vault and search run (before that merge): 1,698 passed, 31 failed. I re-ran the failing files on an unmodified main copy, and 28 of the failures are identical there. They come from C:\ vs /tmp paths, Windows shell quoting, WSL stalls, temp-dir EPERM/EBUSY and FTS5. The other 3 (session-search-store-is-memory) pass when run alone. None involve Kiro.
run-typecheck-projects-in-parallel exit 0. On the changed files, oxlint (with max-lines), anti-slop and code-quality (native and type-aware) report 0 diagnostics, and the max-lines ratchet passes.
Not live-tested: macOS, Linux and WSL, and kiro-cli 2.28+ (#26695 was validated on 2.29).
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Implemented with Claude Opus 5.5 (Anthropic) through Claude Code, directed and reviewed by me. The store layout and engine behavior above were measured on a real kiro-cli install, not taken from docs.
Review
Cross-platform: local and WSL roots both go through the shared root and walker code. Path matching handles either separator.
Performance: one manifest read plus one streamed transcript per changed session, cached on manifest and transcript stat. The V3 walk adds one directory level per workspace hash.
Security: read-only. Deletion stays unsupported for Kiro: V3 also keeps ~/.kiro/session-index/*.jsonl, the same situation as Kimi.
Known limits:
A V3 session nobody titled shows Kiro's default title, "New Session".
V3 manifests carry no parent-session field. If V3 subagents ever write their own sessions there, they would list as top-level rows.
Agent skill upstream boundary
Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Companion PR #24937 was rebuilt the same way: it adds V3 status hooks on top of #26695's default-engine hooks. The two PRs share no files.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
kiro-cli V3 keeps each session at ~/.kiro/sessions/<hash>/sess_<uuid>/ as a
session.json manifest (id, title, workspacePaths, modelId, timestamps) plus
a messages.jsonl transcript. A Kimi-style scanner now lists those sessions:
the manifest supplies identity, workspace and model, and the transcript's
user turns and `Say` assistant turns feed the preview (Reasoning and
Summary entries are skipped). messages.jsonl is the content dependency, so
each turn refreshes the row.
Resuming a row runs `kiro-cli chat --tui --resume-id <id>` from the session
workspace, since --resume-id belongs to the chat subcommand. Deletion stays
unsupported because Kiro also keeps a session-index registry, and legacy V2
chats under sessions/cli use another format and are not listed.
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
The change adds Kiro V3 session scanning alongside the existing CLI store. The V3 parser reads session.json manifests and sibling messages.jsonl transcripts, and the scanner routes V3 manifest candidates to that parser. Kiro session log lookup and scope CWD lookup now support V3 paths. Tests cover parsing, discovery, root selection, log resolution, and scope lookup. The documentation adds Kiro to the list of configurable agents.
Merge Risk: Moderate · previous review 6724c
Users who set a custom KIRO_HOME and run recent Kiro versions will not see their V3 sessions in Session History. The failure is a missing-data case limited to that configuration, and the fix is small. Resolve it before merge, or accept it explicitly.
Security Architecture Review
Security architecture risk:🔵 Low · up to 87456
The change extends existing session-history and search behavior without demonstrating a new access-control bypass. Older peers remain protected by capability filtering, and deletion is not enabled. Some uncertainty remains around concurrent session-file updates and interrupted reads.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The new exposure consists of Kiro metadata and visible transcript turns entering existing history/search surfaces, plus a CLI resume action. A party able to modify a discovered manifest controls its identity and workspace inputs; this review did not establish cross-tenant authority, a new unauthenticated endpoint, or expanded deletion permission.
Trust Boundaries and Controls
observed — Manifest-controlled identity and workspace are passed through the existing command builder. The POSIX path uses literal argument quoting, while the discovery/parser path constructs commands rather than executing them. Terminal launch occurs in the existing resume action after preparation and target selection. This does not establish equivalent safety for every shell dialect.
Resilience and Maintainability Implications
observed — Non-absence manifest and transcript read failures propagate, preventing the ordinary parse-cache store. Transcript handles are closed and destroyed on completion or failure. The search consumer declines incomplete outcomes and discards its buffered write.
observed — Malformed manifests return null and malformed transcript records are skipped, whereas the whole-read wrapper reports a successful parse as complete. Cancellation also does not reach the Kiro parser before completion delivery. These are consistency limitations, not verified security findings; their significance depends on writer behavior and cancellation semantics that remain partly unverified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Kiro V3 engine sessions are now listed in the AI Vault session history alongside the default store. It uses the conventional feat(ai-vault) prefix and stays within a s…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description follows the repository template closely. It covers ELI5, What Changed (before/after and mechanism), Why (with a probe table comparing V2 and V3 engine behavior), a Linked Issue (Refs #…
Full details: Title check
Explanation
The title names the main change: Kiro V3 engine sessions are now listed in the AI Vault session history alongside the default store. It uses the conventional feat(ai-vault) prefix and stays within a single line. The title matches the changeset, which adds a V3 parser and registers the V3 store as a second root of the kiro source.
Full details: Description check
Explanation
The description follows the repository template closely. It covers ELI5, What Changed (before/after and mechanism), Why (with a probe table comparing V2 and V3 engine behavior), a Linked Issue (Refs #17662, with the default engine covered by #26695), Visual Proof marked N/A with a reason, a Testing section with automated and manual results, a Risk discussion (read-only, deletion unsupported, known limits), AI Disclosure, the Review section, and the agent-skill boundary checkbox. The Risk section has no explicit 'Level' value, and the Linked Issue line uses 'Refs' rather than the 'Fixes #' form the template asks for. The author also left the final pnpm lint/typecheck/test/build checkbox unchecked, and that is acceptable because CI covers it. The remaining gaps are minor and do not block merge.
Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Important
Adding kiro to AI_VAULT_AGENTS is a wire-visible change, but the cross-version search downgrade path only narrows qoder. A current client searching an older host now sends kiro in filters.agents, and the older host's request validator rejects the whole search. The pinned cross-version test fails on this.
Reviewed changes
New Kiro scanner (session-scanner-kiro-paths.ts, session-scanner-kiro-parser.ts): scans <home>/.kiro/sessions/<hash>/sess_<uuid>/session.json, streams the sibling messages.jsonl, and builds the row from the manifest (id, title, workspacePaths[0], modelId, timestamps). Reasoning/Summary assistant entries are skipped; a transcript-less session is still listed.
Registration: adds kiro to AI_VAULT_AGENTS/AI_VAULT_AGENT_LABELS, the source table, the parser dispatch, the parse-cache null-resumable group, and the kiroSessionsDir scan option. Deletion correctly stays unsupported.
Resume command: kiro-cli chat --tui --resume-id <sess_id> in ai-vault-resume-command.ts.
Fixtures/tests: the every-agent vault fixture gains a Kiro session, plus a new session-scanner-kiro-parser.test.ts.
The scanner itself mirrors Kimi closely and reads cleanly. Verified locally: pnpm tc:node passes, and the Kiro parser, every-agent scan, and transcript-capture tests pass.
ℹ️ Kiro resume omits an explicit harness selector
The built command is kiro-cli chat --tui --resume-id <sess_…> with no V3 harness flag. Kiro's docs state V3 sessions cannot be resumed in V2, and the working V3 reproduction in the wild passes --v3 explicitly. This is fine if kiro-cli 2.27 defaults to V3 (the version you tested), but may fail for a user whose saved chat harness is v2/classic.
Technical details
# Kiro V3 resume without an explicit harness## Affected sites-`src/shared/ai-vault-resume-command.ts:190-193,225-226` — emits `kiro-cli chat --tui --resume-id <id>` with no `--v3`.
## Open questions for the human- Does `--resume-id <sess_…>` auto-select the V3 harness, or does it need `--v3` when the user's saved `chat.agentEngine` is v2/classic?
- If it needs `--v3`, should it be part of the base command or conditioned on the harness?
## Evidence- kiro.dev CLI docs confirm `--resume-id <ID>` exists on `chat` and that the V3 id is the full `sess_<uuid>` (the value the parser reads) — so the flag and id are correct.
- Docs: "V3 sessions cannot be resumed in V2"; the V3 reproduction used `kiro-cli --v3 chat --resume-id sess_…`.
ℹ️ Nitpicks
src/main/ai-vault/session-scanner-scope.test.tsscopedScanOptions never sets kiroSessionsDir (nor museSessionsDir), so that scan falls through to the real ~/.kiro/~/.muse on a developer machine. Adding kiroSessionsDir: '/nonexistent/kiro' keeps the fixture hermetic like the other roots.
src/shared/ai-vault-session-deletion.ts:26 documents why kimi is excluded from deletion (a separate session_index.jsonl registry); Kiro has the same ~/.kiro/session-index/*.jsonl situation and should be named alongside it so the rationale stays complete.
docs/site/content/docs/agents/session-history.mdx:30 enumerates the Agent Session History agent list and doesn't mention Kiro (the list also omits qoder/codebuddy/zcode/opencode2, so it may not be exhaustive, but Kiro is the newly user-visible agent).
…o files
Adding `kiro` to AI_VAULT_AGENTS is wire-visible: a current client that
lists every agent would send `kiro` to a host whose request enum predates
it, and that host rejects the whole search. Kiro now follows the Qoder
negotiation. The status and request carry supportsKiroHistory, the client
drops `kiro` for a host that does not advertise it, and the host drops
`kiro` hits for a client that does not send it. The pinned cross-version
test covers both refs.
The Kiro parser now treats only a missing manifest or transcript as "no
data". Other read failures (a gate refusal, a Windows sharing violation
while Kiro rewrites the file) surface as a scan issue instead of caching
an empty or partial row under an unchanged mtime.
Also isolates kiroSessionsDir in the scope test, names Kiro's session-index
registry in the deletion exclusions, and lists Kiro in the session history
docs.
Thanks for the reviews. Both findings are addressed in ec76749.
@pullfrog's resume-harness question: I tested kiro-cli 2.27.0 on a machine whose default engine is still V2 (plain kiro-cli chat --tui starts V2 there). kiro-cli chat --tui --resume-id sess_… reopened a V3 work session on the V3 engine: the Kiro log shows the agent server, and its standalone hooks loaded. So --resume-id follows the session's own engine, and no --v3 is needed.
The nits are in the same commit: kiroSessionsDir in the scope test, Kiro named in the deletion exclusions, and Kiro listed in the session-history docs.
The reason will be displayed to describe this comment to others. Learn more.
Important
The supportsKiroHistory negotiation is correct, but the same commit also changed the host's default agent narrowing and left two existing test expectations stale, so pnpm test is red. Details inline.
Reviewed changes
Reviewed commit ec76749024, the delta since the prior pullfrog review (9256d28e5e).
Kiro wire negotiation: supportsKiroHistory was added to both AiVaultSearchRequestSchema and AiVaultSearchStatusSchema. The status advertises it, the client probes aiVault.searchStatus on non-IPC transports and drops kiro/qoder from explicit filters a host cannot parse, and the host drops kiro hits for a client that omits the flag.
Kiro read-error handling: session-scanner-kiro-parser.ts now uses isDefinitiveAbsence, so only ENOENT/ENOTDIR mean "no session"/"no transcript"; any other read failure (e.g. a Windows sharing violation, EISDIR, a gate refusal) throws so the parse cache retries rather than caching a missing row.
Test/doc updates: the pinned cross-version wire test, IPC search test, scope-service/entry-point tests, session-scanner-scope fixture (kiroSessionsDir), the deletion-rationale comment, and the session-history docs were updated.
The reason will be displayed to describe this comment to others. Learn more.
Important
The Kiro negotiation itself is correct, but the same commit generalizes the host's old qoder-only narrowing and leaves two existing test files asserting the old agent list, so pnpm test is red on this head. Both need the same && agent !== 'kiro' update the delta already applied elsewhere.
Reviewed changes
This run re-reviewed the delta since the prior pullfrog review (9256d28): the Kiro search-filter negotiation, the Kiro read-failure handling, and the earlier nits.
Kiro search-filter negotiation (ai-vault-search-client.ts, session-search-service-registry.ts, ai-vault-search-contract.ts): supportsKiroHistory now joins supportsQoderHistory on both the status and the request, so a current client strips kiro for a host that predates it and the host strips kiro for a client that does not advertise it. The splice of supportsKiroHistory out of request before it reaches the service is preserved.
Pinned cross-version coverage (qoder-history-search-downgrade.unit.test.ts): the pinned test now also exercises a codex+kiro filter and the all-agents narrowing.
Kiro unreadable-file handling (session-scanner-kiro-parser.ts): only ENOENT/ENOTDIR count as "no session" now. A gate refusal or a transient read failure (a Windows sharing violation while Kiro rewrites session.json) propagates to a scan issue instead of caching a missing or partial row under the unchanged mtime.
Prior nits: kiroSessionsDir is isolated in the scope test, Kiro is named in the deletion-exclusion rationale, and Kiro is listed in the session-history docs.
The parser throw paths reach parseSessionCandidate, which records them as issues and skips the cache store, so a transient failure is retried on the next scan as intended. The --resume-id-harness question is answered by the author's manual evidence: on a V2-default machine, kiro-cli chat --tui --resume-id sess_… reopened a V3 work session on the V3 engine, so no --v3 selector is needed.
⚠️ Host-side Kiro narrowing leaves two out-of-diff suites red
session-search-service-registry.ts now strips kiro whenever the requester omits supportsKiroHistory, but two pre-existing tests still expect AI_VAULT_AGENTS.filter((agent) => agent !== 'qoder') (which includes kiro) and now fail. Neither file is in this PR's diff, so this cannot be anchored inline. Reproduced on this head: vitest run --config config/vitest.config.ts src/main/runtime/rpc/methods/ai-vault-search.test.ts src/relay/session-search-transport.test.ts → 4 failed / 13 passed.
Technical details
# Stale test expectations after the host-side Kiro narrowing## Affected sites-`src/main/runtime/rpc/methods/ai-vault-search.test.ts:59` — the three `applies exposure for authenticated client kind …` cases expect `filters: { agents: AI_VAULT_AGENTS.filter((agent) => agent !== 'qoder') }`, still including `kiro`; the host now returns the list with `kiro` removed too.
-`src/relay/session-search-transport.test.ts:60` — same expected filter for the raw `mux.request` case (no `supportsKiroHistory`), failing for the same reason.
## Required outcome- Both expected filters exclude `kiro` as well as `qoder`, matching `session-search-service-registry.test.ts:62` and `tests/e2e/cross-version-wire/qoder-history-search-downgrade.unit.test.ts:132`.
## Suggested approach (optional)- Neither file is touched by this PR; the asserted behavior is the intended new behavior, so this is an expectation update, not a source change.
The reason will be displayed to describe this comment to others. Learn more.
✅ No new issues found.
Reviewed changes
Reviewed commit a6330d366f, the delta since the prior pullfrog review (ec76749). The change is test-only and closes out the stale-expectation finding.
Updated the two host-narrowing expectations to drop kiro as well as qoder (ai-vault-search.test.ts:60, session-search-transport.test.ts:61), matching the new supportsKiroHistory behavior.
Added the missing supportsKiroHistory: true to the web preload request assertion (web-ai-vault-search-compat.test.ts:24-25).
Re-ran the four AI Vault search suites on this head: 4 files, 35 tests passed. Both prior pullfrog threads are resolved, no new behavior was introduced, and the remaining Windows-only AI Vault failures are pre-existing.
Merged latest main. Since main now negotiates AI Vault search agents generically via supportedAgents (compatibleSearchAgents), I dropped the Kiro-specific supportsKiroHistory flag: adding kiro to AI_VAULT_AGENTS is enough, and flag-era peers never receive it because only an advertised supportedAgents list proves Kiro. Cross-version tests (qoder-history-search-downgrade, session-search-agent-set-downgrade) pass against the real v1.4.211 parser, including the new kiro cases.
…sessions
Takes main's Kiro session history (stablyai#26695) for every file both sides
touched: agent registration, search negotiation, resume command, parse
cache and the kiro parser. The V3 store is re-applied on top in the next
commit.
stablyai#26695 lists the default engine's $KIRO_HOME/sessions/cli store. Sessions
from the opt-in V3 engine (--v3) live in a separate store,
~/.kiro/sessions/<workspace-hash>/sess_<uuid>/session.json with a sibling
messages.jsonl, so they never showed up in Agent Session History.
Add that store as a second root of the same kiro source, locally, under WSL
and over SSH, with its own parser. Rows stay agent 'kiro', so search
negotiation and resume need no change: kiro-cli --resume-id reopens a sess_
id on the engine it was created with.
- The V3 root is the home's .kiro, not KIRO_HOME: kiro-cli 2.27.1 V3 ignores
KIRO_HOME and always writes ~/.kiro/sessions.
- With KIRO_HOME unset the cli/ root sits inside the V3 root, so the V3 walk
skips cli/, UUID and dot directories and only enters sess_<uuid> dirs.
- The session id is the validated sess_<uuid> directory name, as stablyai#26695 does
with the V2 file name.
- A manifest without messages.jsonl lists as a session with no messages.
LDH1103
changed the title
feat(ai-vault): list Kiro CLI sessions in Agent Session History
feat(ai-vault): list Kiro V3 engine sessions alongside the default store
Oct 10, 2026
I rebuilt this PR on top of #26695. The default-engine store, agent registration, search negotiation and the resume command now come from main unchanged.
This PR now only adds the V3 store, ~/.kiro/sessions/<hash>/sess_<uuid>/, as a second root of the same kiro source. It works locally, under WSL and over SSH.
Measured on kiro-cli 2.27.1:
V3 ignores KIRO_HOME.
kiro-cli chat --resume-id sess_… reopens the session on V3 without --v3, so the existing resume command works as is.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Quick win
Scan the KIRO_HOME sessions directory for V3 sessions.
Kiro CLI 2.31.0 and later write V3 sessions under a custom KIRO_HOME. This root scans only ~/.kiro/sessions, so Session History misses those sessions.
When kiroV3SessionsDir is not supplied, add the sessions directory under the resolved KIRO_HOME as a V3 root. Keep ~/.kiro/sessions as a root so sessions written before 2.31 still appear. When both paths resolve to the same directory, scan it once so the walk does not return duplicate rows.
Also update the comment on line 17, which says V3 ignores KIRO_HOME. The test at session-scanner-kiro-v3.test.ts:100 asserts the old behavior and must change with this fix.
Converting this to a draft. The plan in #24177 is to add V3 session history once Kiro CLI v3 is generally available, rather than building more on the beta format, so this shouldn't take review time now.
I'll keep the branch up to date with main until then and update it for the GA store layout. CodeRabbit notes that kiro-cli 2.31.0 and later write V3 sessions under a custom KIRO_HOME, which this PR doesn't handle yet, since I measured on 2.27.1. If you'd rather build it on your side, feel free to close this or reuse any of it.
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
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.
ELI5
#26695 added Kiro to Agent Session History by reading the default engine's store,
$KIRO_HOME/sessions/cli/. Sessions from Kiro's opt-in V3 engine (kiro-cli chat --v3) live in a different store,~/.kiro/sessions/<workspace-hash>/sess_<uuid>/, so they still never show up. This PR adds that store to the samekirosource. V3 sessions now list next to the default-engine ones and reopen the same way.This PR was rebuilt on top of #26695. Agent registration, search negotiation, the resume command and the parse cache now come from
mainunchanged. What's left is the V3 store.What Changed
Before (on
main): only default-engine Kiro sessions are listed. V3 sessions are missing from history and search.After: each V3 session lists as a
kirorow with its title, workspace, model, message count and timestamps. Its preview and search text come from the transcript. Resume uses the samekiro-cli chat --tui --resume-id <sess_id>commandmainalready builds.Mechanism:
src/main/ai-vault/scanners/kiro/session-scanner-kiro-v3-parser.ts(new):session.json:title,workspacePaths[0]as cwd,modelId,createdAt,lastModifiedAt.messages.jsonlwith the sameconsumeCompleteJsonlLinesthe default-engine parser uses.userentries are prompts.assistantentries count only foroperationType: 'Say'; reasoning, summaries and tool calls are skipped.sess_<uuid>directory name, as feat(kiro): report Kiro agent status and list Kiro sessions in history #26695 does with the default store's file name.messages.jsonlyet lists with no messages. Other read errors throw, so the row isn't cached half-read.src/main/ai-vault/scanners/kiro/session-scanner-kiro-sources.ts(new):kiroentry moves out of the shared sources table, which is near its max-lines limit, and gains the V3 store as a second root.filePredicate,contentDependencyPathand the parser dispatch tell the two stores apart by path shape.constituentRootsonly knows roots that the table declares.KIRO_HOMEunset,cli/sits inside the V3 root. The V3 walk skipscli/, UUID-named directories (default-engine task state) and dot directories (.index), and enters onlysess_<uuid>. Nothing is listed twice, and search attributes each file to its own root (longest-prefix ownership).maindropped SSH session scanning in refactor(main): agent detection, automations, skills, AI vault and ephemeral VM drop SSH provider arms #27511, so the V3 store is scanned from local and WSL homes only, both throughsessionRootDirs.Why
Probed with kiro-cli 2.27.1 on Windows 11.
--v2withKIRO_HOMEpointed at a temp dir$KIRO_HOME/sessions/cli/<uuid>.json+.jsonl.--v3with the sameKIRO_HOME~/.kiro/sessions/<hash>/sess_<uuid>/. V3 ignoresKIRO_HOME, so the V3 root is the home's.kiro. It is notresolveKiroHomeDir().kiro-cli chat --resume-id sess_…(no--v3)sess_id, and the previous turn is remembered, so the resume command needs no change.V2 and V3 ids never collide: a UUID versus a
sess_<uuid>. No dedupe is needed.Linked Issue
Refs #17662. The default engine is covered by #26695; this adds
--v3sessions.Visual Proof
N/A, no new UI. These are rows in the existing history list.
For a real-data check, I scanned this machine's
~/.kirowith this branch'sscanAiVaultSessions. It returned 12kirorows with 0 issues: all 7 default-engine sessions and all 5 V3 sessions on disk. V3 rows resume withcmd /d /s /c "cd /d ""…"" && kiro-cli chat --tui --resume-id ""sess_…""".Testing
Automated (Windows 11):
session-scanner-kiro-v3-parser.test.ts:session-scanner-kiro-v3.test.ts:cli/, UUID,.indexand dot directories not listedKIRO_HOMEmoves thecli/storemain: 9 files, 45 passed.maincopy, and 28 of the failures are identical there. They come fromC:\vs/tmppaths, Windows shell quoting, WSL stalls, temp-dir EPERM/EBUSY and FTS5. The other 3 (session-search-store-is-memory) pass when run alone. None involve Kiro.run-typecheck-projects-in-parallelexit 0. On the changed files,oxlint(with max-lines), anti-slop and code-quality (native and type-aware) report 0 diagnostics, and the max-lines ratchet passes.Not live-tested: macOS, Linux and WSL, and kiro-cli 2.28+ (#26695 was validated on 2.29).
AI Disclosure
Implemented with Claude Opus 5.5 (Anthropic) through Claude Code, directed and reviewed by me. The store layout and engine behavior above were measured on a real kiro-cli install, not taken from docs.
Review
KIRO_HOMEhandling and tests are feat(kiro): report Kiro agent status and list Kiro sessions in history #26695's. Its root gets the same directory predicate, which still skips its UUID task directories.~/.kiro/session-index/*.jsonl, the same situation as Kimi.Known limits:
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Companion PR #24937 was rebuilt the same way: it adds V3 status hooks on top of #26695's default-engine hooks. The two PRs share no files.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)