Skip to content

fix: name the other session by its card's label in the edit guard's note - #43

Merged
omartelo merged 2 commits into
mainfrom
fix/edit-guard-names-the-card
Oct 5, 2026
Merged

omartelo merged 2 commits into
mainfrom
fix/edit-guard-names-the-card

Conversation

@omartelo

@omartelo omartelo commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

The edit guard's note named the other session by its lich id (1fd224be-…), which means nothing to the model or the user. It now looks the session up in lich sessions --json (only when a note is added, 2 s timeout) and names it by its card's label, matching on the id field lich 0.60.0 adds (omartelo/lich feat/worker-auto-answer); an older lich, a failing CLI or a gone session fall back to the id. Never fails an edit.

Tests: node 300/300, claude plugin test . 22/22, validate ok.

The note named the session that edited the file by its lich id, which means
nothing to the model or the user. When a note is about to be added, the guard
now asks `$LICH_BIN sessions --json` (2 s timeout) and names the session by
its label, falling back to the id when the CLI fails, the session is gone or
the match is ambiguous.

That roster lists no ids, so the session is found by its roster name, which
lich derives from the id (folder, dash, first four alphanumerics). A session
renamed with /rename falls back to the id; an `id` field in the roster would
close that.
…oster name

Matching the roster name's tail derived from the id broke on /rename and could
collide; lich 0.60.0 lists each session's id in lich sessions --json, so the
guard matches on it and names the id only on an older lich. The tests change
because the roster they script gains the id field.
@omartelo
omartelo merged commit fa09e4b into main Oct 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant