Skip to content

feat: answer a side question from lich with a fork of the session - #30

Merged
omartelo merged 3 commits into
mainfrom
feat/ask-session
Oct 5, 2026
Merged

omartelo merged 3 commits into
mainfrom
feat/ask-session

Conversation

@omartelo

@omartelo omartelo commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Client side of lichdotdev/lich#649: the mod answers an ask with $.model.fork, wrapped so the fork answers from the conversation without trying a tool, and returns the reply in the ack (cut at 16,000 characters). An ask still answering holds back no other command.

Tests: node 250+ green, claude plugin test . green. Fixtures read at the pushed lich commit until a release ships the contract; move tests/lich-ref and drop the pin then.

The mod-control contract adds an ask kind: the mod answers it with
$.model.fork, the question behind a preamble saying tools are unavailable
(without it a mid-turn fork reaches for one and answers in a second request,
measured on Claude Code 2.1.289), and acks the reply in the new answer field,
cut at 16,000 UTF-16 units. A fork can run past a minute, so an ask starts the
moment its poll returns and is chained behind nothing, nor anything behind it.

The contract is in no lich release yet: refresh-fixtures.sh now reads the two
mod-control fixtures at lich 8b06b79 (branch feat/ask-session), and the
vendored copies are that commit's byte for byte. CI's drift check fails until
that commit is pushed.

Tests changed because the contract changed: the fake engine serves model.fork,
and the every-shape test expects the ask's fork ahead of the queued commands and
its ack in no fixed place. contract.mjs models the two new rejected cases.
Measured in lich's live smoke: a prompt whose first reply is still streaming is
not in the fork either.
@omartelo
omartelo merged commit 683fedd 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