Skip to content

Add continued agent conversations#1275

Open
klopez4212 wants to merge 7 commits into
mainfrom
kennylopez-agent-thread-continuous-conversations
Open

Add continued agent conversations#1275
klopez4212 wants to merge 7 commits into
mainfrom
kennylopez-agent-thread-continuous-conversations

Conversation

@klopez4212

Copy link
Copy Markdown
Contributor

Summary

  • Add channel-scoped continued agent conversations with sidebar entries and dedicated conversation markers.
  • Keep source threads intact while follow-up continues in the dedicated conversation view, including recap-to-thread and shimmer thinking states.
  • Tighten one-agent auto-routing and refresh managed-agent auth/command fallback for staging identity reliability.

Tests

  • cargo fmt --all -- --check
  • cargo test -p buzz-acp
  • cargo test -p buzz-core
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml managed_agents::runtime::tests::build_env --lib
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml managed_agents::discovery::tests::effective_agent_command --lib
  • cd desktop && ./node_modules/.bin/tsc --noEmit --pretty false
  • cd desktop && ../node_modules/.bin/biome check . (passes with existing CSS specificity warnings)
  • cd desktop && node ./scripts/check-file-sizes.mjs && node ./scripts/check-px-text.mjs
  • cd desktop && node --import ./test-loader.mjs --experimental-strip-types --test src/features/agents/agentConversations.test.mjs src/features/channels/ui/ChannelPane.helpers.test.mjs src/features/messages/lib/threadPanel.test.mjs

@klopez4212 klopez4212 force-pushed the kennylopez-agent-thread-continuous-conversations branch from 75a89f1 to f727a44 Compare June 26, 2026 13:00
@klopez4212 klopez4212 force-pushed the kennylopez-agent-thread-continuous-conversations branch from f727a44 to f45c44f Compare June 26, 2026 17:56
@klopez4212 klopez4212 marked this pull request as ready for review June 26, 2026 17:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f45c44f52b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +661 to +663
const cutoff = cutoffByThreadRootId.get(threadRootId);
if (cutoff === undefined || message.id === cutoff.anchorMessageId) {
continue;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve later task anchors in a thread

When a thread has more than one agent-conversation marker, cutoffByThreadRootId keeps only the earliest marker and this check exempts only that marker's agentReplyId. Any later marker's agent reply falls after the earliest cutoff, so it gets added to hiddenIds; the source thread and the “Go to message” flow then cannot render that later task's anchor/marker. Track all marker anchor IDs per thread, or exempt every marker.agentReplyId, before hiding post-cutoff replies.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf5fc6687c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +525 to +529
await sendMessageMutation.mutateAsync({
content,
mediaTags,
mentionPubkeys,
parentEventId: conversation.threadRootId,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Tag agent participants when sending task replies

In the default managed-agent setup the ACP subscription requires a p tag for the agent, but this dedicated conversation composer forwards only the mentions the user typed. For normal replies like “continue” from the new task screen, mentionPubkeys is empty and parentEventId points at the thread root, so the reply is accepted as a thread message but no agent is mentioned and the agent never receives it. Merge the computed routeableAgentPubkeys into the send-time mentions, or otherwise tag the agent participants.

Useful? React with 👍 / 👎.

Comment on lines +349 to +351
const message =
messageById.get(marker.agentReplyId) ??
buildTaskFallbackMessage(marker);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fetch missing task replies before opening markers

When the task marker is loaded but its agentReplyId is not in the currently loaded message window, such as an old task whose recap/title marker was published recently, this creates a synthetic empty TimelineMessage and the Open button passes it to openAgentConversation. That opens the task view with a blank agent reply and no real context instead of loading the conversation. Fetch the reply/ancestors by id as the route deep-link path does before opening, or do not allow opening from the fallback.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b99ec19a0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

on `buzz messages send` so the conversation stays threaded. \
If the human explicitly asks for a channel-root, top-level, \
or broadcast post, send that message without `--reply-to`. \
"\nIMPORTANT: For ordinary replies in this turn, use `--reply-to {thread_root_id}` \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep DM reply anchors on the thread root

The prompt now tells agents to keep replies flat by using the thread root, but the DM path still builds reply_anchor from last_event.event.id when the inbound DM is already in a thread. In an existing DM thread, this generates --reply-to for the human's latest reply instead of the root, so the agent answer nests another level rather than staying flat; use the parsed root id for DM replies too.

Useful? React with 👍 / 👎.

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