Skip to content

Report an agent event

POST
/api/panes/{pane_id}/notify
Code sample: Shell / cURL
curl --request POST \
--url http://127.0.0.1:8004/api/panes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/notify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "hook_event_name": "example", "session_id": "example", "turn_id": "example", "prompt_id": "example", "tool_use_id": "example", "event": "example", "level": "info", "title": "example", "body": "example", "last_assistant_message": "example", "prompt_response": "example", "message": "example", "notification_type": "example", "task_subject": "example", "task_description": "example", "tool_name": "example", "tool_input": "example", "toolCall": { "id": "example", "name": "example", "args": "example" }, "terminationReason": "example", "fullyIdle": true, "error": "example", "agent_type": "example", "agent": "example", "source": "example" }'

Takes an agent hook’s JSON payload as is (Claude Code, Codex, Gemini CLI, Antigravity CLI), or event, title, and body from other callers. Updates the pane’s agent status and, for events worth attention, marks the pane and notifies every client.

pane_id
required
string format: uuid

Pane ID

Media typeapplication/json
object
hook_event_name

Agent harness hook event name (e.g. “Stop”, “AfterAgent”).

string | null
session_id

Harness identity; shared by every event in one agent session.

string | null
turn_id

Turn identity, when the harness provides one.

string | null
prompt_id

Claude Code: shared by every event of one turn.

string | null
tool_use_id
string | null
event

Explicit event field (custom callers).

string | null
level
One of:

Severity level for UI treatment.

string
Allowed values: info attention success error
title

Explicit title (custom callers or Notification event).

string | null
body

Explicit body (custom callers).

string | null
last_assistant_message

Claude Code/Codex Stop and SubagentStop: last assistant message.

string | null
prompt_response

Gemini CLI AfterAgent: final response.

string | null
message

Notification event message.

string | null
notification_type

Gemini CLI Notification category.

string | null
task_subject

CC TaskCompleted: task subject line.

string | null
task_description

CC TaskCompleted: task description.

string | null
tool_name

CC PermissionRequest: tool name.

string | null
tool_input

CC PermissionRequest: tool input object.

toolCall
One of:

Antigravity PreToolUse and PostToolUse: the tool call.

object
id
string | null
name
string | null
args
terminationReason

Antigravity Stop: why the loop ended, e.g. NO_TOOL_CALL or USER_CANCELED.

string | null
fullyIdle

Antigravity Stop: false while background tasks still run.

boolean | null
error

CC StopFailure: error category.

string | null
agent_type

CC SubagentStop: agent type.

string | null
agent

Optional agent name for semantic status reporting.

string | null
source

Optional reporter identity for semantic status reporting. SessionStart hooks may use this field for their start reason instead.

string | null

Done

A malformed ID or JSON body

Media typetext/plain
string

Missing or wrong access token

Media typetext/plain
string

The request’s Host or Origin isn’t allowed, or the caller can’t use this route (a guest token, or btmux connect)

No such pane

A body over the size limit

Media typetext/plain
string

No Content-Type: application/json

Media typetext/plain
string

A body that doesn’t match its schema

Media typetext/plain
string