Skip to content

Kiro sessions since 5 Sep are not exported: kiro-cli moved to ~/.kiro/sessions/cli #49

Description

@NetDevAutomate

What is happening

Kiro sessions after 5 September never reach the session database, and nothing reports it.

  • kiro_cli's newest exported message is 2026-09-05 12:28 UTC. Codex, Claude Code and pi exported normally after that date.
  • The Kiro exporter (packages/agent-session-tools/src/agent_session_tools/exporters/kiro.py) reads only ~/Library/Application Support/kiro-cli/data.sqlite3 (tables conversations and conversations_v2). The newest conversations_v2.updated_at is 2026-09-05 12:29 UTC: kiro-cli (now 2.24.0) has written no rows there since.
  • kiro-cli keeps its sessions in ~/.kiro/sessions/cli/, one <uuid>.jsonl and one <uuid>.json per session: 20,019 .jsonl files (2 May to today), 11,169 of them non-empty and newer than 5 Sep 13:00. Nothing in agent_session_tools reads that directory.
  • The periodic sweep (com.sessionweaver.export-sweep, every 4 h) exits 0 with added: 0, updated: 0, skipped: 893, so the loss is silent.
  • The doctor's export_freshness row did not show it either: it reported the newest message across all harnesses (48 h, from Codex).

The new store (key names only)

  • <uuid>.json metadata: created_at, cwd, session_created_reason, session_id, session_state, title, updated_at.
  • <uuid>.jsonl records: {version, kind, data}; kinds seen: Prompt, AssistantMessage, ToolResults.
  • 23 hex-named directories under ~/.kiro/sessions/ are not inspected yet. Open question: which store StudyLoop's web (ACP) Kiro sessions write to.

Decision needed before building

Of the 12,217 sessions created since 5 Sep, 12,212 have session_created_reason: subagent. Most are agent automation: 854 have cwd /, 690 are in ~/.kiro/crew/workspace, and 104 are in the StudyLoop repo. Exporting every session would fill the database with automation transcripts. Which sessions count as the learner's, for example: non-subagent sessions only, or subagent sessions whose cwd is a project?

Recovery

The native files are still on disk, so once the exporter reads this store a backfill recovers the whole gap. Nothing is lost yet.

Done when

  • The Kiro exporter reads ~/.kiro/sessions/cli/ under the rule decided above, with fixtures captured from real kiro-cli 2.24.0 files.
  • A backfill brings the missing sessions in.
  • The doctor's Kiro-store warning (added in the header/doctor clean-up PR) goes quiet on this machine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions