listen

listen is a command for coding agents from MustaphaSteph/agent-bus. It costs 16 tokens per session (1,120 once invoked), scanned A, original, MIT.

A command that puts an agent into listening mode so it can wait for messages from other coding-agent sessions on an agent message bus.

In plain words
What is it for?
Use it when assigning an agent to monitor a team channel, receive tasks, and respond to incoming messages.
Why use it?
It lets an agent receive team messages continuously instead of requiring someone to check for updates manually.

Command

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/listen
Clone the repo
git clone --depth 1 https://github.com/MustaphaSteph/agent-bus

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for listen

README.md
[![agentmods](https://agentmods.dev/badge/commands/mustaphasteph/agent-bus/listen.svg)](https://agentmods.dev/commands/mustaphasteph/agent-bus/listen)
Your own site
<a href="https://agentmods.dev/commands/mustaphasteph/agent-bus/listen"><img src="https://agentmods.dev/badge/commands/mustaphasteph/agent-bus/listen.svg" alt="Measured on agentmods" height="20"></a>
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,120 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.01120
Opus 5 $0.00008 $0.00560
Sonnet 5 $0.00003 $0.00224
Haiku 4.5 $0.00002 $0.00112

Measured 5d ago against content hash e49191a5b8de, 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 5d 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

Copies of this mod

1 near-identical copy found in the catalogue:

  • listen — 95% identical, 12 lines differ
docs/commands/listen.md · 69 lines

How it starts

The opening of the file, as written. The whole thing — 69 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(team=..., 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.
    • Call reply(from="$ARGUMENTS", ask_id=<id>, answer=<answer>) for both asks and normal messages; it answers asks and creates threaded replies for normal messages.
    • 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 · 69 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. 5d ago First seen · 69 lines · 16 tokens per session scan A e49191a5b8de

Subscribe to this mod's changes

listen is a command published in the GitHub repository MustaphaSteph/agent-bus (17 stars, last pushed 2mo ago), licensed MIT. It adds 16 tokens to every session and 1,120 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other commands, from other repositories

setup

Full onboarding for a new project — runs /doctor diagnostics, then injects the CLAUDE.md template + nav-ref instrumentation + Zustand store exposure so the plugin works without the user having to read documentation.

Lykhoyda/rn-dev-agent · 41 tokens

run-action

Execute a learned Maestro flow ("action") by name with optional -e KEY=VALUE parameters. Looks the flow up via packages/rn-dev-agent-core/dist/learned-actions.js (same inventory as /rn-dev-agent:list-learned-actions), then replays it via cdprunaction — auto-repair-aware orchestration with structured RunRecords (GH.

Lykhoyda/rn-dev-agent · 72 tokens

end-session

Wrap up the work session with read-only evidence gathering, owner-classified documentation handoffs, gated issue sync, Kano refinement, and git hygiene checks.

Lykhoyda/rn-dev-agent · 30 tokens

test-feature

Test a React Native feature on the running simulator/emulator. Verifies UI, user flows, and internal state. Generates a persistent Maestro test file.

Lykhoyda/rn-dev-agent · 30 tokens

nav-graph

Extract, inspect, and query the app navigation graph — a complete map of all screens and navigators.

Lykhoyda/rn-dev-agent · 21 tokens

doctor

Diagnose installation health. Check Node, CDP bridge, rn-fast-runner (iOS), rn-android-runner (Android), maestro-runner, simulators, Metro, CDP, injected helpers, ffmpeg, physical devices, plugin version, Vercel rules sync. Reports what's missing — does NOT modify your project.

Lykhoyda/rn-dev-agent · 68 tokens