The CLI's side of harness spec 3.11.0, on serve --stdio and on the link.
- acp/editor.ts: _lembas/complete (one HTTP request with the login the
agent holds, the window trimmed, a newer request closes the older one's
connection and that one is answered as cancelled), _lembas/edit (one
model request with no tools; the stream cleaned of a fence around the
whole answer and given the selection's ending; deltas; cancel),
_lembas/models, _lembas/editor/settings, the editor block of a prompt,
and ACP diff items.
- acp/files.ts: _lembas/fs/list, stat, read, write, mkdir, move, copy,
delete, search. A path is judged where it really is, symlinks followed
first; outside remote.roots, the CLI's own directories and protected
paths are refused, and so is a folder that holds them; read-only where
the device allows plan mode only. A write is checked against the hash
the client last saw, twice for an upload in parts, and put in place
whole. A delete goes to the system's trash or is refused until the
client says permanent.
- tool/buffers.ts: read, write, edit, multiedit and apply_patch take a
file's text from the client's editor and write through it where the
client offers ACP's fs methods; any failure there is the disk. The call
is judged before any of it, as before. An overwrite of text that changed
in the editor since it was read is refused.
- A tool's preview gives each file's text before and after beside the
unified diff; a client that said editor: true gets them as diff items on
the approval card and on every finished edit. The texts are kept only
for such a client.
- tool/show.ts: to a client that said media: true a file that is not text
is handed over by a handle (_lembas/show/read), good while the request
is open and for that file as it was; a table, an SVG and a notebook are
named. On stdio the request also says where the file is.
- The hardline, the modes and the rules are untouched; tool/replace.ts is
untouched.
Tests: tests/acp-editor.test.ts (19), tests/acp-files.test.ts (13), and
the conformance areas editor, device_files and show.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Spec (3.10.0, unreleased; part of capability harness_turns), acp.md
_lembas/steer:
- A session/prompt whose turnId is the messageId of a steered message the
device still knows does not run. It is answered at once, stopReason
"end_turn", with _meta.lembas.steered: "taken" (the model has been given
it), "carried" (it waits for the next turn's first step) or "waiting" (it
is in the running turn's queue). A client that lost the link and cannot
tell what became of a message can send it again safely. An id handed back
as unsent is the client's again and runs. The ids of the last 200 messages
taken in are kept with the session, across a restart.
- A prompt's turn that ends with no link up carries its too-late steers to
the next turn's first step, as a turn the harness started does: unsent in
an answer nobody reads was a message lost. With a client there, unsent as
before.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Seven findings of a review of the wake-turn work, each with a test that
failed before (tests/acp-outstanding.test.ts).
1. A session whose subagents work, or whose background command runs, with no
turn running was idle to the service: an update restarted it under them
and a terminal opening the session stopped them, so no report came. It is
occupied now (acp/agent.ts occupied, keeps; hub.busy): no restart, no
close of the link, and a terminal is refused in words that name what runs
— also while no link is up, when nothing judged it at all.
2. A scheduled run that used a team answered with the reply that ended the
main agent's first turn, and the real answer came in a turn report_write
was not offered in. The run's turn now waits for its subagents and takes
their reports in (engine awaitReports, EngineOptions.hold): one turn, the
answer and the report from its last reply.
3. Stop while a turn waited for a model slot lost the note that started it
(and a person's own message, and whatever waited to go in with it): the
message is in the conversation now, under the turn's id.
4. A steer a harness turn never took in, with no client listening, stayed in
memory: lost by a restart, and in queue mode handed back with a later
prompt. It is kept with the session (CARRIED_META) and taken in at the
next turn's first step in every mode, said with its id.
5. A wake refused for an interactive-only model left the main agent marked
working, holding its slot, and dropped the report: the session is idle
again and the note is kept for the next message.
6. Stop on a scheduled run stops its subagents, as does any other end of the
run's turn with subagents out. In a chat Stop stops the turn and no
subagent, as the terminal's Esc does: pinned by a test, not changed.
7. The task end that carries unsent is said before the inbox event that
empties the queue.
Notes left after a Stop are kept with the session too (engine.keepNote), so
a restart does not lose them. AcpAgent.holding, anyBusy and drop had no
caller left and are gone.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Amended before any release carried 3.10.0, after a review of the implementation.
No capability, field or method is added.
- acp.md, Scheduled work: a scheduled turn does not end while a subagent it
started is still out. The turn stays open (waiting_for_subagents), each
report comes into the same turn, the answer's text and report are from the
last reply. Background commands are not waited for. Stop on a scheduled
turn, and any other end with subagents still out, stops them.
- acp.md, A session that still has work out: with no turn running, a working
or waiting subagent, a report about to wake the main agent, or a background
command makes the session not idle for the device: the link is not closed
for a change of limits, a service does not start again for an update, and
a terminal that opens the session is refused in words.
- acp.md, session/cancel and A turn the harness starts: Stop stops the turn
and no subagent; a turn stopped while it waited for a slot is in the
history like any stopped turn; undelivered notes are kept with the session.
A steer nobody could be handed is kept with the session and taken in at the
next turn's first step, never also handed back; the task end that carries
unsent comes before the inbox event that empties the queue. A wake that may
not start a turn leaves the session idle and the note kept.
- reports.md §2: the run is the schedule's turn, whole.
- conformance/outstanding.json (8 cases) and its runner,
src/session/outstanding.ts.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
From an independent review of the round. Spec and CLI together.
- A scheduled prompt for a session open in a terminal is judged, then
refused (data.reason terminal) instead of being passed to the terminal as
a person's turn on the terminal's model.
- A schedule's session keeps its model with it: opened from the store again
— or in a terminal — it is on the model it had, and stays a schedule's
session there (nothing in it becomes the directory's model).
- On a refused scheduled turn nothing about the session is changed; a
command's interactive-only model in one is the same -32602 with its
reason. In a schedule's session a turn a job wakes, and a subagent started
with no person's turn running, are still scheduled work.
- A rerouted title or summary is counted under the model that was asked and
that model is named; a model that cannot take a summary (window too
small, no tools) is nowhere to go.
- A borrowed model is given back with returnModel, so a command whose model
is the session's own leaves nothing borrowed. What is remembered goes
through records(), the rule the conformance cases test; a change of model
inside a turn the harness started is not remembered.
- models.json: a directory's time is refreshed as it is used; a write stats
nothing, and gone directories are dropped apart from any turn.
- lembas run with no terminal says the way forward, in the refusal and in
--help.
- Permission rules: a rule written again (the same permission and pattern,
later) sets the earlier one aside, as a narrower one does. Cases pin it.
- Conformance and the examples use made-up model names.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Harness spec 3.9.0 (interactive.md), the CLI's side.
- interactive_only is read from /v1/models; /model says which models are
for interactive use only.
- A session's title and its compaction, asked for or automatic, are not
asked of an interactive-only model: they go to its twin, else to the
global model or the server's default when that is not interactive-only;
with none the title is left, automatic compaction is skipped and said
once, and a compaction asked for is refused in the spec's words.
- Scheduled work never uses one: a scheduled session/new or session/prompt
is refused with the sentence and data.reason interactive_only before
anything is sent, a scheduled turn cannot switch to one or start a
subagent on one, and a scheduled session opened with no model skips one
the directory remembers. lembas run with no terminal at all is the same.
- A person's turns, and the subagents of their session, are untouched.
Also the type of LOOP.interactive, which the spec commit left too narrow
for the JSON it reads.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Still 3.9.0, unreleased. A model served through a connection its provider
sells for a person's own turns only says interactive_only: true.
- interactive.md: what is interactive and what is not; scheduled work never
runs on such a model (a schedule may not name one, a run fails with the
sentence, a device refuses the scheduled turn itself and its subagents, a
one-shot run with no terminal ends at once); a session's background calls
— its title, its compaction — go to the model's twin, else to a default
that is not interactive-only, else are skipped or refused in words.
- models/schema.json: interactive_only. loop.json: interactive (the field,
the reason, the two sentences, what each background call does).
- acp.md: the field on /v1/models, data.reason interactive_only, the run's
model.
- conformance: interactive.json (twin, background, scheduled); three cases
in last_model.json.
The rules as functions, for the cases; the CLI's wiring follows.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
How a schedule opened its session (its notify-when among it) lived in the
agent's memory only. After a restart of the service a continuing schedule's
session came back from the store without it, and its next run was told to
file a report with a tool it had not been given. It is kept in the session's
meta now, where the mark that a schedule opened it already was.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Harness spec 3.9.0, the CLI's side.
- A session starts on: the model asked for, the project's setting, the
model last used in exactly this directory (while the login serves it),
the global setting, the server's default.
- The directory's model is written when a person's prompt starts a turn and
when the person changes the model (/model, a setting, _lembas/configure, a
shared terminal's session) — to models.json in the state directory, and
nowhere else. Not for a turn the harness started, a command's own model, a
one-shot run, or anything in a session a schedule opened (kept in the
session's meta, so it holds after a restart).
- _lembas/directories: `model` on each directory a session may be opened
in, and `list: false` for one directory alone; capability
directory_model.
- /schedule names each schedule's type, Chat or Agentic, and /schedule new
offers the two by name.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The harness spec, written ahead of both implementations.
- acp.md: a new section, "The model last used in a directory" — what the
device remembers and when, how a session of its own starts, what
_lembas/directories says (model on a Dir, list: false, capability
directory_model) and the client's rule. Scheduled work: the two types of
schedule, the run's model, and that a run never becomes the directory's.
- permission/rules.md §2: a narrower rule that a later one narrows again is
set aside, so .env.example is read after a broad allow as before it.
- conformance: last_model.json (start, record, client), six cases in
rules.json.
The CLI's side so far: the rule lookup, and the three rules of the new area
as functions; the memory itself and the link follow.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On the shared menu: unread first with the schedule and when; a report's
own menu — read it here (rendered in the transcript, a page as its note,
marked read), reply (the report and the person's words to this session's
agent), mark read, delete (asked once); ctrl+r and ctrl+d in the list.
/reports <id or title> reads one; lembas run prints the list or a report
as text. Built against a provisional /api/v2/reports contract, marked in
src/lembas/reports.ts. /schedule new takes notify-when: the default
condition, the person's own words, every run, never.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
reports.md, tools/report_write.json (requires: scheduled), loop.json
scheduled.notify: a schedule's run files a report or leaves a history
line; notify when always | when | never with the instruction for each, in
the run's prompt; one report per run; the answer filed under always;
[SILENT] retired. A run on a linked computer carries its report in the
turn's answer (acp.md, capability reports). conformance/reports.json.
pages.md, prompts/blocks/html-pages.md, loop.json pages, models/schema.json
html_pages: a reply may carry a complete page in an html-view fence, when
the instance, the model and the chat all say so; never to a subagent, the
phone assistant or an agent chat. The note, the text projection, the
session note. blocks/prototypes.md, the prototypes context field and
capability, and conformance/prototype.json are gone; conformance/pages.json.
permission/rules.md, conformance/rules.json: the candidate and the floors
a later-made rule gives way to, and what making a rule does — for a rule
typed into a file as for one a menu wrote.
The CLI carries it: report_write in a scheduled turn, the pages fence read
and noted in the transcript (/pages; prototypes: true dropped with a
line), the model's html_pages kept and unused, lookupRule the strictest of
the floors, judgeNewRule.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A command that takes no words is the command only alone, and /mcp <word>
only for a server's name: anything else is a prompt. lembas run --json
gets the text as an event and the end; a command that could not do what
was asked exits 1. /command <name> runs a custom command by name (TUI and
link), /skill works over the link, and a custom command hidden by a
built-in's name is said once at start. The start-up line for a failed MCP
server is cleaned, redacted, and promises only what every front end has.
The status bar's MCP subscription is dropped with the screen.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The box is laid out in the rows there are (the detail under the list and
then the body above it give way first); a menu whose rows have a detail
keeps that space, so the list does not jump; a paste goes into the filter
or the text a menu takes (Add a rule); Enter on an inert row (a key in
/help, a /status row with nothing behind it, a line of an error) does
nothing. A finished job's line keeps the warning sign when it did not end
well.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
setRule appended a sourceless rule last, so 'read * allow' shadowed the
default 'read *.env: ask' and 'bash allow' the user's own 'rm *' deny, and
wrote it to the project. Now: choosing what is in force is a no-op; a rule
the user's own config or a written deny takes in whole is refused; a rule
that is made is a project's rule in the session as in the saved file, and
a rule made after the written ones (project, 'always', menu) decides what
a broader rule decided, never what a narrower stricter one did — lookupRule
keeps the strictest narrower match. The menu says where the rule holds,
whether it was saved (a failed save is said), and which stricter rules
still apply. Removing a session rule removes its saved copy.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Lines begin with "- " instead of an indent: one to a line in a terminal
and where the reply is drawn as markdown (the web UI).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
/help: every command under a heading, found by typing, run or put in the
box. /permissions (new): the rules in force by where they were made;
change, add, remove. /status (new): server, model, session, project, MCP
and terminal on one screen, what needs attention marked, enter opens what
changes it. /agents: a menu. Each has its text for where there is no menu
(session/report.ts): over the link, and lembas run now prints a
message-kind command instead of sending it to the model.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The dialog every picker uses gains sections, state marks, a body, a line
about the highlighted row, esc-goes-back, paging and a position in long
lists. /mcp is a menu on it: the servers by where they come from, with
state and what they offer; a server's actions (reconnect, off/on — kept
for a trusted project —, sign in/out, the last error in full), its tools
with their permission rule, changeable there (engine.setRule: the session,
and the project when trusted; never under the user's own stricter rule),
and its prompts. /mcp <name> opens one. Where there is no menu — over the
link, lembas run — /mcp is a plain table (mcp/text.ts).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Every bus notice was drawn with the warning sign, whatever it said, and a
server that connected said so at each start. A connect now says nothing
(the status bar counts: MCP 2, MCP 1/2); a server that failed or needs a
sign-in gets one line naming it and /mcp <name>. Notices carry a level —
info, success, warn, error — drawn from one table (tui/notices.ts) in the
transcript and in lembas run; the informational ones say so.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Paste placeholders: the extmark is placed from the cursor after the insert
(a paste over a selection put it at the wrong range and sent the bare
label); a placeholder is atomic (cutting into its label removes all of
it); the same paste opens a placeholder only with the cursor where the
first paste left it; a paste of white space is not a clipboard read; a
data URL that is no image is pasted as text. The label is shown in this
transcript only: the prompt event and the session's title get the words.
kitty OSC 5522: the box's input is held during a read, input that arrives
meanwhile means a packet was lost (OpenTUI flushes an unfinished OSC after
about 20 ms), what arrives is believed by its bytes and must be a whole
image — else one line and nothing saved. It can still fail on a stalling
connection, so it is off unless kitty_clipboard: true.
The approval card over the link keeps the whole command (or the tool's
name) as its title and carries _meta.lembas.tool; spec text says so. The
stored end of a turn is tied to the conversation's length, so /undo, a
rewind or a compaction takes it away. A refused call is titled from
schema-parsed arguments. A stored call with no result is failed; the
person's own !command is not failed by the turn's end; 59.96 s is 1m 00s
(conformance case).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
callTitle is the one title of a tool call: on the tool_start event, in the
transcript (argSummary is gone), as running_tool's what (callWhat is
gone), in lembas run and as the link's tool_call title; a refused call
carries _meta.lembas.denied and its title. A finished call shows what its
result adds and how long it took; a denied one its reason and no time; a
call still running when its turn ends is failed.
stopped and failed are drawn as the spec's line on the reply (budget too),
once, in the TUI and in lembas run, and kept with the session (meta
'ended') so a resumed session says it again. waiting_for_subagents counts
the foreground task calls and the session's running subagent jobs. Numbers
go through the terminal's locale; the working line has one clock.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
harness/display.md, loop.json display, conformance/display.json.
A tool call has one short title made from its arguments (questions and
patch by what they name, else the first non-blank string among the listed
keys; first line, 80 characters): the same in the transcript, as
running_tool's what and as the link's tool_call title. Pattern and query
now come before path, so a grep is titled by its pattern. Four states
(running, done, failed, denied), a finished call's duration, an edit's
+added −removed counted by the diff's hunks, a command's non-zero exit, a
search's hits; the kinds of block. stopped and failed stay on the finished
reply as the progress text alone. The approval, question and plan cards'
actions. Numbers in the client's locale format; conformance texts plain.
The pure functions (src/session/display.ts) answer the new area; the
clients' drawing follows. progress gains the budget stop; the README's
lost 3.5.0 heading is back.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The shared-command test caught the four new TUI commands missing from TUI_COMMAND_NAMES, so a
project command could have taken one of their names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
acp.md: a turn without agents keeps the device's own setting (an older server), as before 3.4.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
team/team.ts: ids, positions, parents; only the main agent adds, assigns, replaces, stops and
decides; sub-managers; slots; modes inherited and never widened, request options and grants;
findings; team_finish; pause and out_of_context; ended subagents kept; the tree's data.
Seven new tools. A subagent's call is decided by team/delegation.ts (itself, the main agent
through a request, or the person). Its engine does not compact: at pause_at it is paused and
gets one final turn. Every engine says its progress as phase events (session/progress.ts).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conformance areas progress and delegation pass. delegation.json: own_reason marks the cases
whose deny reason is each project's own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/effort's Subagents row and /team size are a two-handle range from 1 to the cap (left/right move
the handle in focus, tab the other, enter sets both); the dialog gains a range row. Every text says
Min and Max, never fewest/most, and that the count includes this agent: "Subagents: Min 1, Max 4 -
1 is this agent alone". /settings shows the same beside agents.min / agents.max; config schema
and the bounds refusal likewise. CHANGELOG in the 2.0.0-beta.5 section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A task subagent or a team member runs on the session's model unless the
person named another in this session's own messages (team/subagents.ts;
engine.personSaid reads every prompt and mid-turn message, compacted ones
included). Not named: refused; an agent file's own model is not used.
- Another model on the session's one-model server is refused; a one-request
session model is not its own subagent, and nothing else is picked.
- The team is offered when a model could serve: the session's with two
slots, or any usable model off its one-model server; the size note adds
team_own when the session's model cannot serve its own.
- "Subagents" in /effort, /team, /settings and the config schema; the status
bar reads "agents 3/4 · 2 subagents working".
- /context: used of the window, one bar by category, each category's share,
what is free, and "N until auto-compact".
- Conformance runner for the subagents area (26 cases); helper -> task.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The four team tools (tool/team_tools.ts) on the rules of team/team.ts,
driven from real turns by team/runtime.ts:
- Members run on the subagent job machinery (app.ts spawn with `member`):
background, unattended, their own prompt from blocks/team_member.md
(the whole of team_lead.md for one with lead: true), team_send and
team_read (team_add and team_stop for one that leads). Not jobs to the
model: job_list and the job_* tools skip them; a client over the link
still sees them as subagent jobs named "<name>: <role>".
- The room: messages and reports with their marks, delivered at the next
step boundary or waking a finished member or the idle lead; report
posts to the manager.
- A manager's work calls answer the refusal before the permission check,
by risk class (an MCP tool by its readOnlyHint); the tool list is
unchanged. job_stop and reading bash stay.
- Slots: the lead waits for one before its turn (Esc stops the wait);
members wait in order; task helpers in a team count toward the size
and hold a slot; job_send restarting a helper is refused when full.
- The offer is decided with the prompt and kept with it: a resumed
session takes it from its kept tool list.
- The size: agents.min/max settings, refused outside 1 <= min <= max <=
cap, kept across /new and resume; said in a note on the first message,
after a change, after a compaction and a rewind.
- TUI: /team (tree and room, size, stop a member, dialogs for both), an
"agents" row beside the effort in /effort, "team n/max" in the status
bar. /team works over ACP too.
tests/team.test.ts runs a lead, a member and its report through the app.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Levels (models/schema.json levels): provider/effort.ts levelsOf/levelFields/
readLevel — `off` only with thinking_switch and sends enable_thinking false
and no effort, `default` for a model that takes no efforts and sends
nothing, a level not offered is read as the start level. The engine's
effort is a level; /effort shows nothing for one level, a Thinking switch
for [off, X], a list otherwise; the status bar follows. /v1/models'
thinking_switch, efforts [] and capacity.parallel are read
(lembas/webui.ts); session/capacity.ts counts parallel slots.
Reasoning (context.md §8): an assistant message of the current turn
carries reasoning_content (provider/common.ts turnReasoning,
openai-chat.ts); step-boundary deliveries, nudges and the wrap-up are
marked turn: false and do not start a turn.
Paths (context.md §11): the <env> block names the project and, started
below the root, that directory relative to it (assemble.ts envLines);
instruction files and @ attachments are named from the root or as ~/…;
file tools and bash resolve relative paths against the project root.
The team rules (team/team.ts) and conformance runners for levels,
reasoning, paths and team; the team runtime follows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The system prompt is made once per session (start, compaction, model
switch), kept in session_meta and resent byte for byte; it holds no
date. What changes mid-session -- the date, a mode the person chose, a
plan or memory or instruction file they edited, a personality, MCP
instructions that arrived later -- is a <session-note> on the next user
message, stored with it. The tool list is fixed for the session:
plan_submit is always offered and answers unavailable outside plan
mode, the wrap-up keeps the tools and runs no call, a withdrawn tool
stays listed and answers its refusal; the first request waits up to
mcp_wait_ms for MCP servers. Compaction asks for its summary as the
next turn of the same conversation. Cached input tokens are parsed
(incl. llama.cpp timings), stored per request and shown in /context.
Spec: context.md §7/§10, loop.json context.note (+ plan_ended,
plan_own, personal, empty, mcp_wait_ms), modes.json plan.refused,
compact.md without the transcript heading. Conformance area prefix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
context.md and loop.json `context`, spec 3.0.0-draft:
- A stub names only a result in the request being built. A chat on the
server sends no earlier reply's tool results, so a read in the next reply
is answered in full there; the CLI, which resends every result, keeps
stubbing across steps. Said for reads and for repeated listings alike.
- The compaction table is drawn from the reads the summary covers: the
full reads since the previous compaction in turns still in the history,
whether or not the request still carries them. A turn taken back takes
its reads with it. The CLI's dedupe table is exactly that set; a chat
finds it in what it stored.
- Ids are the result's number in the session, in hex, at least 4 digits
(#0001); the examples and the prompt block now use such ids.
- A bracket names the path as the call gave it; what identifies a file
is its absolute path.
Conformance `context`: a `reply` step (a request carrying none of the
results so far) and a case for both rules. The CLI's runner keeps the
history apart from the request; compactionTable takes the reads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LLeMbas CLI 2.0 is LLeMbas-server-specific (CLI rule 2). Removed: the
anthropic, gemini, ollama and responses clients, context discovery and
llama-swap unloading (discover.ts), the Connection schema with its dialect,
auth, key_cmd, discover, unload_url and one_model_at_a_time, the model
`fallback` (it only ever moved to another server), effort_map and cache, and
the multi-connection refs. Kept: openai-chat, http, sse, think, effort,
tokens and all of src/lembas.
- connections.yaml holds the login (`type: webui`, as lembas login writes
it). A custom entry from 1.x is read past with a warning that says how to
log in, so an old file still starts; with several logins left, the latest
is used and the others named.
- A model's ref is the id the server serves it under; the older forms
(`<login>/<id>`, `<login>/<model>`) still resolve and config.yaml is
rewritten once. Without a login there is no model, and the error (and the
first-run screen, now the sign-in alone) says `lembas login <address>`.
- A login to another server signs this machine out of the previous one.
- The window is the server's word (no discovery); a capacity group comes
from the server's `capacity.group` alone; embeddings use the server's
/v1/embeddings.
- `lembas models` lists the server's models; install.sh's starter files, the
README and the JSON schemas say the same.
Tests: every fixture is a login now (the fake server lists models, answers
other GETs with 404, and can hand one model to another script, as a server
with several backends); the dialect suites and the cross-connection tests are
gone with their code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harness spec 3.0.0 (context.md, loop.json `context`), in session/results.ts,
applied by the engine when a result goes into the conversation and never
afterwards:
- every result is headed by its id ([#0001]); a read also by the path as
given, its lines, the file's length and the first 8 hex digits of the
content's SHA-256; an empty file says so;
- a read of an unchanged file whose lines lie inside an earlier full read is
a stub naming it; a list/glob/grep repeated with the same arguments and the
same result is "Same result as #…";
- output over 400 lines or 40,000 characters keeps head and tail with the
elided line; the full result is kept with the session (a new `results`
table in sessions.db, gone with the session);
- edit, multiedit, write and apply_patch answer with their hunks under a
bracket with the new content's hash; a new file is "Created, N lines.";
- recall (new built-in tool) shows any stored result, or a range of it, also
after a resume; ids are never reused;
- compaction appends the table of the reads still in the conversation to the
summary.
A stub only ever points at a result still in the conversation, so after a
compaction, an /undo or a rewind the file is read in full. compaction.prune
is gone: cutting old outputs in place threw the prompt cache away (an old
config's key is dropped with a warning). blocks/context.md is in the prompt
wherever recall is offered. Conformance runner for the `context` area (11
cases pass).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The spec's version may be a pre-release (3.0.0-draft). Every tool file is
loaded, with the new fields `sessions`, `requires`, `unavailable` and
`confirm`; the CLI's tools are those not the server's alone and offered in an
agent session (forCli) — a chat's own tools over the server's tree (mkdir, mv,
rm, search, python, the forge verbs) are not built in. blocks/context.md is
known; blocks/workspace.md is the server's alone.
show is built in with `requires: display`: offered only in a session a client
opened over the link when that client said `show: true` (capability `show`);
the device reads the file (at most 1 MB) and sends it with `_lembas/show`.
The harness tests now say 3.0.0's split of tools instead of "the execution
tools are the CLI's alone".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An image counted as half a million tokens: the context estimate measured its
base64 as text, so a 1-3 MB screenshot read as "context at 150-280%" the
moment view_image added it, and the session compacted after every image.
An image now counts by its dimensions (28 px patches, at most 16k tokens, a
flat 1600 when unreadable) everywhere the CLI estimates -- the meter, pruning,
/context and the no-usage fallback of all five dialects. Images over 1600 px
or 500 KB are shrunk to 1600 px when ImageMagick is there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One registry per process, every job owned by a session: bash's background commands (and a command
still running at its timeout, which now goes to the background instead of being killed) and
subagents started with task background: true. job_list, job_output, job_stop (the former
bash_list, bash_output, bash_kill) and the new job_send and report; a finished job wakes the owning
session in every front end with its marked note. The TUI counts jobs, lists them (/jobs), opens a
command's output, enters a subagent and messages it, moves a command to the background (ctrl+b)
and asks before quitting with jobs running. The link gains the jobs capability. Subagents get a
session row of their own, the spec's preamble and agent texts, and their errors reach the report.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The turn log answered a repeated id with what that turn had answered, which
was right for a prompt sent twice over a dropped link and wrong for a turn
the web UI had just rewound to edit: the same id came back with the old
reply. rewind now returns the ids it took out, both handlers forget them from
the log, and the turn file drops them too, or the next load would have
brought them back.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The spec: plan_write and plan_update (new, shared, offered in every mode) and
plan_submit (now shared) keep one structured plan — findings, objectives,
phases of tasks — in place of the todo list, which lives on as a former name
of plan_write. The shared system text is one text for both projects, with
variables for what differs; the mode texts, a prototypes block and a library
block are shared. acp.md: the client hands the device what only it knows
(context, library, prototypes), the plan travels as a structure (plan_state),
library calls carry the chat's scope, and a client may rewind a session.
loop.json says its numbers as numbers. Four conformance areas: plan,
prototype, library_scope, toolcall_index.
The CLI: the plan is kept per session in the store and drawn above the prompt
and on the approval card; the prompt is assembled from the spec's texts with
their variables filled; the link reads the instance's instructions,
personalization, knowledge scope and prototype offer, sends the plan as a
structure and answers rewind; library calls to the instance carry the session
as scope; a prototype written in the terminal is saved as a file and named in
the transcript; a tool-call fragment without an index continues the last call;
the default theme is Moria; dead exports and Hermes leftovers removed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The first public release of LLeMbas CLI: a terminal coding agent and project manager for any LLM
API, with permission modes, git snapshots, memory and skills, knowledge bases, MCP, voice, and a
link to a LLeMbas instance whose web UI can work its sessions too. Signed Linux binaries for x64
and arm64.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>