Skip to main content
subagent CX Codex

agent_send — Claude Code subagent for messaging agents

This Claude Code subagent sends messages to another agent and can assign it supervised work. It can resume a stopped agent with its context when the recorded stop reason allows it.

MIT ★ 395 updated 2026-11-16

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/agent_send.md
Open on GitHub

What agent_send does

agent_send sends an agent a message phrased as a user request; if the agent is busy, the message waits in a queue. New work can be sent with completion criteria so the agent has a supervised task. Replies, nudges and decisions can be sent without creating a task.

Resuming is allowed only after a recorded stop for idleness, task completion or restart. A user-initiated or unknown stop requires the user's approval. For unrelated work, nearly full context or an agent that has gone off track, start a new agent and read the old one. Install for Claude Code with .claude/agents/agent_send.md.

What it helps with

  • queue a message for a busy agent
  • assign supervised work with completion criteria
  • continue related work using an agent's prior context
  • start a new agent for unrelated work

Example prompts for the agent

  • Ask the agent to check error handling and report when the tests are ready.
  • Send the agent a clarification about its current task without creating another task.
  • Continue with the previous agent's context and fix the issue found during the investigation.

How to install agent_send

Manually: put the files in place

.claude/agents/agent_send.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about agent_send

How do I install agent_send in Claude Code?

Add .claude/agents/agent_send.md to the project.

What does agent_send do?

It sends messages to agents, queues them while an agent is busy, and can assign new work with completion criteria. Related work can continue in the previous context when the stop reason permits a resume.

When can agent_send resume a stopped agent?

Only after a recorded stop for idleness, task completion or restart. A user-initiated or unknown stop requires the user's approval.

Source text

agent_send.md · MIT
Send a message to an agent as the user would type it; queued while it works. Only send what the user asked for. A stopped agent takes no plain message. Only a recorded non-user stop (idle, task completion, restart) permits resume; user and unknown stops need the user's Resume. If the next work needs its context (investigation followed by a fix, rework, the user asked for this agent), send with resume and resume_why: the same session and permission mode, your text first, the reason shown to the user. It must be supervised (give task unless it is on an open task of yours). Unrelated work, a nearly full context or an agent gone off track: agent_start a new one (agent_read the old one). Unsure: ask_user, reuse or new. A failed resume says why. A user's branch that never ran is started by its first message. Only /exit or /quit stops a running agent (tab kept); finished tasks' agents stop automatically. /exit to another conversation's task is refused (the user can close it, or agent_archive with close).

A dialog holding its terminal refuses the send (dialog_open) with its first line and whether Enter alone closes it; then send with dismiss_notice true. Confirmations, permissions and pickers are never closed for you: tell the user, or use interaction_answer.

To hand new work to a running agent (one the user opened, a long-lived one that passes work on), give task from the main conversation: once sent, the agent is your supervised task as agent_supervise makes one (a todo with the text as notes, done_when, a card; 督办 messages, task_review). Put the criteria in the text too: the agent reads only the text. An agent on one of your tasks takes more under the same title (done_when updated); another title, the user's own todo or another conversation's task is refused, with nothing sent. A failed send makes no task. Leave task out or null for a reply, nudge or decision; a task with only blank fields counts as left out.

```json
{
  "type": "object",
  "required": ["machine", "session_id", "text"],
  "properties": {
    "machine": {
      "type": "string"
    },
    "session_id": {
      "type": "string"
    },
    "text": {
      "type": "string"
    },
    "resume": {
      "type": "boolean",
      "description": "resume this stopped agent with its context, text as its first message"
    },
    "resume_why": {
      "type": "string",
      "description": "why its context is needed (shown to the user)"
    },
    "dismiss_notice": {
      "type": "boolean",
      "description": "Press Enter first to close a notice that only says \"Enter to continue\" (no options). Any other dialog still refuses the send."
    },
    "attachments": {
      "type": "array",
      "maxItems": 8,
      "items": { "type": "string" },
      "description": "pictures and files the user gave you for it, by their absolute paths on your computer: a picture they sent (the path Claude Code gives it), a file the app put in their message. They are copied to the agent's computer and listed at the end of its message, and the text's mentions of them name the copies. Only those the user gave you in this conversation are accepted"
    },
    "task": {
      "type": ["object", "null"],
      "description": "new work: make it your supervised task first (main conversation only); null for a reply",
      "additionalProperties": false,
      "properties": {
        "title": {
          "type": "string",
          "description": "the task in a short line (Chinese, under 20 characters)"
        },
        "done_when": {
          "type": "array",
          "maxItems": 6,
          "items": { "type": "string" },
          "description": "results you can check when it says it is done (a PR merged, a sheet's link, what the live system answers)"
        },
        "expect_minutes": {
          "type": "integer",
          "description": "how long it should take from now; longer without progress counts as stuck"
        }
      }
    }
  }
}
```

© nwverse · MIT · nwverse/persona

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set61

The whole set →
agent_switch This subagent for Claude Code moves a running agent to another launcher on the same computer. It switches sessions only when the user asks. CX Codex ★ 395repo stars worker_supervise worker_supervise — a subagent for Claude Code supervises background workers launched with task_plan. It checks submitted evidence against completion criteria and updates worker status via task_review. CX Codex ★ 395repo stars agents_switch agents_switch — a subagent for Claude Code moves multiple running or stopped agents to a different launcher in a single invocation. Executes when requested to manage subscription usage quotas. CX Codex ★ 395repo stars standing_actions Claude Code subagent standing_actions classifies the operations authorized by an agent confirmation card. CX Codex ★ 395repo stars engine_handoff engine_handoff — a subagent for Claude Code managing session handoffs and context synchronization between engines. Runs when switching engines during an active development session. CX Codex ★ 395repo stars agent_start This Claude Code subagent starts an agent in a project directory on one of the user's machines. It hands off development work and returns the new session ID. CX Codex ★ 395repo stars frontend-motion The frontend-motion subagent for Claude Code handles UI layout, components, transitions, and animations. It runs during scoped frontend tasks with a defined brief. CX Codex ★ 395repo stars task_review task_review — a subagent for Claude Code reviews completed delegated tasks and records a verdict. It can accept the work, return gaps to the same agent, or ask the owner to decide. CX Codex ★ 395repo stars

Project sponsors

Companies that keep this analytics open