[Bug] @mentions in Projects issue comments never reach buzz-acp agents
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
## Describe the bug
An `@mention` of a managed agent in a Projects issue comment is rendered and
published with the agent's `p` tag, but the comment never reaches `buzz-acp`.
The agent receives no turn and the mention does not appear in its
`mentions`/`needs_action` feed.
Ordinary channel mentions to the same agent work.
## To reproduce
1. Create or open a repository under **Projects → Issues**.
2. Add a comment to the issue.
3. Select a running agent from the comment composer's mention picker and give it
a concrete task, for example:
> @Agent investigate this issue, implement the smallest fix, run the tests,
> and report the result here.
4. Submit the comment.
5. Observe that the comment renders with the mention, but the agent never starts
a turn.
6. Query the affected agent's feed:
```bash
buzz feed get --types mentions,needs_action --limit 200
```
7. Observe that ordinary channel mentions are present but the Projects issue
comment is absent.
## Expected behavior
- A Projects issue comment that mentions an agent should reach that agent's ACP
harness.
- The agent should receive the issue/repository context and be able to reply
back to the issue.
- Delivery behavior should match a mention in a normal channel.
## Implementation diagnosis
At current `main`:
1. Projects issue comments are temporarily published as kind `1` events because
kind `1111` is not yet registered by the relay:
[`desktop/src/features/projects/hooks.ts`](https://github.com/block/buzz/blob/acfbb1bb6af54cb29cb152496ff43b8285dcb8cf/desktop/src/features/projects/hooks.ts#L432-L436).
2. `createProjectIssueComment` correctly adds the explicitly mentioned pubkeys
as `p` tags, but its event tags contain only the issue `e` tag, repository
`a` tag, recipients, and media. There is no channel `h` tag:
[`desktop/src/features/projects/hooks.ts`](https://github.com/block/buzz/blob/acfbb1bb6af54cb29cb152496ff43b8285dcb8cf/desktop/src/features/projects/hooks.ts#L502-L542).
3. `buzz-acp` subscribes per channel. Its subscription request includes the
channel `#h` filter, and includes `#p` when mentions are required:
[`crates/buzz-acp/src/relay.rs`](https://github.com/block/buzz/blob/acfbb1bb6af54cb29cb152496ff43b8285dcb8cf/crates/buzz-acp/src/relay.rs#L3142-L3171).
Therefore a no-`h` Projects comment cannot arrive through the channel-scoped ACP
subscription even though it has a valid agent `p` tag.
## Suggested fix
Choose and implement an explicit delivery model for project work-item comments:
- bind the issue/comment to a project channel and include its `h` tag; or
- add a separate authenticated ACP subscription for mentioned project comments
keyed by `p` plus the repository/issue address.
The second approach must preserve community/repository authorization and avoid
turning every global kind-1 mention into an agent task.
Add an end-to-end regression test:
```text
create project issue
→ comment mentioning an agent
→ buzz-acp receives exactly one turn
→ agent reply is attached to the issue
```
## Environment
- Buzz Desktop: observed on 0.4.22
- Source diagnosis: commit
`acfbb1bb6af54cb29cb152496ff43b8285dcb8cf` (0.4.23 release commit)
- OS: macOS
## Related issues
- #2421 concerns agents that run but whose replies are not visibly published.
- #2423 concerns mention routing to stale identities after agent rename/re-add.
This report is distinct: the Projects issue-comment event never reaches the
agent feed/harness.
Contributor guide
Research direction
Start by reading the Projects comment publishing path in desktop/src/features/projects/hooks.ts and the channel-scoped subscription logic in crates/buzz-acp/src/relay.rs. Trace the existing mention delivery flow, choose an authorized delivery model for project comments, and add the requested end-to-end regression covering issue creation, one ACP turn, and an issue-attached reply.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, typescript
- Domain
- backend-api-design, distributed-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100