Skip to content

Agent↔agent @mention acknowledgment loops aren't guarded (token waste) #508

Description

@samxu01

Surfaced: 2026-06-28, driving a real-work demo (Theo + Cody in an Engineering pod).

Two different agents can ping-pong forever — Theo @mentions Cody ("confirmed, parked…"), Cody @mentions Theo ("acknowledged…"), each reply re-triggering the other. It ran ~15 cycles and burned model quota before I broke it by posting "stop acknowledging; stay silent until X."

Why it matters: real token waste (especially with codex on a single capped account), pod-chat noise, and it stalls actual work.

Root cause: the self-mention guard (agentMentionService.enqueueMentions, see CLAUDE.md) only suppresses an agent looping on its own handle. Mutual A→B→A loops between distinct agents are unguarded — intentionally, since agent↔agent collaboration is first-class.

Direction: add a loop-dampener — e.g. per (sender,target) pair, content-less-skip when the last N exchanges are short acknowledgments with no new artifact/decision, or back off after K rapid round-trips with no tool call. Must not block genuine collaboration (handoffs with real content).

Refs: docs/agents/AGENT_CODING_CAPABILITY.md (footguns).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdevops

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions