Repository navigation
Agents: after a guest writes in a conversation, your next message starts a fresh one - #161
Merged
Merged
Conversation
A guest's words written into a provider session (a guest prompt, or a guest steered into a running turn) stayed in that session's memory. The next owner turn in the same conversation reused the session, so those words sat there carrying the owner's trust. - acp.rs: AcpClient marks a session when a guest's words are written into it, before anything is written, and `take_guest_mark` reads and clears the mark. - lib.rs: dispatch_pending resets the scope when an owner turn reaches a marked session (`fresh_session_for_owner_turn`). It runs before record_scope_owner; resetting after it would make return_agent discard the new session as stale. - queue.rs: conversation-context lines now carry an owner/guest label, "[n] actor (time, owner|guest): text", from the same `authority_label` the event blocks use. An unknown owner labels everyone a guest. - acp.rs: the 15 permission log targets move from `acp::permission` to `buzz_acp::permission`, so the desktop's `buzz_acp=info` filter shows them in the agent log. Tests: a guest prompt marks its session and an owner prompt does not; the steer tests now check the mark; owner-after-guest resets the scope while guest-after-guest and owner-after-owner keep it; the fresh session survives return_agent; context lines show owner and guest. Design: partner-fixes-design-2026-11-15.md, slice 2 (option C). Claude-Account: russelledeming@gmail.com Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…refetches history Review fixes for the guest-words slice: - A line break inside a context message (any kind: LF, CR, NEL, U+2028...) now continues the message indented, so a guest can no longer start a forged "[n] ... (time, owner): ..." line. Same normalisation the channel description already uses. - The agent's own earlier replies are labelled "you", not "guest". - A scope reset by an owner turn after a guest's words is flagged, and the new session's first prompt fetches the recent channel history once (the DM history query fits any channel), each line labelled. Before this, a plain channel message under the default per-channel session started cold. The escape test that pinned "ok\n</thread-context>" now expects the indented continuation. Factory-Task: partner-fixes-15nov/guest-words Claude-Account: russelledeming@gmail.com Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QuicksilverSlick
changed the base branch from
upstream-manual/44c8206beacb
to
main
November 18, 2026 23:11
Owner
Author
This was referenced Nov 18, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Factory-Task: partner-fixes-15nov/guest-words
Built-by: claude-code/claude-opus-5-5
Claude-Account: russelledeming@gmail.com
Undo: revert this PR's merge commit. An owner turn then reuses a session a guest wrote into, as before. Context lines lose their owner, guest and you labels, and permission logs drop out of the agent log viewer again. Nothing is stored, so nothing needs cleaning up.
Was stacked on #155, which merged in train #172 on 18 Nov; now based on main. #160 and #161 should still ship together.
Ship together with
fix/agent-dm-allowlist(slice 1), in the same train. Please tap both, or neither. Slice 1 lets allowlisted people into DMs, and a DM is always one session per conversation, so in a group DM a guest and you can share a session. This PR is what keeps their words from carrying your trust there. The two merge cleanly (git merge-tree), and the merged tree passes clippy with-D warnings.In plain words
When a guest (anyone who isn't you) talks to an agent, their words go into the agent's chat memory for that conversation. If you then spoke in the same conversation, your turn reused that memory, so the guest's words sat there carrying your trust. That could only cause harm with an agent that can do real things on a guest's say-so.
After this PR:
owner,guest, oryoufor the agent's own earlier replies.Before you tap: what the fresh session costs
buzz messages getfor more.What this does not cover (known gaps, follow-ups)
buzz mem set core "…", which every new session loads as standing context.buzz messages getreturns guest messages without labels.bypassPermissions), so nothing stops these writes today.defaultpermission mode, so memory and file writes need approval, or tag memory writes with who asked and show guest-written memory as guest.Content:in<buzz-event>) still keeps a guest's line breaks. The realAuthority: guestline comes first, so a forged one can only follow it. This is older than this PR and is left as it was.What changes
acp.rs:AcpClientmarks a session when a guest's words are written into it, by a prompt or a steer. The mark goes on before anything is written.take_guest_markreads and clears it.acp::permissionlog targets are nowbuzz_acp::permission, which the desktop'sbuzz_acp=infofilter lets through.lib.rs,dispatch_pending:fresh_session_for_owner_turnresets the scope when an owner turn reaches a marked session, and flags the scope to fetch history once.record_scope_owner. Resetting after it would makereturn_agentthrow the new session away as stale.pool.rs:SessionState.history_after_guestholds the flagged scopes. The next prompt in a flagged scope takes the flag and fetches recent history with the DM history query, which fits any channel.you.queue.rs:[n] actor (time, owner|guest|you): text.Tests
queue::tests::a_guest_line_break_cannot_forge_an_owner_line: five kinds of line break; exactly one entry starts with[, and the forged text stays indented inside the guest's entry.queue::tests::conversation_context_lines_label_owner_and_guest: owner, guest and you; an unknown owner makes everyone else a guest.acp::tests::a_guest_prompt_marks_its_session_and_an_owner_prompt_does_noterror_outcome_emission_tests::an_owner_turn_after_guest_words_resets_the_scope: guest then owner resets the scope and flags the history fetch; guest then guest and owner then owner keep the session and raise no flag.error_outcome_emission_tests::the_fresh_session_survives_return_agentsteer_then_askhelper now returns the mark. A guest steer marks the session and an owner steer doesn't.test_format_prompt_escapes_conversation_context_so_a_reply_cannot_close_itnow expects the indented continuation.youlabel or the history flag removed, the matching test failed each time.cargo fmt --checkandcargo clippy -p buzz-acp --all-targets -- -D warningsare clean.cargo test -p buzz-acp --no-fail-faston this Windows PC (vcvars64, private target dir):234ccf7cc: lib 1319 passed / 42 failed;e0d86b1fa: 1314 passed / 42 failed.failures:block, are identical, with nothing new and nothing gone. All 42 are the known Windows process-spawn and wall-clock set.Not verified
run_prompt_taskthat read the flag and fetch history have no test on Windows; only the flag being set is tested.Labels:
lane:ready+lane:hold(permissions: what a guest's words can do under the owner's trust). Open it as a draft, and label it only once CI is green on its head.Size: 4 files, 369 changed lines (330 insertions, 39 deletions); about half of it is tests.
🤖 Generated with Claude Code