Skip to content

Fold ephemeral thread updates when an answer arrives - #1727

Merged
max-sixty merged 3 commits into
mainfrom
codex/thread-fold-disclosure
Oct 4, 2026
Merged

max-sixty merged 3 commits into
mainfrom
codex/thread-fold-disclosure

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

Agent progress messages currently look like answers and remain in the transcript after the result arrives. Add leaf thread reply --ephemeral to retain an interim update without settling the input or its work claim. The next ordinary agent reply in the same thread derives no-prose “Previous updates” folds for marked runs, using the conversation-summary disclosure in both inline threads and the panel. User interjections remain visible, and held answers hold their folds too.

Separate presentation messages from conversational turns at the shared event reading, so Asks, delivery, work claims, and thread attention all agree that progress leaves the answer due. Lower summary suggestions to four older substantive messages or 2,000 characters; exclude the latest exchange and progress updates, and make suggestions discretionary information delivered with new input.

Validation includes CLI/workflow, model-fold, browser disclosure, held-news, and hint-delivery coverage; desktop and phone review; 197 runtime tests; thread appearance checks; instruction evals on Claude Code and Codex; reproducible browser bundles and browser framework tests; and lint. All CI checks pass, and automated review approved the final commit.

This was written by Codex on behalf of max-sixty

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test job fails at npm run check:browser: the committed browser runtime, source map, and manifest are stale after the thread runtime changes. Rebuild with npm run build:browser and commit those three generated files. I can push that rebuild if helpful.

@max-sixty
max-sixty merged commit 29e0cfd into main Oct 4, 2026
4 checks passed
@max-sixty
max-sixty deleted the codex/thread-fold-disclosure branch October 4, 2026 18:10
max-sixty added a commit that referenced this pull request Oct 10, 2026
`is_answer` dropped its progress check on the reading that progress carries no
`responds`, which holds only since #1727; a page log written before then
addresses progress to its input, and the eval readers grade that shape. Progress
is never an answer again.

A held edit and a new reply now read "1 new reply · 1 message edited", the
notice this branch gives them, where the primary-reader test expected "2 new
replies".

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 20, 2026
An audit of Leaf's boundary data structures found five places where code
and records disagreed. This change fixes each one.

**Reads of records only an older Leaf wrote are deleted** (root
AGENTS.md, "Stage"):

- `data.read_source` reads a value file as a publication. A file holding
a bare value now fails like any other malformed file instead of reading
as that source's error.
- `registry.storage.layer_metadata` requires `$layer.server`. A layer
without it is refused as `layer-identity`, whose message names the
re-vendor.
- `thread.is_answer` no longer excludes progress addressed to an input.
Only logs from before #1727 held that, and the kernel schema refuses an
ephemeral reply with `responds`.
- `events.build_threads` reads a reply's thread directly. Admission
keeps every reply's parent in force, so the branch that skipped a reply
to a withdrawn message read only logs from before that rule.

The tests that built those old records are deleted. A data test that
rewrites a value file now writes an invalid value inside a publication.

**`GET /api/user-view` is deleted**, along with the page sources'
`user_views()` and the leaf.page snapshot's saved copy of the route. The
browser's POST stays. The feature gallery's "Read observed views" button
was the route's one caller. Its section now says that the agent reads
the observations under `user_views` in `leaf page state`, and the corpus
is regenerated.

**`$state` and `$awaits` now document every field their schemas admit.**
`$state` gains `detail`, `writer` and `text`, and `$awaits` gains
`retired`, `reply` and `encloses`, each with a description. The check
that held `$keys` to `EXTENSION_SCHEMA` now holds all three facts to
their schemas (`registry.layer.DOCUMENTED_KEYS`: `EXTENSION_SCHEMA`,
`VERB_SCHEMA`, `AWAITS_SCHEMA`), and the `keys-documentation` finding
names the fact.
`test_the_field_docs_hold_to_the_fields_their_schema_admits` covers it.

**`event-batches.md` now describes the envelope `delivery.py` writes**:
`was` and `suggestion` on an event that rewrites a user's message, the
`correction` that a refused answer's retry carries, and the paged
reading (`part`, `parts`, `text`, `next`, and `acknowledge` on the last
part).

**The state home now stays owner-only.** `state.state_home` replaces
both `state_home_path` and `machine.state_home`, so every path into the
state home goes through it. It creates the home with mode 0700 and
resets an existing home to 0700. `server.host_key` keeps `access.json`
at 0600 even when the file already existed. Both write the mode only
when it differs, so a sandboxed command that can only read still
resolves its paths. `test_the_state_home_and_its_key_stay_owner_only`
covers both, and fails with either reset removed.

Two older-Leaf reads remain on purpose. `server.read_service` and the
stop path in `hosting` handle a `service.json` that another installed
Leaf wrote, which can happen while that Leaf's server is still running.
`registry.contract.same_state_operation` keeps a user's decision through
a re-vendor (#2431).

> _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