Skip to content

After a mid-session plugin update, Leaf fails without naming the version skew, and a wake message came without its delivery #2415

Closed

Description

@max-sixty

Mid-session, Leaf's plugin updated under a Claude Code session that was serving a page. Four things went wrong before the page and the session agreed on a version again. In the first three, Leaf read something the older install had vendored, either the page or a revision stamped under it, and failed in a way that didn't say so. The fourth happened while the hooks were running.

1. A reply fails schema validation where Leaf should ask for a re-vendor

On a page vendored by 525e21d, leaf response reply <ref> --ephemeral --text "…" from 1e9fad2 failed with:

Error: reply event is invalid: Additional properties are not allowed ('start' was unexpected)

After leaf page init <page>, the same command worked. leaf page picture on a page in that state refuses with "was vendored from another Leaf's runtime … re-vendor it with leaf page init <page>", which names the fix at once. The reply path validates against the page's registry and has no such check.

Expected: a command that writes the event log says the page was vendored by another Leaf and names leaf page init, instead of a schema error.

2. leaf page picture can't draw a comment made before a re-vendor

After leaf page init re-vendored the page, leaf page picture <page> <comment-id> still refused with "was vendored from another Leaf's runtime … re-vendor it with leaf page init <page>". The comment was on a revision stamped under the older install, and the picture checks that revision's layer, which re-running init can't change. The refusal names a fix that has already been applied.

Expected: the picture renders the comment's revision, or the refusal says the revision predates the current runtime.

3. A delivery names a command flag the running CLI doesn't have

One delivery's handling text said to answer with leaf thread reply <page> --for <event-id>. The leaf on the agent's PATH, 1e9fad2, has no --for, and answers with leaf response reply <answer.ref>. Delivery instructions come from the registry frozen with the page's latest revision, which was captured under the older layer, so re-vendoring doesn't change them until a revision is stamped under the new one. The next delivery named the right command.

Expected: a delivery's commands are ones the CLI the agent runs accepts.

4. A wake message arrived without its delivery

With the hooks running, new comments woke the session with Leaf's message "<page> has new input, which arrives with this message." The Claude Code contract, references/harness-claude-code.md, says of this message that "the input arrives with it." Nothing arrived with it, and no delivery was opened. The delivery came about eight minutes later, through the next prompt hook, and it carried every event from seq 38 on, most of them with answer: null. Meanwhile leaf wait printed only its one-line notice that the prompt hook would hand the input over.

Expected: the wake message carries the delivery.

Repro

  • Part 1: vendor a page with 525e21d, then run leaf response reply <ref> --ephemeral from 1e9fad2 without re-vendoring.
  • Part 2: make a drawing comment on a page, update the plugin and run leaf page init, then run leaf page picture on that comment.
  • Parts 3 and 4: no reduced repro. Both followed a plugin update in a long session that stayed open across it.

Seen on leaf 1e9fad2.

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

Activity

  1. added
    bug
    on Oct 11, 2026
  2. leaf-agent commented on Oct 11, 2026

    @leaf-agent
    Collaborator

    Part 1 is fixed in merged #2416. New event writes now identify a page vendored by another Leaf before validating the event and direct the agent to leaf page init. The response reply --ephemeral regression failed before the fix and passes for both runtime and serving-code mismatches. The issue stays open for parts 2–4.

    For the historical picture in part 2, cmd_picture serves the comment's immutable revision. That preview binds to the revision's captured layer, so re-vendoring the current page cannot change the old revision that triggers the refusal. The command needs a historical-revision-specific result, or a way to render that revision with its own runtime.

    For part 3, delivery handling reads active_registry, which is the latest revision's captured vocabulary. Re-vendoring alone does not update that capture, matching the stale command guidance in the report. The command guidance needs to agree with the running CLI even while the revision is older.

    For part 4, the wake path sends the one-line “input arrives with this message” prompt; the prompt or Stop hook supplies the delivery separately. I did not reproduce the reported eight-minute gap, so I cannot yet identify which hook or session transition delayed it. The message currently promises more than the wake call itself sends.

  3. max-sixty commented on Oct 25, 2026

    @max-sixty
    OwnerAuthor

    Closing; each part is fixed or its premise is gone.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions