Skip to content

Kiro CLI 1.0.288 sessions not discovered — transcripts moved to ~/.kiro/sessions/<workspace-hash>/sess_<id>/messages.jsonl, not ~/.kiro/sessions/cli/*.jsonl #1499

Description

@lachlansimpson

agentsview version

agentsview v0.41.1 (commit a902515, built 2026-08-18T13:35:26Z)

Install method

install.sh / install.ps1

OS / platform

Ubuntu 24.04.4 LTS (x86_64)

Which agent and version

Kiro CLI 1.0.288 (ec90738d3f0da2389adcb94a6661b5abf1fc20e8, x64)

Which model(s)

qdev::auto — it's on reasoningModelId in assistant records; session.json.modelId is null

What happened, and what did you expect

The kiro provider only discovers the flat legacy layout ~/.kiro/sessions/cli/<uuid>.jsonl. Kiro CLI now writes transcripts per workspace instead:

~/.kiro/sessions/<workspace-hash>/sess_<uuid>/messages.jsonl

So no Kiro session has been ingested on this machine since 2026-08-13, although I use Kiro daily and today's sessions are on disk. Expected: sessions created after the layout change show up like any other agent's.

The daemon is otherwise healthy — it incrementally syncs Claude Code sessions in the same watch cycle, and no error is logged. The only hint is the discovery count, which looks plausible (~/.agentsview/debug.log):

2026/08/24 10:39:27 discovered 297 files (93 claude, 1 codex, 159 copilot, 0 gemini,
  0 cursor, 0 amp, 0 zencoder, 0 iflow, 16 vscode-copilot, 0 visualstudio-copilot,
  0 pi, 0 omp, 24 kiro, 0 zed, 0 vibe) in 93ms

That 24 kiro is exactly my 23 stale legacy .jsonl files plus ~/.local/share/kiro-cli/data.sqlite3. The 32 current transcripts under the new layout are not in the set. Newest kiro rows in ~/.agentsview/sessions.db confirm it:

kiro:e8e37560-c9c7-44fa-9412-d5ebe79ade3d  ended 2026-08-13T06:08:44Z  176 msgs
kiro:ea09aafc-0c15-4e2d-8514-a0df1492b28a  ended 2026-08-13T05:46:09Z  110 msgs

Two things make this harder to work around than it looks:

  • ~/.local/share/kiro-cli/data.sqlite3 is already known to the binary (kiroDBPathForEvent, kiroDBUnderRoot), but on 1.0.288 both conversations and conversations_v2 are empty (0 rows). Transcripts are filesystem-only.
  • ~/.kiro/sessions/cli/ still gets a sess_<uuid>.history file per session — prompt-input history, no transcript — so the legacy directory keeps a fresh mtime while holding nothing ingestible.
  • There's no KIRO_SESSIONS_DIR equivalent to CODEX_SESSIONS_DIR / TRAEX_SESSIONS_DIR / VSCODE_COPILOT_DIR, so there's no user-side override either.

Suggested fix, alongside kiroLegacyPathUnderRoot: also walk ~/.kiro/sessions/*/sess_*/messages.jsonl; dispatch the parser on record shape ({kind,version,data} → legacy, {id,timestamp,payload} → new); take the session id from the sess_ directory name and title/timestamps/project from the sibling session.json (workspacePaths[0] is more reliable than reversing the workspace hash); skip sessions/cli/sess_*.history. Legacy sessions keep parsing unchanged, so this can be purely additive. A KIRO_SESSIONS_DIR override would be a bonus.

The kiro provider only discovers the flat legacy layout ~/.kiro/sessions/cli/<uuid>.jsonl. Kiro CLI now writes transcripts per workspace instead:

~/.kiro/sessions/<workspace-hash>/sess_<uuid>/messages.jsonl

So no Kiro session has been ingested on this machine since 2026-08-13, although I use Kiro daily and today's sessions are on disk. Expected: sessions created after the layout change show up like any other agent's.

The daemon is otherwise healthy — it incrementally syncs Claude Code sessions in the same watch cycle, and no error is logged. The only hint is the discovery count, which looks plausible (~/.agentsview/debug.log):

2026/08/24 10:39:27 discovered 297 files (93 claude, 1 codex, 159 copilot, 0 gemini,
    0 cursor, 0 amp, 0 zencoder, 0 iflow, 16 vscode-copilot, 0 visualstudio-copilot,
    0 pi, 0 omp, 24 kiro, 0 zed, 0 vibe) in 93ms

That 24 kiro is exactly my 23 stale legacy .jsonl files plus ~/.local/share/kiro-cli/data.sqlite3. The 32 current transcripts under the new layout are not in the set. Newest kiro rows in ~/.agentsview/sessions.db confirm it:

  kiro:e8e37560-c9c7-44fa-9412-d5ebe79ade3d  ended 2026-08-13T06:08:44Z  176 msgs
  kiro:ea09aafc-0c15-4e2d-8514-a0df1492b28a  ended 2026-08-13T05:46:09Z  110 msgs

Two things make this harder to work around than it looks:

  • ~/.local/share/kiro-cli/data.sqlite3 is already known to the binary (kiroDBPathForEvent, kiroDBUnderRoot), but on 1.0.288 both conversations and conversations_v2 are empty (0 rows). Transcripts are filesystem-only.
  • ~/.kiro/sessions/cli/ still gets a sess_<uuid>.history file per session — prompt-input history, no transcript — so the legacy directory keeps a fresh mtime while holding nothing ingestible.
  • KIRO_SESSIONS_DIR / kiro_dirs exist, but can't express the new layout: legacy discovery only matches .jsonl files directly in the root, so pointing either at ~/.kiro/sessions still finds nothing two levels down.

Suggested fix, alongside kiroLegacyPathUnderRoot: also walk ~/.kiro/sessions/*/sess_*/messages.jsonl; dispatch the parser on record shape ({kind,version,data} → legacy, {id,timestamp,payload} → new); take the session id from the sess_<uuid> directory name and title/timestamps/project from the sibling session.json (workspacePaths[0] is more reliable than reversing the workspace hash); skip sessions/cli/sess_*.history. Legacy sessions keep parsing unchanged, so this can be purely additive. A KIRO_SESSIONS_DIR override would be a bonus.

Sample session file or snippet

Layout comparison
=================

LEGACY (last written 2026-08-13 on my machine)
  ~/.kiro/sessions/cli/<uuid>.jsonl        <- transcript
  ~/.kiro/sessions/cli/<uuid>.json
  ~/.kiro/sessions/cli/<uuid>.history

CURRENT (Kiro CLI 1.0.288)
  ~/.kiro/sessions/<workspace-hash>/sess_<uuid>/messages.jsonl   <- transcript
  ~/.kiro/sessions/<workspace-hash>/sess_<uuid>/session.json     <- metadata
  ~/.kiro/sessions/<workspace-hash>/sess_<uuid>/snapshots/<id>/  <- file snapshots
  ~/.kiro/sessions/<workspace-hash>/sess_<uuid>/publish.cursor
  ~/.kiro/sessions/cli/sess_<uuid>.history                       <- prompt history only


Legacy record envelope: {kind, version, data}
=============================================
{"kind": "Prompt",           "version": "v1", "data": {...}}
{"kind": "AssistantMessage", "version": "v1", "data": {...}}
{"kind": "ToolResults",      "version": "v1", "data": {...}}


New record envelope: {id, timestamp, payload}, discriminator on payload.type
===========================================================================
(content values redacted; key structure intact)

{"id":"<redacted>","timestamp":"<redacted>","payload":{"type":"user","content":"<redacted>","documents":[],"images":[],"_meta":{...}}}
{"id":"<redacted>","timestamp":"<redacted>","payload":{"type":"assistant","content":"<redacted>","executionId":"<redacted>","operationType":"<redacted>","reasoningModelId":"qdev::auto","reasoningSignature":"<redacted>","_meta":{...}}}
{"id":"<redacted>","timestamp":"<redacted>","payload":{"type":"tool_call","toolName":"<redacted>","toolCallId":"<redacted>","args":"<redacted>","actionType":"<redacted>","kind":"<redacted>","status":"<redacted>","title":"<redacted>","executionId":"<redacted>","_meta":{...}}}
{"id":"<redacted>","timestamp":"<redacted>","payload":{"type":"tool_result","toolCallId":"<redacted>","content":"<redacted>","success":true,"executionId":"<redacted>","_meta":{...}}}


payload.type histogram, one 258 KB session (314 records)
========================================================
   77  assistant
   59  session_metadata          (key is always "contextUsage" in this session)
   57  tool_call
   57  tool_result
   14  pending_interaction
   14  interaction_resolved
   14  ContextualHookInvoked
    4  user
    4  turn_start
    4  usage_summary
    4  session_event
    4  turn_end
    1  steering_inclusion
    1  session_start

turn_start / turn_end should make turn boundaries cheaper to derive than in the legacy
format. Caveat on usage: usage_summary carries no token counts. Shape is
{type, executionId, status, elapsedTime, requestIds[], promptTurnSummaries[]}, and each
promptTurnSummaries entry is {unit, unitPlural, usage: <float>, usedTools[]} — i.e. Kiro
credits, not tokens.


session.json (values redacted, keys intact)
===========================================
{
  "id": "<redacted>",
  "schemaVersion": "1.0.0",
  "dataModelVersion": 1,
  "title": "<redacted>",
  "description": "<redacted>",
  "status": "idle",
  "agentMode": "vibe",
  "modelId": null,
  "createdAt": "2026-08-23T23:54:14.859Z",
  "lastModifiedAt": "2026-08-24T00:51:42.067Z",
  "workspacePaths": ["<redacted absolute path to project>"],
  "autopilot": ..., "ftaEnabled": ..., "semanticReviewEnabled": ...,
  "specPlanEnabled": ..., "specSkipClarificationEnabled": ...,
  "specWorkflow": ..., "workflowsEnabled": ..., "_meta": {...}
}

modelId is null; the live model appears as reasoningModelId on assistant records.
workspacePaths[0] is the project path. (~/.kiro/workspace-roots/<hash>/.trust-migration.json
also has a "root" field, but only for workspaces that went through trust migration, so it
is not a complete hash -> path map.)

Steps to reproduce

  1. Install Kiro CLI 1.0.288 and run a session in any workspace.
  2. Confirm the transcript exists under the new layout:
    find ~/.kiro/sessions -mindepth 3 -name messages.jsonl -newermt today
  3. Confirm the legacy directory got only a prompt-history file, no transcript:
    ls -la ~/.kiro/sessions/cli/sess_*.history
  4. Trigger a sync (agentsview sync, or wait for the watcher) and check the discovery line in ~/.agentsview/debug.log — the kiro count does not include the new sessions.
  5. Query the DB — nothing after the layout change:
    sqlite3 ~/.agentsview/sessions.db "select id, ended_at from sessions where id like 'kiro%' order by ended_at desc limit 5;"

Checklist

  • I searched existing issues
  • I removed secrets and private data from any attached session files

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions