Skip to content

Pi: cache miss after finished plan execution #1380

Closed

Description

@WinPooh32

What happened?

plannotator extension changes messages in beginning of chat, that causing cache miss:

Image

history diff:
Image

before_finish.json
after_finish.json

Plannotator version

v0.27.6

OS

Linux

Agent

Pi

Where did it happen?

Other

Activity

  1. backnotprop commented on Aug 23, 2026

    @backnotprop
    Owner

    Confirmed, and thanks for attaching the before/after payloads, they made this a five minute diagnosis.

    What happens: Plannotator injects its plan framing as conversation messages on Pi. When plan execution finishes and the session returns to idle, a filter removes that framing from the middle of history. In your session that deletes message 31 of 119, everything after it shifts, and the provider's cached prefix is invalid from that point.

    This is currently by design (the strip guarantees stale plan-mode instructions cannot keep steering the model), but the cache cost on long sessions is real and your data shows it clearly. We are evaluating an append-only approach: leave the old framing in place and countermand it at the end of the conversation instead of rewriting history. The countermand text already exists, so this is a feasible change.

    Tracking it for an upcoming release.

  2. added a commit that references this issue on Aug 23, 2026
    776fcb4
  3. backnotprop commented on Aug 24, 2026

    @backnotprop
    Owner

    Fixed in v0.27.8, just released.

    Plannotator no longer removes its plan instructions from the middle of the conversation when a plan finishes. History is append only now: old instructions stay in place and a note at the end tells the model the plan is over. Your cached prefix survives every phase transition, and a regression test holds each outgoing request to a byte for byte extension of the previous one across the full planning, executing, and idle cycle.

    Update @plannotator/pi-extension to 0.27.8 and restart Pi. Thanks again for attaching the before and after payloads. They made this a fast fix.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions