Replace abort-and-resend with pi's steer command #97
Labels
No labels
epic
in-review
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
weiwen/evie#97
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
A Message Burst that arrives mid-turn aborts the in-flight turn. Evie then drains stdout to the
terminal event, deletes the partial Telegram messages, and sends the new prompt.
ADR 0001 records why: message ordering could not be delegated to pi, so evie built
abort-and-resend instead. CONTEXT.md records the cost under Session: "the aborted partial
stays in pi's session history".
The turn is therefore thrown away, the model re-reads the whole context, and the session history
keeps a dead partial.
What pi offers now
pi's RPC mode has explicit queue commands that did not exist when ADR 0001 was written:
steerqueues a message. pi delivers it after the current tool calls finish, before the nextLLM call.
follow_upqueues a message for delivery after the agent finishes all work.clear_queuereturns and removes all pending steer and follow-up messages.set_steering_modeandset_follow_up_modeselect "all" or "one-at-a-time" delivery.Evie sends
streaming_behavior: "followUp"on every prompt (src/pi.rs:1403) but never issuesany of these commands.
PiCommandmodels onlyPromptandAbort(src/pi.rs:67).Reference: https://pi.dev/docs/latest/rpc-commands
Proposed change
Send
steerfor a burst that arrives mid-turn. Keepabortfor/clearand for eviction only.Expected results:
Sites
src/pi.rs:67PiCommand, needs aSteervariant.src/pi.rs:1386PiProcess::send_message.src/pi.rs:1826drain_aborted, still needed for/clear.src/session.rs:1061SessionManager::abort_turn.src/telegram/mod.rs:1709aborts the turn and deletes its messages before the new one.src/telegram/mod.rs:1600abort-and-delete helper, keep for/clear.Open questions
Snapshot::Start? The current burst path opens a newplaceholder because the turn restarts. A steered turn does not restart.
snapshot per message. Confirm that pi emits a message boundary.
steerpreserve the Message Log high-water mark semantics? The injected delta is computedper turn today.
steeris rejected, or fail the turn?Answer question 2 against a captured pi-rpc fixture before any code changes.
Context
Raised from a review of whether any agent in
llm-agents.nixshould replace pi. The conclusion wasto keep pi. This is the highest-value capability evie does not yet use: evie drives 2 of roughly 35
pi RPC commands.