Skip to content

Kiro provider doesn't detect sessions from new storage format (post-Feb 2026) #329

@jileshbalan

Description

@jileshbalan

Kiro provider doesn't detect sessions from new storage format (post-Feb 2026)

Description

The Kiro provider in codeburn v0.9.8 no longer picks up recent Kiro sessions on Windows. Kiro appears to have changed its local storage format around mid-February 2026. The current provider only scans for *.chat files with the {chat, metadata, executionId} structure, but Kiro now uses a different layout.

Diagnostic Info

  • codeburn --version: 0.9.8
  • OS: Windows 11
  • Provider: Kiro
  • Session history size: ~1064 MB total across 4,661 files
    • 1,151 .chat files (old format, pre-Feb 2026) — detected fine
    • 3,510 extensionless files (new format, post-Feb 2026) — NOT detected
    • 6 session directories containing execution files
  • Kiro data path: %APPDATA%\Kiro\User\globalStorage\kiro.kiroagent\<workspace-hash>\

DEBUG=1 Output

> $env:DEBUG = "1"; codeburn status --provider kiro

  Today  $0.00  0 calls    Month  $0.00  0 calls

No debug output produced — the provider silently finds no matching files.

Current Behavior

  • codeburn status --provider kiro shows $0.00 / 0 calls for today and month
  • Old sessions (pre-February 2026) stored as *.chat files ARE detected correctly
  • Recent sessions (March–May 2026) are NOT detected at all

Expected Behavior

All Kiro sessions (old and new format) should be detected and displayed in the dashboard.

Redacted JSON Snippets (New Format)

Format 1: Session index file (flat file, no .chat extension)

Filename: <workspace-hash>/<session-hash> (no extension)

{
  "executions": [
    {
      "executionId": "<uuid>",
      "type": "chat-agent",
      "status": "succeed",
      "startTime": 1770246933449,
      "endTime": 1770247071675
    },
    {
      "executionId": "<uuid>",
      "type": "chat-agent",
      "status": "succeed",
      "startTime": 1770247100000,
      "endTime": 1770247200000
    }
  ]
}

Format 2: Execution file inside a session directory

Path: <workspace-hash>/<session-hash>/<execution-hash> (no extension, inside a directory)

{
  "executionId": "<uuid>",
  "workflowType": "chat-agent",
  "status": "succeed",
  "startTime": 1772352371738,
  ...
}

Root Cause Analysis

The Kiro provider (src/providers/kiro.ts) uses discoverSessions2() which filters for files ending in .chat inside workspace hash directories. Kiro's new storage format uses:

Old format (pre-Feb 2026) — currently supported

<workspace-hash>/
├── <execution-id>.chat          ← single JSON file with {chat, metadata, executionId}
└── ...

New format (post-Feb 2026) — NOT supported

<workspace-hash>/
├── <session-hash>               ← flat file (no extension), contains {executions: [...]}
├── <session-hash>/              ← directory containing individual execution files
│   ├── <execution-hash>         ← JSON file (no extension) with execution data
│   ├── <execution-hash>
│   └── ...
└── ...

The provider's file discovery logic skips these because:

  1. Files without .chat extension are ignored
  2. Subdirectories within workspace hash directories are not traversed

Steps to Reproduce

  1. Install codeburn v0.9.8 globally
  2. Use Kiro IDE (current version, May 2026) for a few sessions
  3. Run codeburn status --provider kiro
  4. Observe 0 calls / $0.00 despite active usage
  5. Confirm .chat files stopped being written after ~Feb 2026
  6. Confirm new format files/directories exist with recent timestamps in the kiro.kiroagent directory

Suggested Fix

The discoverSessions2() function in src/providers/kiro.ts needs to:

  1. Continue scanning for *.chat files (backward compatibility)
  2. Additionally scan for extensionless files in workspace hash directories that contain {"executions": [...]} (session index format)
  3. Additionally scan subdirectories within workspace hash directories, reading each file inside as an individual execution JSON
  4. Parse the new execution JSON structure to extract executionId, startTime, workflowType, and conversation content for token estimation

Labels

bug, provider:kiro

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions