fix(cli): list sessions across all projects instead of crashing - #13896
Merged
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by grok-4.6 · Input: 171.6K · Output: 5.7K · Cached: 135.2K Review guidance: REVIEW.md from base branch |
marius-kilocode
approved these changes
Sep 7, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
kilo session list --allcrashes withError: Unexpected error — undefined is not an object (evaluating 'f.id.length')in table format, or'L.time.updated'with--format json. Exit code 1. Plainkilo session listworks fine.Root cause
The
--allbranch of the list handler spread the result ofSession.listGlobal():[...Session.listGlobal({ roots: true, ... })].listGlobalreturns anEffect, and an Effect'sSymbol.iteratoris the single-shot generator adapter meant foryield*insideEffect.gen— so the spread produces a 1-element array containing an internal Effect wrapper, not session rows. The formatters then dereference.id/.time.updatedon that wrapper and crash.The flag was added in 93ce148 when
listGlobalwas still a synchronous generator (spreading was correct then). When the non---allbranch was later migrated toyield* Session.Service.use(...), the--allbranch was missed.Fix
Yield the service method instead, mirroring the non-
--allbranch:yield* Session.Service.use((svc) => svc.listGlobal({ roots: true, ... })).svc.listGlobalself-providesDatabase.Service, so no extra wiring is needed.Verification
Adds a
session list --allcase to the read-only CLI smoke suite — it fails on the old code and passes with the fix. Also verified end-to-end from source against a database with sessions in multiple projects: table and JSON output both render correctly.