Repository navigation
Name a thread by any message, and gather page commands under page - #1355
Merged
Merged
Conversation
Every thread command now takes the thread as a positional id of any message in it, resolved through one `thread_named` resolver: `thread read`, `title`, `reply [THREAD]`, `resolve`, and `page events --thread`. `thread edit` takes its MESSAGE positionally. `--to` is gone; `thread reply` refuses THREAD beside `--for`, which already fixes the response address. `thread summarize` drops its THREAD argument and summarizes in the thread `--from` sits in, so the two can no longer disagree. The title and summary events still record the exact thread id. The commands that act on one page move under `page`: `events`, `transcript`, `interactions`, `report` (from `experimental`), and `stamp` and `export` (from `version`). The `version` and `experimental` groups are gone. Tests: CLI calls drop `--to` and use the new paths; `test_interact_layer` asserts title, read, and events --thread accept a reply's id and that THREAD with --for is a usage error. An unknown thread now reads "unknown comment id", and a summary's endpoints must lie in one thread. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`thread_address` in thread_context resolves any message id, or the id of a thread whose opening comment the log lost, to the thread and the message an event names. `thread reply` and `resolve` now use it, and `status --on` reads `thread_names`, so a lost thread's id works everywhere a thread is named. The reply refusal for an owed thread names the whole `--for` command, since THREAD beside `--for` is a usage error. Prettier-formats the touched docs pages and fixes the review's guidance and harness notes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Sep 27, 2026
leaf-agent
approved these changes
Sep 27, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 28, 2026
… as JSON (#1374) Five more CLI consolidations, following #1355. - **One reader for a thread or widget: `page state PAGE [ID]`.** `thread read` was `page state` narrowed to one thread plus a page of its messages; that is now the ID form of `page state`, with the same `--after`/`--limit`. An ID naming a widget on the page narrows the reading to what stands inside it: its element, the moves and reports on it or its parts, its Asks, workflows and updates, so narrowing to an Ask carries the pick on its choice. `thread read` and `page events --thread` are gone, and the delivery's note on an elided thread points at `page state` instead of the raw log. - **One resolver for any id a command takes (`work.page_subject`).** A message, a widget frozen into one, or any other event whose history a thread holds (an undo through the gesture it withdraws) names that thread; a page widget, or a move or report on it, names the widget. `status --on`, `page state ID` and every thread command read ids through it; a thread command refuses a page widget. `page check` and message markup now refuse an authored id in the log's event-id shape (eight hex digits), so a page id cannot name a message. - **Thread commands: `open`, `reply`, `edit`, `resolve`, `summarize`.** `--title` on `open` and `reply` names the thread in the same command, and the delivery clause for an untitled thread says to add it to the reply. Renaming is `thread edit PAGE MESSAGE --title`. `thread title` is gone. A title whose text admission would refuse refuses the whole command before anything is posted; the message prints before its title record. - **`page events` is the one log follower.** `page interactions` is gone; the diagnostic trace is `PAGE/interactions.jsonl`, read directly. `page events` takes `--after` and `--follow` only, and both paths exit quietly when the reader closes the pipe (`page interactions | head` used to end in a `BrokenPipeError`). - **Output is JSON wherever it is a fact.** Every write (`thread open/reply/edit/resolve/summarize`, `page stamp`, `page report`) prints the records it appended, one JSON line each, exactly as `page events` prints them, `seq` included. `--json` is gone from all eight. `status` prints the status it wrote (the unanswered-moves note goes to stderr), `server start`/`run` print `{"url"}`, `server stop` `{"stopped"}`, `page init` `{"page"}`, `page media` one `{"path", "source"}` line per image, `page export` `{"file", "version", "bytes"}`, `data set` the source's reading without the value, `data clear` `{"source", "cleared"}`, `package init`/`install` `{"package"}`, `codex start` `{"task", "app_server", "started"}`, and `page guidance PAGE` its audiences as an array. Documents (`page transcript`, `page guidance PAGE AUDIENCE`) and diagnostics (`page check`, `package check`, errors) stay text. The appended record now carries its `seq`, which the log derives from the line number, and so does a retried append's, so a write's output and `page events` are the same record. The base-vs-candidate harnesses (`dev/leaf_dev`, the arrangement eval) find the server URL in either output shape, since an arm can be built from a revision before this change. Guidance, docs, the site's how-it-works transcript, scripts that read the server URL, and the tests are updated together. `evals/thread-named-in-its-reply` is new: an untitled long thread, where the reply should carry `--title` and the elided messages be read with `page state`. Tests: - Guidance evals, all 16 cases ×3 per arm run at once against main (69bee09): the new case went 0/3 → 3/3 (main's guidance ran a separate `leaf thread title` every time); no other case fell. Recorded in the case's header comment. - `uv run pytest tests`: 1428 passed on the merge with main. `npm run test:runtime`: 152 passed. - New: `test_a_write_prints_the_records_it_appended`, `test_any_id_names_one_subject_for_every_command` (page widget, Ask, move id, frozen widget and title-event ids across `page state`, `status --on` and `thread resolve`; the eight-hex id refusal), `test_a_reader_that_closes_the_pipe_ends_page_events_quietly`. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two CLI restructures:
thread_context.thread_address):thread read PAGE THREAD,thread title PAGE THREAD,thread resolve PAGE THREAD,thread reply PAGE [THREAD],page events --thread THREAD,status --on.thread edit PAGE MESSAGEtakes its message positionally.page.events,transcript,interactions,report(formerlyexperimental report),stampandexport(formerlyversion stampandversion export) move there. Theversionandexperimentalgroups are gone.leaf --versionis unchanged.Before,
thread read,thread titleandthread summarizerequired the exact thread id, whilereply,resolveandstatus --ontook any message.Other changes that follow:
--tois removed.thread replyrefuses THREAD combined with--for:--foralready fixes where the reply goes, and before this change a--tobeside it had to repeat that address exactly.thread summarizeno longer takes a THREAD argument. It summarizes in the thread--fromsits in, so the two can't disagree.thread_titleandsummaryevents still record the exact thread id; only the CLI resolves the name.--for, the refusal now gives the fullleaf thread reply <page> --for …command.Guidance, docs, scripts, the usability harness and tests are updated together. The recorded eval results under
notes/usability-eval/results/are historical and left as they were.Tests:
test_interact_layernow checks thattitle,readandpage events --threadaccept a reply's id, and that THREAD with--foris a usage error.test_interact_serverchecks thatreplyandresolveaccept the id of a thread whose opening comment the log lost.🤖 Generated with Claude Code