Skip to content

fix(cli): prevent swarm agents from messaging themselves - #13882

Merged
marius-kilocode merged 1 commit into
mainfrom
prevent-self-messaging
Sep 7, 2026
Merged

marius-kilocode merged 1 commit into
mainfrom
prevent-self-messaging

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Shared board agents could post a message to their own session, despite the board guidance telling them to notify other participants.

Why This Change Was Made

The board store resolved recipient aliases but did not compare the resolved recipient with the sending session. The store now rejects direct self-targeted messages after alias resolution.

User Impact

Parent and child sessions cannot send direct messages to themselves. Parent-to-child, child-to-parent, sibling, and ALL broadcasts remain supported.

Evidence

  • Focused board tests pass: 27 tests.
  • Live board integration tests pass: 6 tests.
  • CLI typecheck passes.
  • VS Code Agent Manager self-test displayed Board messages cannot be sent to yourself and completed the flow.

@kilo-code-bot

kilo-code-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • .changeset/prevent-self-board-messages.md
  • packages/opencode/src/kilocode/board/store.ts
  • packages/opencode/test/kilocode/board-tools.test.ts
  • packages/opencode/test/kilocode/board/store.test.ts

Reviewed by grok-4.6 · Input: 111.4K · Output: 5.6K · Cached: 264.2K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 8dc0607 into main Sep 7, 2026
32 checks passed
@marius-kilocode
marius-kilocode deleted the prevent-self-messaging branch September 7, 2026 15:18
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