Root Cause
history.jsonl-centric for ralph/portableralph usage (claude --print, often with --output-format stream-json).isAvailable() required history.jsonl, so sessions written under projects-only storage were treated as “adapter unavailable” (cli/src/adapters/claude-code/v1.ts:116).getTraces() returned history-backed traces first and did not surface project-only sessions when history existed but was stale (cli/src/adapters/claude-code/v1.ts:124).getTraceIndexBatch() cursor invalidation only watched history mtime/size, so project-side changes could be skipped forever (cli/src/adapters/claude-code/v1.ts:186).Fix Implemented
cli/src/adapters/claude-code/v1.ts:116).cli/src/adapters/claude-code/v1.ts:124, cli/src/adapters/claude-code/v1.ts:520).projectsMtimeMs, projectDirCount) so non-history updates trigger re-index (cli/src/adapters/claude-code/v1.ts:65, cli/src/adapters/claude-code/v1.ts:659).cli/test/core/adapters.test.ts:1150)cli/test/core/adapters.test.ts:1407).Validation
bun test test/core/adapters.test.ts in cli/ → passing (116 pass).bun test test/core/adapters.test.ts -t "claude-code:" → passing (12 pass).If you want, I can also add a tiny debug/status surfacing in traces status to explicitly show “history stale, using project fallback” so these cases are easier to diagnose in production.