CodePanel
send_run_message

send_run_message

The CodePanel MCP tool that sends a mid-run steering or queued message into a live agent app run.

On this page›

send_run_message sends a message into a live local loop run without stopping it. Before the next model call, the runner peeks pending messages, logs each as a steering event in the run stream, appends it to the conversation history, and then acknowledges delivery. It needs the tasks:write scope.

When to call it

  • To redirect a run mid-flight (mode: "steer", the default): marks the message urgent so the agent prioritizes it on the very next turn.
  • To queue follow-up guidance (mode: "queue"): appends standard follow-up guidance before the next turn.
  • To hold the run first, pair it with pause_run and resume_run.

Inputs

Input Type Required Description
runId string yes Id of a run, from get_task's runs or start_task's task
text string, at most 4000 characters yes Steering or queued message for the agent, up to 4,000 characters
mode steer or queue no steer (default, prioritize now) or queue (append for the next turn)

It writes: the server marks it readOnlyHint: false and destructiveHint: true (it can change what is already there), so a client that asks before writes asks here.

runId, text (up to 4,000 characters), and optional mode (steer or queue, default steer). Ended runs are refused with reason: run_ended. External agent CLI runs, cloud runs, and runs already in checking or reviewing are refused with reason: message_unsupported.

What it returns

{ message }, with id, runId, body, mode, status (pending until drained by the runner, then delivered), sentVia, createdAt, and deliveredAt. A runner on the same machine wakes at once; a runner elsewhere picks the message up at its next turn.

The same step without MCP

Surface Form
HTTP API POST /tasks/runs/message with the tasks:write scope
CLI codepanel run message <runId> <text...> [--mode steer|queue]

What the server tells your agent

The description your agent reads when it lists the tools:

Use it to steer a live local loop run without stopping it: pass runId, text (up to 4,000 characters), and optional mode (steer by default to mark the message urgent for the next model turn, or queue to append as standard follow-up guidance before the next turn). The runner peeks pending messages before the next model call, logs each as a steering event, appends it to conversation history, and then acknowledges delivery. Ended runs are refused (run_ended); external agent CLI runs, cloud runs, and runs already checking or reviewing are refused (message_unsupported). Needs tasks:write. Returns { message }.

Last updated