Skip to content

Call the user's list Questions and the agent's Tasks, and name each item's kind: ask, to-do, resend - #2506

Merged
max-sixty merged 31 commits into
mainfrom
prose-survey
Oct 12, 2026
Merged

max-sixty merged 31 commits into
mainfrom
prose-survey

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

"Question" and "Task" each named both a whole list and one kind of item in it. Now "Questions" names only the user's list and "Tasks" only the agent's, and each item says what kind it is:

  • ask: a registered request for the user's input, from a widget, a reply sent with --ask, or an approval.
  • to-do: explicit work someone ends, on either side.
  • resend: an update handed back to the user to send again.
  • answer and work keep their names.

Contract changes:

  • Agent and served state.
    • queues.questions and queues.tasks replace queues.on_you and queues.on_agent.
    • The ask inventory is asks, and the to-do inventories are todos and ended_todos.
    • Each view serves document.asks, and the frozen thread serves thread.asks.
  • Item kinds: ask, todo and resend. An ask item carries its record as ask.
  • Thread attention reasons: ask, resend and todo, with a todo field on the last. The margin entry kind is ask.
  • Events.
    • todo and todo_end replace task and task_end; todo_end carries its id as todo.
    • The reply fields are ask: true and todo: <title>, and a note's settles kind is todo.
    • The page protocol moves to 2, so the server no longer serves pages vendored before the rename; re-vendor them with leaf page init.
  • CLI.
    • Replies take --ask and --todo TITLE.
    • leaf task open|start|end keep their names; their help and error text say "to-do" and "ask".
  • UI.
    • Rows read Ask, To-do and Resend, the margin says "To-do open", and the walk announces Ask.
    • Approval refuses with "Answer every ask before approving this work".
    • The banner's explanation counts asks and to-dos.

The shipped references, the glossary, site pages, examples and eval prompts use the new words, and so do the event and storage contracts, the module headers and AGENTS.md below the repository map. In assessment-surfaces-pending-decisions, the two thread proposals are now prose asks, as its prompt describes them, so that case measures something different from before.

Internal identifiers that still say question or task are left for a follow-up. These are questions.py, tasks.py, readQuestions, x-question-context, the task keyboard scope and test names.

Tests: the Node browser and runtime suites, the task, question, contract and interact suites, and the Questions panel, walk and controls render tests pass locally; CI's full run passes.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 30 commits October 10, 2026 20:57
The server selects what is on the user, on the agent, and done
(served_state.queues) in each browser view, and page state prints the same
lists. The publisher places this tab's sends against them (localQueues): a
Done or approval moves an item, prose sent in a thread takes its Question off
the user, and a pending or refused send adds its answer or retry. queues.js
no longer selects the queues a second time.

A task's running start is the start that holds it: one gone quiet past the
working grace holds nothing, so the Questions panel no longer shows a live
line the thread card calls Task open (T1).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The browser read which thread a logged event belongs to again in JavaScript,
and a pending move on a page widget stood in no thread, so accepting a
suggestion that closes a thread left that thread's held news held (T4).

Each browser state now serves event_threads, the log's own reading
(thread_context.event_threads), and each view serves closes: the thread an
answer on each widget would close (questions.closed_thread, which admission
also reads). The publisher's gestured threads add the thread a pending move
would close, and an undo concerns the threads its target did, from the
ledger or the log.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A Question's prompt came from the server's reading of the authored heading,
while the browser named the same elements by their visible words, which
include a gloss's tip, and read x-name after the heading where the server read
it first. One Questions panel mixed the two (P1).

gesture_words.element_name is the server's rule (x-name, else the leading
title, in authored words), and questions read it. addressableName reads the
wrote reading. tests/name_cases.json holds both runtimes to the same cases;
the browser keeps its reader because it names any live element, including
ones the server never parses.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The banner listed the awaiting step kinds a second time beside activity's
AWAITING_KINDS. Activity now serves awaiting with observed_kind, and the
banner reads it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ntent version

Three readings the browser restated now come from the server:

- Each view serves approval_blocking, the Questions approving it waits on,
  by questions.approval_blocking, the rule the append door refuses a
  sign-off by. approvalBlockingQuestions selects those records.
- Each served workflow carries at_work (working or replying), which
  thread/workflow.js listed again as atWork.
- Each served message carries content_version (read_state.content_version),
  which messages.js and read.js derived from edited.id. A pending message or
  rewrite names its own, and a rewrite's base is the version it is written
  over.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…one shape

The browser rebuilt the server's state-definition machinery
(registry-contract.js mirrored registry.contract) to filter the served
projection again and to stamp its pending moves. The served projection was
already folded under each view's registry, so the browser now draws it as
served, and each view serves state_definitions, the definition of each verb
the user writes. A pending move carries that definition and stops drawing once
a revision defines the verb differently; the browser only compares two
definitions. state_definition_cases.json now holds the Python reading alone.

An attribute record's value took three shapes: the server's sorted list, the
browser's space-joined string, and the authored list. It is a sorted list
everywhere, so the browser uses the served value instead of recomputing it,
and version comparison compares lists.

An x-exhibit element quotes what stands inside it, not itself, in the browser
as in questions.quoted_in.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	skills/leaf/scripts/leaf/agent_state.py
…on close nothing

Review findings on the served readings:

- A refused follow-up stood on the agent's queue and hid the answer its
  thread was owed; only a forward send still in flight stands for that answer.
- A pending rejection of a suggestion counted as acting in the thread it
  would close. Each view's closes now carries the verbs that answer and the
  outcome that withdraws the request, so the browser files a pending move as
  event_threads will.
- A frozen widget's state definition came from the shown version's registry;
  the thread serves its own, under the active registry its projection reads.
- The browser's comparison of served definitions runs the shared
  state_definition_cases again, each built by the server.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…a queue item is in hand

Further review findings:

- A move replacing a thread-closing answer reopens that thread, but the
  browser did not count it as acting there. event_threads now serves
  thread_memberships, every thread whose history an event changes, and a
  pending move concerns the threads the logged move it replaces did. closes
  names the thread by the exact id build_threads closes.
- Two pending sends in one thread counted two answers; a thread is owed one.
- A stalled move's queue row drew as live. Each served queue item says
  whether the agent has it in hand now (live): a task a start holds, or a move
  at work whose work has not gone quiet or stopped.
- agent_state's header and semantic-news.test.mjs named the old homes.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	skills/leaf/assets/runtime/registry-contract.js
#	skills/leaf/assets/runtime/thread/held-news.js
#	skills/leaf/assets/runtime/thread/workflow.js
#	skills/leaf/scripts/leaf/activity.py
#	skills/leaf/scripts/leaf/agent_state.py
#	skills/leaf/scripts/leaf/served_state/browser.py
…cabulary

The browser state's event_threads carried thread_memberships, so it takes
that name. An item the user ends locally is no longer in hand. New prose says
action and update where it said move, as the glossary now does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	build/browser/application.test.mjs
#	build/browser/application.ts
#	skills/leaf/assets/runtime/queues.js
#	skills/leaf/assets/runtime/registry-contract.js
#	skills/leaf/assets/runtime/version.js
#	skills/leaf/assets/vendor/browser-runtime/application.js
#	skills/leaf/scripts/leaf/agent_state.py
#	skills/leaf/scripts/leaf/questions.py
#	tests/runtime/queues.test.mjs
#	tests/runtime/registry-contract.test.mjs
#	tests/test_questions.py
A held message kept the words it was drawn with but took the rewrite's
content version, so the notice counted an edit as a new reply, and the
words held back would have been marked read as the rewrite.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	skills/leaf/assets/runtime/anchor-resolution.js
#	tests/runtime/addressable-name.test.mjs
`questions.quoted_in`, the browser's `quoted` and the descriptor's staged
`quoted` flag each read whether a widget stands strictly inside an
x-exhibit. tests/exhibit_cases.json now holds all three to the same cases;
counting the exhibit itself as quoted fails every case.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…d copy of the rule

The browser placed an action it had not sent yet in the thread it would close by a
served `closes` map: the widget's thread, its answering verbs and its withdraw
outcome. That restated admission's answer rule without each verb's own condition,
and the replaced-action lookup needed a local projection a pending action may lack.

A thread an answer closes changes only in the reading that logs the answer, so the
gesture needs to concern it from that reading on, and that reading carries the log's
own filing (`thread_memberships`). `thread.gestured` now reads an entry's memberships
once a reading holds its event, and before that only the thread it stands in, or for
an undo its target's threads. `closes`, `questions.closed_thread` and the replaced
lookup are gone. Behavior change: held news in a thread an accepted suggestion closes
now shows with the reading that closes it rather than at the press, which is when
the thread first changes.

Also corrects declared-words.js, which still said quoted() counts the exhibit itself.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…emberships

`thread_memberships` filed every later action at a coordinate under each thread an
earlier answer there had closed, even after that answer was undone or a version note
retracted what it rested on. A revised suggestion that resolves another thread then
counted as acting in the first thread too: wait delivery handed it to that thread's
waiters, and the browser, which now reads these memberships for held news, released
the first thread's held news when the user accepted the revision.

The relation now keeps, per coordinate, only the answers still standing: an undo
takes its target out and a restating note takes out the answers it retracts. A note
no longer names a thread whose answer was already taken back.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… settles by

The previous commit pruned undone and retracted answers from a per-coordinate list,
which still disagreed with the fold in two ways review found: an old tab's answer
admitted after a version had already retracted what it rested on was kept, and a
note retracting a superseding action left out the thread its predecessor settles
again.

Rather than track answers beside the fold, the relation now reads, for each action,
undo and restating note, which action wins each coordinate it touches before and
after it, by the fold's own test (not taken back, not `action_retracted`), and files
the event under the threads the old and new winners answer. A randomized test holds
every change `build_threads` makes between consecutive prefixes of a log to the
event's membership; main's relation and the previous commit's both fail it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…nners

Reading winners before and after each event matched `build_threads` but dropped
provenance that sample selection replays (a note retracting an answer a later action
had superseded, which an undo of that action brings back), and rescanned retired
actions on every search, taking seconds on a log of a few thousand events. The
pruning relation from faff579 keeps that provenance in linear time.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
An action from a tab still showing an older version can be admitted after a later
version retracted what it rests on. The fold never settles a thread on it, so a
later action at its coordinate changes nothing there; the relation now reads the
retraction floors the log has reached before holding an answer.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Main's #2484 folded the browser's exhibit reading into the widget descriptor
(`quoted` in widget-descriptors.js) and counted the exhibit itself as quoted;
the merge keeps that one home and this branch's strict rule, which
`questions.quoted_in` and tests/exhibit_cases.json hold. The version
comparison's state half takes main's publisher-based reading, and the served
projection entries key their coordinate with `stateCoordinate`.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…tem's kind: ask, to-do, resend

"Question" and "Task" each named both a whole list and one kind of item in it.
The lists keep those names, and the narrow kinds take their own: a registered
request for the user's input is an ask, explicit work someone marks done is a
to-do on either side, and an update handed back to send again is a resend.

- Agent and served state: `queues.questions`/`queues.tasks` replace
  `on_you`/`on_agent`; the inventories are `asks` and `todos` (`ended_todos`).
- Item kinds `ask`, `todo`, `resend` (an ask item carries `ask`); thread
  attention reasons `ask`, `resend`, `todo`; margin kind `ask`.
- Events `todo` and `todo_end` (field `todo`); reply fields `ask: true` and
  `todo: <title>`; note `settles` kind `todo`. Logs written before this read
  their old events as absent, per Stage.
- CLI: `--ask` and `--todo TITLE` on replies; `leaf task open|start|end` keep
  their names and say "to-do" in help and errors.
- UI: rows read Ask, To do and Resend; "To-do open"; the approval refusal says
  "Answer every ask before approving this work".
- Shipped references, glossary, site pages, examples, eval prompts, the event
  and storage contracts, and the module headers use the new words.

Internal identifiers that still say question or task (`questions.py`,
`tasks.py`, `readQuestions`, `x-question-context`, the `task` keyboard scope,
test names) are left for a follow-up.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…e-survey

# Conflicts:
#	build/browser/application.test.mjs
#	build/browser/application.ts
#	docs/registry.html
…nish the to-do and ask wording the review found

Pages vendored before the rename post task_end and read on_you, so the protocol
moves to 2 and the server refuses to serve them rather than misreading them.
Rows and walk labels spell To-do; the walk announces Ask; the glossary gives the
approval ask's identity and the Done fold its own row; an eval fixture's thread
proposals are prose asks, as its prompt describes them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	build/browser/application.test.mjs
#	build/browser/application.ts
#	build/browser/queues.test.mjs
#	examples/corpus.html
#	examples/developer/feature-gallery.html
#	skills/leaf/assets/AGENTS.md
#	skills/leaf/assets/runtime/annotation-inventory.js
#	skills/leaf/assets/runtime/projection/model.js
#	skills/leaf/assets/runtime/questions/model.js
#	skills/leaf/assets/runtime/queue-panel.js
#	skills/leaf/assets/runtime/queue-walk.js
#	skills/leaf/assets/runtime/queues.js
#	skills/leaf/assets/runtime/registry-contract.js
#	skills/leaf/assets/vendor/browser-runtime/application.js
#	skills/leaf/scripts/leaf/agent_state.py
#	skills/leaf/scripts/leaf/served_state/browser.py
#	skills/leaf/scripts/leaf/served_state/queues.py
#	tests/runtime/queues.test.mjs
#	tests/runtime/registry-contract.test.mjs
#	tests/runtime/undo-waits.test.mjs
#	tests/served.mjs
#	tests/served_records.py
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	evals/assessment-surfaces-pending-decisions/case.yaml
leaf-agent
leaf-agent previously approved these changes Oct 12, 2026
…tch still produces

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit a365283 into main Oct 12, 2026
3 checks passed
@max-sixty
max-sixty deleted the prose-survey branch October 12, 2026 06:44
max-sixty added a commit that referenced this pull request Oct 12, 2026
The task → todo rename (#2506) and the contract snapshot (#2505) landed
together, so main's check:browser fails; this regenerates it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 12, 2026
Carries #2506's vocabulary into the after readings: attention reasons ask,
resend and todo, the asks and todos wire keys, and an ask: true reply in the
fold test.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 12, 2026
#2505 and #2506 landed together: the contract still described protocol 1
with the task names, so check:browser failed on main and on every PR.
This is build:browser's output from the merged source.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 12, 2026
#2505 and #2506 landed together with the protocol contract still at protocol 1,
so every pull request's bundle check fails before the suite runs.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent added a commit that referenced this pull request Oct 12, 2026
Export Lit's `createRef` through `widget-api.js` so `lf-trace` can be
bundled for the website. The [failed publish
run](https://github.com/max-sixty/leaf/actions/runs/38214399140) stops
because `lf-trace.js` imports `createRef` from that API, while the API
exports only `ref`. The browser runtime already exports both names.

The existing widget API test now checks that every name imported by a
behavior module is exported. It failed with `['createRef']` before the
fix and passes after it. The site build produced all 105 pages locally,
and `pnpm run test:runtime` passed.

This PR also refreshes the generated protocol contract. [PR
CI](https://github.com/max-sixty/leaf/actions/runs/38215371869) could
not reach the site gate because the earlier contract from #2505 no
longer matched #2506's event names; `node build/browser/build.mjs
--check` failed on `main` and `pnpm run check:browser` passes with the
regenerated contract. #2536 carries the same contract refresh alongside
its workflow cleanup, but its own site gate failed on the missing
`createRef`. Including both repairs here lets the required `test` check
verify and land them together.

---------

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Oct 12, 2026
…-card sample, and bring the What-needs-you note up to date (#2619)

Three small changes from the code-quality survey.

**Catalog previews wait the way every other browser command does.**
`leaf-dev refresh-previews` keeps launching the locked headless shell
the browser suite uses, so published preview pixels do not follow each
host's Chrome (#342). It now opens its tab with `leaf_dev.browser.tab()`
and waits with `load()`, which runs `settle()`: ready, fonts loaded, and
the runtime's `pageSettled`. Its own `wait_until_ready` call is gone.
Captures also take reduced motion, as other stills do. A one-example
capture through the real command (publishing stubbed out) produced the
expected still.

**The feature gallery's "Move a card" live sample is cut.** It repeated
the drag the delivery board on the Data & work tab already offers. The
Interactions guide now links to that board (`#bg-delivery`, which opens
its tab), the eyebrow drops the board elements, the site test expects
three interaction samples, and the corpus is regenerated.

**`notes/what-needs-you/page.html` matches the current model.** It said
an Ask is a task on you and that a record says how it `ends`. Since
#2240, #2451 and #2506, an ask is its own record the lists select
directly, the shared work record is a to-do with no `ends` field, the
lists are `queues.questions` and `queues.tasks`, and replies ask with
`--ask`. The lede, plan, naming sections, "How it works" (with a fresh
`page state` reading) and open questions now say so. The step-5 tab
keeps its decision record in the past tense and notes what holds now.
The `#task-hierarchy` and `#task-done` anchors cited by TODO.md are
unchanged.

No user-visible Leaf behaviour changes beyond the gallery losing one
sample.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 12, 2026
…2646)

#2329 (updates → reports and progress messages) and #2506 (queue kinds →
ask, to-do, resend) reworded eval cases without rescoring them. This
rescores every case they touched on Claude Code at 3fe3eb0 and records
the result in each case's leading comment.

- `assessment-surfaces-pending-decisions`, the one case whose rename
could have changed what it measures, ran paired against 0cc6805 (the
commit before #2506), 3 repeats per variant: prose-review-handoff 2/3 →
3/3 (the old arm's miss was the judge faulting the unrun plan the prompt
asks for), settled-review 3/3 → 3/3, queue-handoff 3/3 → 3/3.
- The other 19 edited cases passed 1/1 each.
- The handling text pasted into `user-rewrite-answered` and
`user-rewrite-retitles-its-thread` still said "takes the move in hand";
it now matches the registry's clause.
- The remaining eval text that said "move" for the user's input now says
"update".

The runner reported $10.59, judge excluded.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 13, 2026
…ce does (#2658)

#2506 renamed Leaf's user-facing vocabulary: the user's list is
Questions, the agent's is Tasks, and their items are asks, to-dos and
resends. The code kept the old words underneath (`questions.py`,
`readQuestions`, `x-question-context`, `TaskReading`, the `task`
keyboard scope). This renames every identifier that names an ask record
to `ask` and every one that names a to-do record to `todo`. Names for
the Questions and Tasks lists, the `leaf task` command, plain English
and UI copy such as "Next question" keep their words.

**Main renames**
- Files: `leaf/questions.py` → `asks.py`, `leaf/tasks.py` → `todos.py`,
`runtime/questions/` → `runtime/asks/`,
`references/authoring-questions.md` → `authoring-asks.md`, and their
tests.
- Widget API (in `module-authoring.md`): `readQuestions` → `readAsks`,
`watchQuestions` → `watchAsks`, `questionWords` → `askWords`,
`questionActions` → `askActions`.
- Registry key `x-question-context` → `x-ask-context`;
`data-lf-question` → `data-lf-ask`; `--lf-question-ring` →
`--lf-ask-ring` and the ring name `ask`; margin entry ids
`ask:`/`todo:`; keyboard scope `todo` and `queue.todo.done`.
- Python: `QuestionRegistration`, `ThreadQuestions`, `TaskReading` →
`TodoReading`, and so on; eval cases `task-*` → `todo-*`.

**Behavior changes**
- `lf-tabs` reads "2 of 3 answered" / "All 3 answered", as `lf-tally`
counts, instead of calling a tab's asks Questions.
- `layer.incompatible_layer`, the one reading every page server and the
append door refuse on, now also refuses a page whose vendored layer
documents an `x-` key this Leaf no longer admits, naming `leaf page
init`; `page check` asks it first too, so it also names the re-vendor
for a protocol mismatch. Without it, a page vendored before this rename
would keep `x-question-context` and silently lose its asks' prompt
words, and replies would still be admitted on a published one.
`incompatible_revision` applies the same check to each captured
revision, so after a re-vendor an older revision that still uses the
retired key is refused (409 to open, refused input) as a
foreign-protocol revision is. The check is one-sided: a vocabulary
lacking a key Leaf added later is not refused. `compose_candidate` keeps
the re-vendor hint when a layer fault surfaces while composing a page's
own declarations.

Every page vendored before this lands documents `x-question-context`, so
after it lands each one refuses to serve, check or stamp until `leaf
page init` re-vendors it; the refusal names that command.

Nothing in the event log, the browser's posts or the served state's keys
changes, so there is no protocol bump.

The mechanical part is generated by a script (identifier-aware for
Python and JS), so if `main` moves under this PR it is regenerated
rather than conflict-resolved; the prose edits are a separate commit.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 14, 2026
… it (#2812)

A plugin update that bumps the page protocol reaches running sessions
(Claude Code reloads plugins in place), and every page such a session
held then refused each command until the agent ran the `leaf page init`
the refusal named, while the user's comments waited. That re-vendor
keeps the page's log and source, so the first Leaf to act for the page's
session now makes it itself.

- `vendoring.renew_layer` re-vendors a page vendored at an older page
protocol, for the session holding it or when no live session does, and
never takes back a page a newer Leaf vendored. It rechecks both under
the locks the re-vendor holds, so a newer Leaf's re-vendor or a takeover
in between wins. A layer documenting an x- key this Leaf does not admit
stays refused, since the key may be one a newer Leaf added at the same
protocol. It reports only what is left for the agent: the `page check`
errors that keep index.html from activating, or why the re-vendor was
refused.
- It runs from `cli.resolve_dir` (every page command but `server stop`
and the private `server _serve` child) and from
`hook_transport.read_plans` (prompt and Stop hooks, using the claim's
harness since a hook's environment does not name its session). The Stop
hook continues the turn when the re-vendor leaves something to do.
- `hosting.restarting_server` takes the harness it restarts for, and its
stop carries the claim it decided for: a session that takes the page
meanwhile keeps its service, and the re-vendor is refused.
- An owed answer whose reference points into a delivery an older Leaf
wrote now counts as having no usable reference, so the hooks capture
that update again rather than pointing the turn at a delivery it cannot
read.

Measured end to end: a page served by a protocol-3 Leaf for a Claude
Code session, whose first prompt hook under this Leaf re-vendored it in
1.1 s, restarted its server at the same URL on the new runtime, and
handed the pending comment over. Re-vendoring a protocol-1 page silently
drops its to-dos and prose asks (the #2506 rename); a manual `page init`
does the same, and AGENTS.md "Stage" rules out an old-record validator.

Tests: the refusal tests now cover a page a newer Leaf vendored or
another session holds; new tests cover the prompt hook's and a command's
re-vendor, `server start` on an older page, the re-captured update, and
the three races.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants