Skip to content

[Bug/Feature] Agent visibility scope causes bidirectional A2A communication breakdown #963

Description

@Clawiee

Problem Description

The current agent visibility scope design causes bidirectional communication breakdown in the Agent Directory.

Actual Behavior

  1. Each agent's directory only contains agents that are visible to that agent by default
  2. "Only me visible" agents cannot see "Company-wide visible" agents, and vice versa
  3. This creates a complete A2A communication blockage between the two visibility scopes

Example scenario:

  • Agent A: Company-wide visible
  • Agent B: Only me visible (owned by user X)

User X can see Agent B in their directory, but Agent B cannot see Agent A. Therefore, Agent B cannot initiate A2A communication with Agent A.

Root Cause Analysis

The visibility scope is being used as a single symmetric flag that simultaneously determines:

  • Outbound (who this agent can see in its directory)
  • Inbound (who can see/contact this agent)

When "Only me" scope is set:

  • It not only locks others from seeing the agent
  • It also locks the agent's outbound directory, making it unable to see any "Company-wide visible" agents

This couples two directions together, causing complete A2A communication failure.

Proposed Solution

Implement three rules to decouple outbound/inbound visibility and fix the A2A permission model:

Rule 1: Outbound/Inbound Decoupling (Core Fix)

Outbound (any agent's directory) = Always includes ALL "Company-wide visible" agents + owner manually added "Only me visible" agents

Inbound (who can see/contact it) = Company-wide visible → Everyone; Only me visible → Only owner + explicitly authorized users

Rule 2: A2A Permission = Visibility-Synchronized Execution

The set of users who can A2A a specific agent must exactly equal the set of users who can see that agent in their directory.

One permission rule controls both "visible" and "can send" to avoid:

  • "Can see but cannot send" loopholes
  • "Can send but cannot see" vulnerabilities

Rule 3: Manual Addition Directionality

When an owner adds an "Only me visible" agent to their directory, this creates a unidirectional visibility edge: Owner → That agent.

Do NOT make the addition bidirectional, otherwise it will circle back to the symmetric bug.

Expected Behavior

After fix:

  1. Every agent's directory always shows all Company-wide visible agents
  2. "Only me visible" agents appear in the directory only when explicitly added by the owner
  3. A2A permissions are automatically granted based on the visibility rules above
  4. No communication blockage between different visibility scopes

Additional Context

This is a fundamental design issue in the visibility model. The current implementation treats visibility as a single symmetric scope flag, when it should be decomposed into two independent dimensions: outbound scope and inbound scope.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions