mailbox-interactive

mailbox-interactive is a skill for Claude Code, Codex from baphuongna/pi-crew. It costs 12 tokens per session (2,499 once invoked), scanned A, original, MIT.

An interactive mailbox system for coordination between a lead coding agent and worker agents. It supports messages for instructions, follow-ups, responses, and prompts to continue work.

In plain words
What is it for?
It helps leaders steer workers, send follow-up tasks, receive responses, nudge waiting workers, and inspect mailbox files for a run.
Why use it?
It keeps asynchronous agent communication organized and records messages, delivery states, priorities, and run-specific mailboxes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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 skills/baphuongna/pi-crew/mailbox-interactive
Any agent
npx skills add baphuongna/pi-crew --skill mailbox-interactive
Clone the repo
git clone --depth 1 https://github.com/baphuongna/pi-crew

Made for: Claude Code, Codex.

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 mailbox-interactive

README.md
[![agentmods](https://agentmods.dev/badge/skills/baphuongna/pi-crew/mailbox-interactive.svg)](https://agentmods.dev/skills/baphuongna/pi-crew/mailbox-interactive)
Your own site
<a href="https://agentmods.dev/skills/baphuongna/pi-crew/mailbox-interactive"><img src="https://agentmods.dev/badge/skills/baphuongna/pi-crew/mailbox-interactive.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,499 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.1 $0.00012 $0.02499
Opus 5 $0.00006 $0.01249
Sonnet 5 $0.00002 $0.00500
Haiku 4.5 $0.00001 $0.00250

Measured 6d ago against content hash 22e5e1cbd670, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

mailbox-interactive 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 6d 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.

skills/mailbox-interactive/SKILL.md · 335 lines

How it starts

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

mailbox-interactive

Use this skill for live coordination between leader and workers. Mailbox provides an asynchronous message protocol for steer, follow-up, respond, and nudge operations.

Mailbox Architecture

Worker (waiting) ← mailbox inbox ← Leader (respond)
Worker (running) ← mailbox follow-ups ← Leader (followUp)
Leader → Worker: steer, followUp, nudge (non-blocking)
Worker → Leader: supervisor contact (blocking decision)

Mailbox file structure

Each run has a mailbox directory at .crew/state/runs/<runId>/mailbox/:

  • inbox.jsonl — incoming messages (to worker)
  • outbox.jsonl — sent messages (from worker)
  • steering.jsonl — steer messages specifically

Message structure

interface MailboxMessage {
  id: string;
  direction: "inbox" | "outbox";
  from: string;           // taskId or "leader"
  to: string;             // taskId or "leader"
  body: string;           // message text
  status: "pending" | "delivered" | "acknowledged" | "rejected";
  priority: "low" | "normal" | "high";
  sentAt: string;         // ISO timestamp
  deliveredAt?: string;
  data?: Record<string, unknown>;  // source, correlation, etc.
}

Core Operations

1. respond — Leader responds to waiting worker

// Respond writes to inbox and transitions task back to running
async function respond(runId: string, taskId: string, body: string, priority = "normal") {
  // 1. Write inbox message
  const message = appendInboxMessage(manifest, { taskId, body, priority });

  // 2. Re-read state inside lock
  const { tasks } = loadRunManifestById(cwd, runId);
  const task = tasks.find(t => t.id === taskId);

  // 3. Verify task is waiting
  if (task.status !== "waiting") {
    throw new Error(`Cannot respond to non-waiting task: ${task.status}`);
  }

  // 4. Transition task back to running
  const updated = { ...task, status: "running", waitingSince: undefined };
  saveRunTasks(manifest, [updated]);

  // 5. Emit event
  appendEvent(eventsPath, { type: "task.responded", taskId, message: body });

  return message;
}

Read the full file on GitHub · 335 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. 6d ago First seen · 335 lines · 12 tokens per session scan A 22e5e1cbd670

Subscribe to this mod's changes

mailbox-interactive is a skill published in the GitHub repository baphuongna/pi-crew (51 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 2,499 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.