session_send
Send a prompt to a Claude Code session and return immediately. Creates the session if needed, allowing mid-run steering and queued input.
Instructions
Send prompt to a session and return immediately (non-blocking).
Creates the session if it does not exist — no session_start needed. Call
session_wait to collect the answer, or session_tail to watch progress.
Sending while Claude is working is supported and is how you steer a run
mid-flight; the input is queued and the pending result still spans the whole
run. The returned steered field says which happened.
Launch options apply only when the session is created. Set working_dir on the first send.
Returns {dispatched, name, created, steered, state}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| model | No | ||
| effort | No | ||
| prompt | Yes | ||
| add_dir | No | ||
| worktree | No | ||
| working_dir | No | ||
| allowed_tools | No | ||
| permission_mode | No | ||
| disallowed_tools | No | ||
| claude_session_id | No | ||
| append_system_prompt | No |