Skip to content

fix(agents): preserve visible edits in conversation history - #2355

Merged
mrand-block merged 1 commit into
block:mainfrom
mrand-block:mrand-block/fix-current-history-edits
Nov 5, 2026
Merged

mrand-block merged 1 commit into
block:mainfrom
mrand-block:mrand-block/fix-current-history-edits

Conversation

@mrand-block

Copy link
Copy Markdown
Contributor

Why

Agent history cut off edits at the triggering request’s timestamp. That could restore original text even when the conversation showed an accepted edit or deletion. A sender could exploit that mismatch to leave harmless text visible while retaining actionable instructions in the agent’s history.

What changed

Keep the cutoff for new messages, then apply current authorized edits and deletions to the selected messages. Preserve the existing author checks, message ordering, and history limits, so this changes which revision the agent receives without adding later messages to the conversation history.

@mrand-block
mrand-block requested a review from a team as a code owner November 3, 2026 23:51

@jmecom jmecom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 AI-agent review of c99debb744f63d9d4a98354b86b100ba2104055f: LGTM; no blocking findings. The cutoff still selects only earlier messages, while current authorized edits and deletions pass through the existing message fold. Signer/owner checks, thread filtering, and history bounds are preserved.

Ran the Codex runtime and shared fold suites: 233 tests passed. Four additional temporary review cases verified later-second edits, kind-5/kind-9005 deletions, and rejection of another signer's edit; the pre-fix owner reproduced the stale-text behavior. No live/native acceptance was exercised. This affects newly assembled context; it cannot erase text already supplied to an existing model session. Correctness and minimalness: 9/10.

Optional: retain a later-second edit/deletion regression with filter-aware reads, since the current same-second case does not independently catch restoring until on the revisions query.

@jmecom jmecom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Approved after the review above at c99debb7; no blocking findings.

@mrand-block
mrand-block merged commit 28e42c7 into block:main Nov 5, 2026
41 checks passed
johnmatthewtennant added a commit that referenced this pull request Nov 5, 2026
Co-authored-by: Simone <0828be588d5c9c4d092c5b1cf01761d5aef63d6b104807fd8e8284d517dd1a99@buzz.block.builderlab.xyz>

* origin/main:
  fix(mcp): accept create scopes in durable approvals (#2650)
  feat(bestie): Bestie tab and Remembers you for a hosted Bestie (#2478)
  fix(relay): p-tag a one-to-one DM's agent partner on new messages (#2475)
  fix(agents): show each message author's username and display name (#2628)
  fix(agents): preserve visible edits in conversation history (#2355)
  fix(canvas): keep todo edits from approving unrelated instructions (#2350)
  fix(messages): keep messages in their canonical channel (#2349)
  NEXUS-4165: Add Thinking to agent creation (#2409)
  feat(plugins): let a plugin paint a backdrop behind the shell (#2437)
  feat(search): lead empty quick open with unread conversations (#2634)
  NEXUS-4170: Allow external apps to create private Solo chats (#2411)
  fix(acp): count grouped thinking levels when checking a synced level (#2640)

Signed-off-by: John Tennant <[email protected]>
wpfleger96 added a commit that referenced this pull request Nov 5, 2026
…leanup

* origin/main:
  fix(mcp): accept create scopes in durable approvals (#2650)
  feat(bestie): Bestie tab and Remembers you for a hosted Bestie (#2478)
  fix(relay): p-tag a one-to-one DM's agent partner on new messages (#2475)
  fix(agents): show each message author's username and display name (#2628)
  fix(agents): preserve visible edits in conversation history (#2355)
  fix(canvas): keep todo edits from approving unrelated instructions (#2350)
  fix(messages): keep messages in their canonical channel (#2349)
agude-sq added a commit to agude-sq/buzz-app that referenced this pull request Nov 5, 2026
* origin/main: (28 commits)
  fix(mcp): accept create scopes in durable approvals (block#2650)
  feat(bestie): Bestie tab and Remembers you for a hosted Bestie (block#2478)
  fix(relay): p-tag a one-to-one DM's agent partner on new messages (block#2475)
  fix(agents): show each message author's username and display name (block#2628)
  fix(agents): preserve visible edits in conversation history (block#2355)
  fix(canvas): keep todo edits from approving unrelated instructions (block#2350)
  fix(messages): keep messages in their canonical channel (block#2349)
  NEXUS-4165: Add Thinking to agent creation (block#2409)
  feat(plugins): let a plugin paint a backdrop behind the shell (block#2437)
  feat(search): lead empty quick open with unread conversations (block#2634)
  NEXUS-4170: Allow external apps to create private Solo chats (block#2411)
  fix(acp): count grouped thinking levels when checking a synced level (block#2640)
  feat(conversation): let plugin rows manage messages without visiting a channel (block#2512)
  feat(github): make side-panel link opening optional (block#2629)
  feat(messages): show a blurred thumbnail until an image loads (block#2556)
  fix(relay): give large roster and read-state reads a 30s deadline (block#2627)
  fix(user-status): show a status emoji's :name: on hover where the full status shows (block#2384)
  fix(inbox): keep the list's place when returning in the same session (block#2134)
  fix(messages): pass verified labels to the forward recipient picker (block#2633)
  feat(messages): forward a message to a person (block#2167)
  ...

# Conflicts:
#	tests/browser/settings.spec.mjs
wpfleger96 added a commit that referenced this pull request Nov 5, 2026
* commit '4bb94e259':
  feat(github): rework the GitHub settings page (#2450)
  fix(mcp): accept create scopes in durable approvals (#2650)
  feat(bestie): Bestie tab and Remembers you for a hosted Bestie (#2478)
  fix(relay): p-tag a one-to-one DM's agent partner on new messages (#2475)
  fix(agents): show each message author's username and display name (#2628)
  fix(agents): preserve visible edits in conversation history (#2355)
  fix(canvas): keep todo edits from approving unrelated instructions (#2350)
  fix(messages): keep messages in their canonical channel (#2349)
  NEXUS-4165: Add Thinking to agent creation (#2409)
  feat(plugins): let a plugin paint a backdrop behind the shell (#2437)
  feat(search): lead empty quick open with unread conversations (#2634)
  NEXUS-4170: Allow external apps to create private Solo chats (#2411)
wpfleger96 added a commit that referenced this pull request Nov 5, 2026
…-service

* origin/main: (29 commits)
  Normalize profile names for verified-name matching (#2348)
  Add BuzzTerm font settings and compact glyph spacing (#2502)
  feat(plugins): let a host command run only verified bytes (#2535)
  NEXUS-4228: Add plugin toolbar actions and panel links (#2645)
  Keep plugin update controls stable and spaced (#2636)
  feat(inbox): rename to Activity and simplify the filter bar (#2543)
  fix(goose): track every replaced protected worker and check its security gate (#2528)
  docs(agents): say Pi agents don't take plugin notes yet (#2534)
  feat(agents): reorder agent cards with hold and drag (#1837)
  fix(messages): keep own sends from before the loaded history off the timeline (#2525)
  feat(github): rework the GitHub settings page (#2450)
  fix(mcp): accept create scopes in durable approvals (#2650)
  feat(bestie): Bestie tab and Remembers you for a hosted Bestie (#2478)
  fix(relay): p-tag a one-to-one DM's agent partner on new messages (#2475)
  fix(agents): show each message author's username and display name (#2628)
  fix(agents): preserve visible edits in conversation history (#2355)
  fix(canvas): keep todo edits from approving unrelated instructions (#2350)
  fix(messages): keep messages in their canonical channel (#2349)
  NEXUS-4165: Add Thinking to agent creation (#2409)
  feat(plugins): let a plugin paint a backdrop behind the shell (#2437)
  ...

# Conflicts:
#	src/bundled/goose/runtime.ts
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