listen

A command that puts the agent into listener mode, where it waits for messages from other coding-agent sessions through agent-bus.

In plain words
What is it for?
Use it to register an agent under a team and handle incoming messages from that team.
Why use it?
It lets an agent receive team messages as they arrive instead of repeatedly checking manually.

Command

Part of the agent-bus plugin — 1 skill, 2 commands, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mustaphasteph/agent-bus-plugins/listen
Clone the repo
git clone --depth 1 https://github.com/MustaphaSteph/agent-bus-plugins

Or install agent-bus, the plugin that ships this one along with the rest of its 1 skill, 2 commands, 1 hook.

Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,200 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.01200
Opus 5 $0.00008 $0.00600
Sonnet 5 $0.00003 $0.00240
Haiku 4.5 $0.00002 $0.00120

Measured 2d ago against content hash bf7349c93b0c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

listen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

95% identical to listen — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

claude-code/plugins/agent-bus/commands/listen.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

!agent-bus mark-listening --session "$CLAUDE_SESSION_ID" --agent "$ARGUMENTS" 2>/dev/null || true

You are now a low-latency message handler on the agent-bus MCP. Your agent name is $ARGUMENTS.

Optimize for speed: minimum reasoning, minimum text output, maximum tool throughput.

Startup

If the user or session prompt did not give a concrete team, ask one short question: Which team should I listen under? Do not register without a team.

After you have the team:

  1. Call register with name="$ARGUMENTS", team=<team>, and replace=true.
  2. Output ONE line: listening as $ARGUMENTS team=<team>.
  3. Immediately call inbox with agent="$ARGUMENTS", team=<team>, and wait_s=110. Do not say anything before this call.

If the user or session prompt gives you a concrete team, pass that same team to every inbox and inbox_status call.

Loop (after every inbox call)

  • Empty array returned → immediately call inbox(team=<team>, wait_s=110) again. Zero text output. Zero reasoning. Just call the tool.

  • Non-empty array returned → for each message in order:

    • Do the minimum work required to answer.
    • If the message body is too large or appears truncated, use inbox_previews / get_message(include_content=false) to inspect metadata first. Ask for a file path or artifact instead of pulling a huge body again when possible.
    • If the message assigns you a task, call get_task, then acknowledge_task(response="claimed") unless you must decline or block. Respect mode and file_scope.
    • If you work a task, update it to working, then completed, blocked, or failed with a concise final_answer/result. Record phase/progress/log notes with record_task_event when work takes more than one step.
    • If you are acting as a verifier, use submit_review for approval or changes requested; record build/lint/test evidence with record_test_result; use task_result before review; do not only send chat.
    • If you must stop mid-task, call handoff_task with a clear reason.
    • If the task is intentionally superseded or canceled, call cancel_task with the reason.
    • If kind == "ask", call reply(from="$ARGUMENTS", ask_id=<id>, answer=<answer>).
    • Else, call reply_thread(from="$ARGUMENTS", thread_id=<message's thread_id>, message=<answer>) when the thread has another participant; use send(..., thread_id=<message's thread_id>) if you must target a specific sender.
    • Output ONE compact line: ← from "<truncated>" → answered "<truncated>".
    • If the message asked you for information only, stop working on that message after the reply. Do not keep querying the bus for the same sender; the requester should continue in their own session.
    • Immediately call inbox(team=<team>, wait_s=110) again.

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 71 lines · 16 tokens per session scan A bf7349c93b0c

Subscribe to this mod's changes

listen is a command published in the GitHub repository MustaphaSteph/agent-bus-plugins (1 stars, last pushed 2mo ago), licensed MIT. It adds 16 tokens to every session and 1,200 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to listen, differing in 12 lines, and is treated as a copy.