A client offering fs.readTextFile without fs.writeTextFile left the agent
unable to change any file it had read through the editor: with no write
to ask, every edit was answered "refused the write".
Spec (3.11.0, acp.md Unsaved text; conformance editor.json kind buffer,
2 cases more: 51): with such a client the device writes the disk. For a
file the session read through the client it asks for the text once more:
equal to the disk's, nothing is unsaved and the disk is written; different,
the call is refused with a sentence asking for the file to be saved in the
editor first.
Tests: both branches against a client that only reads, and a client that
writes (buffer and disk before it answers) taking two edits and a new file.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
After an independent review of the spec 3.11.0 work.
- acp/files.ts: a write judged its path, waited for the base hash, then
opened and renamed by name - a move in between could swap a link in and
send the write out of remote.roots. Changes now run one at a time for
every link of the process, a path is judged again after each wait and
must be the same place, the part file is proved to lie in the target's
own directory before the rename, and hashes and reads go through an open
descriptor. A part file is never removed by a name that may lead
elsewhere. Copy, delete and the listing of names for a search no longer
block; uploads are capped in all; a listing is cut before its entries
are looked at; names are kept for four folders; part files are hidden,
journalled and swept at start.
- remote.files_that_run_code (off by default; lembas remote
files-that-run-code on|off): off, _lembas/fs write, mkdir, move, copy
and delete refuse git's own directory, a project's agent configuration
and the user's start-up files with the reason runs_code. Said in the
limits.
- tool/buffers.ts: a file read through the editor is never read or written
from the disk behind it; previews record nothing; a write the client
never answered is not repeated. The client's fs capabilities are read on
stdio only.
- Rewrites are tracked from the start, capped at four, stopped with the
client; the id is read one way. show's handle is an open descriptor.
- A typed message beginning like the editor's block is shown; a closing
tag in a diagnostic or a selection cannot end the block.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Device files:
- Changes run one at a time on a device, and a method that waits for
anything between judging a path and acting on it judges the path again:
it goes on only when the path is still allowed and still the same place
(conformance device_files.json, kind again). What is read is read through
the file that was judged, held open.
- Files that run code - git's own directory, a project's agent
configuration, the user's start-up files (loop.json files.runs_code) -
are read, and changed only where the device's new setting
remote.files_that_run_code is on. Off by default, global config only,
said as limits.files_that_run_code in the hello and initialize; refused
with the reason runs_code and a sentence naming the setting.
- An upload is capped in all; part files are never listed or found and are
swept by the next process; nothing of what a link that leads out points
to is said; large work does not stop the device answering.
An editor as the client:
- ACP's fs capabilities are honoured on serve --stdio only.
- Text the session read from the editor is never replaced from the disk: a
client that does not give it again, or refuses the write, refuses the
call; a write nobody confirmed is not repeated on the disk. Only the
read tool and a write that ran count as reading (kind buffer).
- Rewrites: at most editor.rewrite.concurrent_max at once, all stopped with
their client, a cancel taken at any time.
- The editor block: a closing tag inside a selection or a diagnostic cannot
end it; a typed message that begins like the block is shown as typed.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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>
- The HTTP API: /v1/lembas/* answers errors in OpenAI's shape
({ error: { message, type, code } }); the device passes message on
unchanged. 404 with a sentence is a model that is not the account's, a
bare 404 a server before 3.11.0; 429 and 400 said. _lembas/complete's
reasons gain unknown_model, busy and invalid; /v1/models carries no
autocomplete flag, what a model may be picked for is read from allowed.
- Device files: a folder that holds the CLI's own files or a protected path
is not deleted, moved or copied whole (conformance device_files.json,
4 cases more: 35).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The harness spec for the editor round, written before the implementation.
Three capabilities, one prompt text, one tool's description; no new tool,
and nothing about permissions or the hardline changes.
acp.md, "An editor as the client" (capability editor; a client says
clientCapabilities._meta.lembas.editor: true):
- _lembas/complete: prefix and suffix in, the insertion out, through the
server's POST /v1/lembas/complete. No session, nothing read per request;
a newer request cancels the older, which is answered
{ text: "", cancelled: true }; _lembas/complete/cancel by the client's
own id in the params.
- _lembas/edit: a selection and an instruction in, the replacement out. One
model request with no tools (prompts/tasks/rewrite.md), streamed as
_lembas/edit/delta, _lembas/edit/cancel. Nothing is written.
- _meta.lembas.editor on session/prompt: the file in front, the cursor, the
selection, diagnostics and open files, said to the model as one <editor>
block after the person's text.
- ACP fs/read_text_file and fs/write_text_file, where the client offers
them: the file tools read its buffers and write through them; any failure
falls back to the disk; permissions are judged exactly as before.
- Edits as ACP diff items on session/request_permission and on a finished
edit's tool_call_update, for a client that said editor: true.
- _lembas/models and _lembas/editor/settings (GET/PUT /v1/lembas/editor).
acp.md, "Device files" (capability fs, on the link only): _lembas/fs/list,
stat, read, write, mkdir, move, copy, delete, search inside remote.roots.
Symlinks followed before a path is judged; never the CLI's own files or a
protected path; read-only where the device allows plan mode only; a write
checked against the hash the client last saw; a delete goes to the trash
or is refused until the client says permanent.
acp.md, _lembas/show (capability media): to a client that said media: true
the show tool hands over a file that is not text by a handle the client
fetches with _lembas/show/read while the request is open. The kind sent is
a hint from the name; the client decides from the bytes.
The HTTP API gains POST /v1/lembas/complete and GET/PUT /v1/lembas/editor.
loop.json: editor, files. Conformance: editor.json (39), device_files.json
(31), show.json (18) - skipped here until their runners exist.
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>
A prompt can wait behind a turn its client did not start, and ACP's cancel
names no turn: a client stopping a reply whose prompt still waited stopped
whatever ran instead, and its own prompt ran later with nobody following.
Spec (3.10.0, unreleased; part of capability harness_turns): an optional
_meta.lembas.turnId on session/cancel. Running: stopped. Queued: taken out
of the queue, its session/prompt answered stopReason "cancelled" at once (a
scheduled one with scheduled.status "cancelled"), the running turn not
touched, the id still known. Neither: nothing. Without the id: the running
turn, as before. Sent as a request, the cancel is answered
{ cancelled: "running" | "queued" | "none" }. conformance/cancel.json, 7
cases (acp/turns.ts cancelOf).
Device: acp/agent.ts (a prompt that waits can be withdrawn), and for a
session a terminal runs acp/share.ts (hub/cancel as a request with the
turn; a web prompt not yet started there is withdrawn, and nothing is sent
when its place comes). A terminal of a build without that request is not
told to stop whatever runs.
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>
In a session the service holds, "a turn runs" was `prompting`, which only a
session/prompt sets. A turn the harness started (a job's note waking the
session) therefore read as idle: status said not busy and named no turn, a
steer was refused, compact and rewind were let through, the session could be
let go of and the link closed under it, and a prompt that arrived meanwhile
ran into the engine, failed with "busy" and left the turn log saying the
wrong turn had finished.
The link's agent now follows every `task` event: a turn no prompt of the
client's began is kept in the session's turn log (as a terminal's turns are)
and holds the prompt queue until its end. `working()` is the one question
status, steer, compact, rewind and letting go ask. A message steered into
such a turn and not taken in goes back as `unsent` on its `task` end.
`_lembas/session/history` marks the note's user turn `machine`.
tests/acp-wake-turn.test.ts: status during the turn, the history, a steer
joining it, Stop, a prompt waiting behind it, and two notes in a row — as two
turns in order, and as one turn when the second arrives while the first runs.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A note that wakes an idle session (a finished job, a subagent's or a team's
report) already had an id of its own on its task and prompt events. The spec
did not say what a client may ask about such a turn. acp.md now does, in a
section of its own and on each method:
- capability `harness_turns`;
- status: busy, the turn named, then lastTurnId;
- steer: accepted; what the turn ended before taking in comes back as
`unsent` on its `task` end event;
- cancel stops it; a prompt waits behind it; compact and rewind are refused;
- history: its user turn carries `machine`, its turnId and the whole note;
- the order of its events, that turns never overlap, and what two notes in a
row are;
- the client never sends such a row to the device as a prompt.
conformance/reattach.json (9 cases) is the client's decision for a row after a
restart, for a person's turn and for the harness's; the CLI keeps that rule in
acp/turns.ts for the cases, as it keeps the client's model rule.
blocks/team_lead.md, one bullet more: a report starts the main agent's next
turn by itself; it answers the person then, unasked, and never tells the
person to ask again.
Clarified, not changed: on a machine turn's prompt event, `text` is the line a
transcript shows, not the whole note.
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>
Spec 3.9.0, interactive.md §1 and §3: when a subagent's model is
interactive-only, the summary of its conversation is asked of that model's
twin, else of a default that is not interactive-only, else it is skipped —
said once, to the session the subagent works for — and the subagent goes on.
Before, only the session's own compaction went elsewhere.
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>
The pages block now says that something the person asks to see in the answer
is written as a page, not as an HTML file opened with `show`, and that a page
is static: what has to run is said to be beyond a page and, where the model has
`write` and `show`, written as a file and shown. A text; nothing else moves.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A scripted page in a sealed frame can still send data out (a WebRTC
datagram), and a document without script can make the browser resolve a
chosen name (link rel=dns-prefetch, preconnect, prefetch). So a page is
static everywhere: HTML, CSS and inline SVG. pages.md §6, the prompt block
and loop.json pages.static say what it may hold — the listed elements and
attributes, no script or event handler, no link, meta, base, frames,
media, canvas or forms, no address but #fragment and an inline data:image,
no @import or url() that fetches — and what a client that shows pages
does: rebuild the document from the allow-list, a frame with scripts off,
fixed height with its own scrolling, Open larger in place; a client that
cannot guarantee it shows the note. Charts are inline SVG the model writes
out. conformance/pages.json gains the static cases (src/pages/static.ts
answers them); the fence, title, note and projection are as they were.
reports.md: the creator of a schedule that runs once may store always
(scheduled.notify.one_shot_default); a device without the reports
capability is never sent an instruction naming report_write — it gets the
3.5.0 prompt (the [SILENT] hint for `when`, none otherwise).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The same check the other LLeMbas repositories run: private domains, .lan
names, container numbers, private address ranges, machine names. Three
lines are allowed, each with its reason in the script: the public forge
the release workflow republishes from, a theme's former name read from old
configurations, and the made-up private hosts the web tool's test needs
(renamed to made-up ones). Wired into scripts/ci.sh as its first step.
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>
One function (mcp/clean.ts) takes control characters out of everything a
server supplies, where it enters and where a name is shown. /mcp's text
shows an address without credentials or query, a local server by its
program's name, an error by its first line with secrets out, never stderr;
as a markdown reply, names are code and descriptions escaped. A prompt is
listed and inserted under its registered name. Both of two colliding tool
names get a hash; a library server's tools other than the one it is there
for are ordinary MCP tools. In the menu: sign-out asks once, a failure is
said once, a failed save is said, a server the user's own config switches
off is switched on for the session only (and says why).
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>
They ran the command directly, past submit()'s mid-task check: /new,
/compact, /undo, /model and the rest could start while a reply ran. A
menu now hands the line to the same function a typed line goes through.
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>
A denied call was sent as a tool_call_update of an id no plain ACP client
had been given (the approval card carries its own), which a client drops:
it is one tool_call, failed, with its title, arguments and reason, and
_meta.lembas.denied. acp.md says so.
Dictated text is inserted at the end of the box instead of setting its
whole text, which dropped every paste placeholder.
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>
ctrl+v reads the clipboard with OpenTUI's createHostClipboard (macOS,
Windows, Wayland, X11; PNG, JPEG, WebP, GIF, known by their bytes), with
wl-paste / xclip behind it, awaited instead of spawnSync so the screen is
never held. Pasted copies live in the state directory's clipboard/ and go
after a week.
Over SSH: an image pasted as a data URL or bare base64 is decoded,
size-checked, saved and shown as [Image N]; with a forwarded X display the
X clipboard is read; in kitty the terminal is asked for its clipboard over
OSC 5522 (listed first, then read with a name and password so it asks
once), through renderer.subscribeOsc; and when nothing came through, one
line names the ways that work.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A paste of three lines or more, or over 150 characters, is shown as
[Pasted text N lines] / [Pasted text N chars]; an image as [Image N],
numbered after the highest in the box. They are OpenTUI extmarks over the
label; the content is kept beside them and sent in full (an image as its
@path). Deleting a placeholder removes its content; the same paste again
opens it. The transcript shows the box as it looked; history, /undo, a
refused send and a copy of a selection in the box use the full text.
paste: full shows pastes whole.
The box's offsets are columns: the @file list and the edge-line check now
take text by range instead of slicing by offset.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
pickShell: $SHELL where it exists, else bash, zsh, sh, as a login shell;
on Windows pwsh, then powershell, then ComSpec/cmd, without -l. A spawn
that fails (the runtime's PTY is POSIX's) is a one-line refusal, not an
internal error. The refusals for terminals switched off, a folder outside
the allowed ones, a missing folder and too many terminals say what to do.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
tools/python.json: unavailable is now only "no page of this chat is open"
and says where to open it; texts.no_answer (a page is open but did not
answer) and texts.timeout (the run passed its seconds) are their own
texts. conformance/python.json; the server's tool alone.
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>
harness/phone.md, tools/phone_action.json, loop.json phone, conformance/phone.json.
The LLeMbas server's tool alone (scope llembas, sessions chat), offered once a
message came from the LLeMbas app with the capability phone_actions (new
requirement phone). Actions: alarm, timer, calendar_event, sms_draft,
email_draft, dial, navigate, add_stop, search_nearby, stop_navigation,
open_app, open_url, media, torch, settings_panel, automation_intent. Each
reads its own fields; required fields and value checks give the call's
refusal in the spec's words. The person confirms on the phone every time;
the result is done, declined or failed with what the phone said, or no
answer in time. add_stop carries the route's destination: no map app adds
to a running route, so the phone plans again via the stop.
Co-Authored-By: Claude Opus 5.5 <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>
remote.scheduled (lembas service scheduled on|off, lembas remote scheduled on|off) said as
limits.scheduled; a scheduled session runs in the schedule's mode (Edit when none, Plan refused,
lowered to max_mode), reports ok/silent/failed/cancelled and the final reply, waits the
schedule's wait on approvals and offers no question, plan card or show. _lembas/monitor judges
the watch command by the mode (ask is refused) and hashes the output as it streams.
Conformance areas scheduled, silent and monitor run here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Accept scheduled work (remote.scheduled, off by default) said as limits.scheduled; a scheduled
turn is an agent session marked `scheduled` in the schedule's mode (Edit when none chosen, Plan
refused, lowered to remote.max_mode) with its Min/Max; the answer reports status ok, silent,
failed or cancelled and the final reply. Approvals wait the schedule's wait and go to the person
through the server, then count as denied. _lembas/monitor runs a watch command under the mode's
rules (one that would ask is refused) and answers a hash and an excerpt. Schedule routes of
/api/v2 accept the device's token. team_add under a sub-manager names it (added_under).
Conformance areas scheduled, silent, monitor; team cases changed.
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>
acp.md *Subagents in an agent chat*: capability agents carries the chat's {min, max} (and
subagents: false) down on every turn and _lembas/configure, said (the person's earlier words)
on session/new; the tree, progress, approvals, findings and transcripts come up; what the server
keeps. subagents.md §14. team.json: ten 3.4.0 cases (only the main agent, sub-managers and parent,
slots, modes and request options, whoami, finish, findings, running out of context and replacing,
requests and decisions, assign); a member's own task is refused only_main. subagents.md: the
subagents under a sub-manager that ended by itself move under its parent until it is replaced.
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>
progress.md: thirteen fixed phases (queued … failed), each { phase, since, data },
their texts as shared i18n keys (loop.json progress), one line every client draws,
sent beside the old status text in /api/v2 and over the link (capability progress).
subagents.md §5–§13 (supersedes team.md where they differ): only the main agent
adds, assigns, replaces, stops and decides; sub-managers direct those placed under
them; ids, positions, parents; Min above 1 opens slots; permissions inherited and
never widened, request options decided by the main agent, what nobody in the tree
can allow goes to the person; team_finish, findings, running out of context;
transcripts read-only; the tree over the link (capability tree). New tools
team_whoami, team_finish, team_findings, team_request, team_decide, team_assign,
team_replace. Conformance: progress, delegation; team updated.
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>
loop.json subagents.setting: min/max are "Min" and "Max" (not fewest/most), with a hint and a short
form saying the numbers include the session's own agent - 1 is the agent alone, Max 4 the agent and
up to three subagents. team.md §2 and subagents.md §4 state that, and the UI rule: one range from 1
to the cap with two handles (a slider; two numbers on one line in a terminal). team_add says the
size includes the caller. Conformance team: max 2 is the lead and one task subagent.
Still 3.3.0, unreleased: edited in place.
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>
- "Subagent" in every text a person or a model reads; "helper" retired
(the team area's step helper_done is now task_done).
- A subagent runs on the session's model unless the person named another
in this session's own messages; task's and team_add's `model` is refused
otherwise. No setting chooses a subagent's model.
- Capacity: another model on the session's model's one-model server is
refused; the session's model as its own subagent needs parallel >= 2 or
no limit; no fallback.
- The agents {min, max} setting is shown as Subagents, offered when a model
could serve; context.note.team_own when the session's model cannot.
- subagents.md, loop.json subagents, conformance/subagents.json (26 cases).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a stored login for the same server, login only refreshed it; a 401
said "run login again", which did the same again. A SignInRejected from
the refresh now falls through to a fresh device login, which replaces the
old one. The installer's last line points at lembas login.
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>
VERSION 3.2.0; README's file table, the `team` requirement and a 3.2.0
section; CHANGELOG Unreleased. Two tests that pinned the AGENTS.md
block's absolute root now pin the relative text (context.md §11).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
team.md: a lead adds members (team_add) that work in the background on
the parts they own; members may lead areas of their own. The chat
setting agents {min, max} (defaults 1/4, an instance cap of 32) bounds
the whole tree, task helpers included; a team is offered only where
subagents are enabled and the model serves two requests at once
(capacity.parallel). A manager's work calls — risk write or execute,
bar job_stop and reading bash — answer a fixed refusal while the tool
list stays unchanged. The room: team_send to names or all, delivered
under "[Team message from X to Y:]" at the next step or waking a
finished member; a member's final reply is its report to its manager;
team_read shows the tree and the visible part of the room; team_stop
stops a subtree. Past the model's capacity a member waits for a slot,
the lead first. Size notes in context.note; texts in loop.json team;
prompts blocks/team_lead.md and team_member.md; tools allowed by
default. Conformance area team, written from a reference model.
The CLI embeds the new tool and prompt files; its tools are pending.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
context.md §8: every assistant message of the current turn (after the
last message that started a turn — a step-boundary delivery does not)
carries its reasoning back, as reasoning_content in OpenAI chat and as
thinking blocks in Anthropic; earlier turns carry none, which the common
templates render identically. §11: an agent session's prompt names no
absolute machine path: the environment block names the project and says
paths are relative to its root (loop.json context.env), files outside
the project under home as ~/…; relative paths resolve against the
project root, absolute ones still accepted. agents-missing.md and
init.md no longer name the root. New conformance areas: reasoning, paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
models/schema.json: thinking_switch (the server turns thinking off for
chat_template_kwargs.enable_thinking: false) and capacity.parallel
(single_session is parallel 1). The level `off` exists only with the
switch and sends enable_thinking false and no effort; a model that takes
no efforts has the one level `default`, which sends nothing. The levels a
chat offers are (off) + efforts; one level shows no control, [off, X] a
Thinking switch, more a slider. A start level and a level the model does
not offer follow one rule. quirks.json: thinking-default; acp.md: effort
values are levels. New conformance area: levels.
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>
Measured on 2026-11-05 against a local model's prompt cache: a harness
that rebuilds its system prompt for every request re-reads the whole
session whenever any part changes (a date at midnight: 16,912 tokens,
99 % -> 0 % cached, 139 s). context.md §10: the system prompt is made
once per session and resent; no clock in it; mid-session changes go as
a <session-note> on the next user message (loop.json context.note); the
tool list is fixed for the session, a requires that comes and goes
answers unavailable instead (plan_submit gains requires: plan); §7: the
compaction summary is the next turn of the same conversation, not a
separate request with a pasted transcript; cached tokens are recorded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`lembas login --token-stdin --server <url> [--ca file] [--json]` reads one lmb_ token from
stdin (never an argument or the environment), checks discovery's protocol and then
GET /api/v1/instance with the token, whose `scope` must include `link` (a 404 or no `scope`
is an older server), and stores the login through the same path as the device code:
the key file, the webui entry, lembas.json, an earlier login replaced with its token signed
out naming the new one. --json prints the device login's `done` / `error` line. For LLeMbas
Desktop, which gets the agent's token from the one approval.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The login asks the server for the memory scope in place of library (the
server accepts both; library is no longer offered for new tokens).
/v1/usage is read in the server's 2.0 shape: no plan, balance, credit
costs or windows. The status bar shows what the month has cost so far and
/usage the month's tokens and cost and this device's tokens, each
currency's amount on its own (month.cost_by_currency, else cost_money in
currency). The credit wording is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
acp.md: GET /v1/usage in the server's 2.0 shape -- month.cost_by_currency,
never summed across currencies, cost_money only with one currency; the
credit fields null and windows empty for a 1.x client and not read by a
3.0.0 one. The device's login asks for models memory link.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>