Skip to content

[NO-JIRA] Add prompt message ids and truncate_from_message for honk undo (R21) - #27

Merged
johnnymo87 merged 2 commits into
patched/v1.60.2from
r21-truncate-from-message
Nov 22, 2026
Merged

johnnymo87 merged 2 commits into
patched/v1.60.2from
r21-truncate-from-message

Conversation

@johnnymo87

Copy link
Copy Markdown
Owner

Description

Port of fork #14 onto v1.60.2 (R21, bead workstation-6w7i.26.4.8). This is goose's side of honk's /undo. The contract is unchanged from patched 1.54:

  • session/prompt _meta.goose.messageId: the id the user message is stored under. A blank or non-string id is rejected before the run starts.
  • _goose/unstable/session/conversation/truncate_from_message {sessionId, messageId} → {found}. It deletes that row and everything after it, cutting by row rather than timestamp, so an earlier message stored in the same second survives. It is refused while any turn, run or live voice interaction holds the session. It also clears the session's current-context usage; accumulated totals stay.
  • initialize advertises agentCapabilities._meta.goose.truncateFromMessage, which honkd checks.
  • Not ported: the 1.54 subdirectory-hint requeue. 1.60 derives hints from the stored conversation, so a truncated turn's hints come back by themselves.
  • Fork code lives in acp/server/truncate_from_message.rs. acp-schema.json/acp-meta.json are updated; the generated TS client in ui/goose-acp-client is not (no CI here checks it).
  • Tests: 4 lib tests and 1 acp_server_test end-to-end test, all listed in patched-test.yml.

Known limits, same as 1.54: undo restores message rows only. A /recipe set in the undone turn stays, and providers that keep their own context (claude-code, gemini-cli) still remember the turn.

Merge order (bead workstation-6w7i.26.4): after R15, R8, R14 and R16.

References

  • Bead workstation-6w7i.26.4.8; honk consumer: honkd session.rs (/undo)

johnnymo87 added a commit that referenced this pull request Nov 22, 2026
…age for honk /undo (R21)

Port of fork #14 onto v1.60.2. A client can choose the id goose stores a
prompt's user message under (_meta.goose.messageId on session/prompt) and
later delete history from that message onward with
_goose/unstable/session/conversation/truncate_from_message
{sessionId, messageId} -> {found}. The boundary is the message's row, so a
message stored in the same second before it survives (the timestamp-based
truncate deletes it). Refused while the session has an active run or live
voice interaction. Truncation clears the session's current-context usage,
which described the removed rows; accumulated totals stay. goose advertises
agentCapabilities._meta.goose.truncateFromMessage.

The 1.54 hint-requeue half is not needed: 1.60 rebuilds subdirectory hints
from the conversation every turn.

X-Shepherd-Wake: #27
johnnymo87 added a commit that referenced this pull request Nov 22, 2026
…ion, not only registered runs (R21)

X-Shepherd-Wake: #27
@johnnymo87
johnnymo87 force-pushed the r21-truncate-from-message branch from a9e494d to 2641f70 Compare November 22, 2026 06:18
johnnymo87 added a commit that referenced this pull request Nov 22, 2026
…age for honk /undo (R21)

Port of fork #14 onto v1.60.2. A client can choose the id goose stores a
prompt's user message under (_meta.goose.messageId on session/prompt) and
later delete history from that message onward with
_goose/unstable/session/conversation/truncate_from_message
{sessionId, messageId} -> {found}. The boundary is the message's row, so a
message stored in the same second before it survives (the timestamp-based
truncate deletes it). Refused while the session has an active run or live
voice interaction. Truncation clears the session's current-context usage,
which described the removed rows; accumulated totals stay. goose advertises
agentCapabilities._meta.goose.truncateFromMessage.

The 1.54 hint-requeue half is not needed: 1.60 rebuilds subdirectory hints
from the conversation every turn.

X-Shepherd-Wake: #27
johnnymo87 added a commit that referenced this pull request Nov 22, 2026
…ion, not only registered runs (R21)

X-Shepherd-Wake: #27
@johnnymo87
johnnymo87 force-pushed the r21-truncate-from-message branch from 2641f70 to 2873032 Compare November 22, 2026 06:57
johnnymo87 added a commit that referenced this pull request Nov 22, 2026
…age for honk /undo (R21)

Port of fork #14 onto v1.60.2. A client can choose the id goose stores a
prompt's user message under (_meta.goose.messageId on session/prompt) and
later delete history from that message onward with
_goose/unstable/session/conversation/truncate_from_message
{sessionId, messageId} -> {found}. The boundary is the message's row, so a
message stored in the same second before it survives (the timestamp-based
truncate deletes it). Refused while the session has an active run or live
voice interaction. Truncation clears the session's current-context usage,
which described the removed rows; accumulated totals stay. goose advertises
agentCapabilities._meta.goose.truncateFromMessage.

The 1.54 hint-requeue half is not needed: 1.60 rebuilds subdirectory hints
from the conversation every turn.

X-Shepherd-Wake: #27
@johnnymo87
johnnymo87 force-pushed the r21-truncate-from-message branch from 2873032 to d958539 Compare November 22, 2026 07:46
johnnymo87 added a commit that referenced this pull request Nov 22, 2026
…ion, not only registered runs (R21)

X-Shepherd-Wake: #27
…age for honk /undo (R21)

Port of fork #14 onto v1.60.2. A client can choose the id goose stores a
prompt's user message under (_meta.goose.messageId on session/prompt) and
later delete history from that message onward with
_goose/unstable/session/conversation/truncate_from_message
{sessionId, messageId} -> {found}. The boundary is the message's row, so a
message stored in the same second before it survives (the timestamp-based
truncate deletes it). Refused while the session has an active run or live
voice interaction. Truncation clears the session's current-context usage,
which described the removed rows; accumulated totals stay. goose advertises
agentCapabilities._meta.goose.truncateFromMessage.

The 1.54 hint-requeue half is not needed: 1.60 rebuilds subdirectory hints
from the conversation every turn.

X-Shepherd-Wake: #27
…ion, not only registered runs (R21)

X-Shepherd-Wake: #27
@johnnymo87
johnnymo87 force-pushed the r21-truncate-from-message branch from d958539 to 1dec11e Compare November 22, 2026 08:15
@johnnymo87
johnnymo87 merged commit b85106c into patched/v1.60.2 Nov 22, 2026
13 checks passed
johnnymo87 added a commit that referenced this pull request Nov 22, 2026
…age for honk /undo (R21)

Port of fork #14 onto v1.60.2. A client can choose the id goose stores a
prompt's user message under (_meta.goose.messageId on session/prompt) and
later delete history from that message onward with
_goose/unstable/session/conversation/truncate_from_message
{sessionId, messageId} -> {found}. The boundary is the message's row, so a
message stored in the same second before it survives (the timestamp-based
truncate deletes it). Refused while the session has an active run or live
voice interaction. Truncation clears the session's current-context usage,
which described the removed rows; accumulated totals stay. goose advertises
agentCapabilities._meta.goose.truncateFromMessage.

The 1.54 hint-requeue half is not needed: 1.60 rebuilds subdirectory hints
from the conversation every turn.

X-Shepherd-Wake: #27
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.

1 participant