# Wake your agent

> Get your agent woken when the user writes to its resident, with the pixling-proxy plugin for its host or your own loop over the inbox.

Pixling cannot start a turn in your agent. User replies sit in the resident's inbox until checked ([Read what comes back](/docs/connect/own-a-resident/#read-what-comes-back)); a companion process beside your agent has to watch for new entries and hand them to the host.

```text title="How a desk reply wakes an idle session"
User writes on desk ─► Resident inbox ─► pixling-proxy (or your loop) ─► Agent host starts a turn
```

## Hosts woken by pixling-proxy

**pixling-proxy** handles waking for Claude Code, Codex, OpenCode, pi, and DeepSeek Harness. Install it for your host ([Plugins for your agent](/docs/plugins/)) so each session binds its resident, holds a receiver, and wakes when you write:

| Host | How the message reaches an idle session |
| --- | --- |
| Claude Code | An `asyncRewake` hook waits, then wakes the session with the message |
| Codex | `codex queue`, which starts a turn in an idle TUI session |
| OpenCode | `session.promptAsync` from the plugin in the OpenCode process |
| pi | `pi.sendUserMessage` from the extension |
| DeepSeek Harness | `agent.steer` through the Web or Desktop app's session controller |

> [!NOTE]
> **Outside Pixling's compatibility promise**
> **pixling-proxy** is not part of Pixling and not covered by its compatibility promise. It uses only the CLI, so it can break when a host changes, not when Pixling keeps its contract.

## Hosts that cannot be woken

Checked `2026-10-31`.

| Host | Why |
| --- | --- |
| ChatGPT | MCP Events require a public HTTPS endpoint; Pixling stays on your Mac |
| Cursor | Plugin hooks cannot wake an idle conversation (see note below) |
| VS Code Copilot, Gemini CLI, Goose | An MCP notification does not wake the conversation |
| Antigravity CLI | Hooks alone cannot wake an idle session, so messages wait for your next prompt |

- **Cursor CLI**: Reply and turn-end hooks run only when your own `hooks.json` defines the same event.
- **MCP protocol (`2026-07-28`)**: A server can push only over `subscriptions/listen` while the client is connected, and leaves waking the model to the host.

## Without the plugin

### Read on the next turn (MCP)

Call `pixling_inbox_watch` for unread IDs, then `pixling_inbox_read` for each entry ([Read what comes back](/docs/connect/own-a-resident/#read-what-comes-back)). Answers to your questions arrive there even without a receiver.

### Build your own wake loop (CLI)

Keep `pixling inbox receive` running while your session accepts replies, loop on `pixling inbox wait --since SEQ`, and pass each entry from `pixling inbox read` to your host. The example below requires `jq` (`brew install jq`):

```sh title="Minimal CLI wake loop"
pixling inbox receive --namespace my-agent --key conversation-1 &
trap 'kill $! 2>/dev/null' EXIT

seq=0
while out=$(pixling inbox wait --namespace my-agent --key conversation-1 --since "$seq" --json); do
  for id in $(printf '%s\n' "$out" | jq -r '.result.messages[].messageID'); do
    entry=$(pixling inbox read "$id" --namespace my-agent --key conversation-1 --json)
    text=$(printf '%s\n' "$entry" | jq -r '.result.text // empty')
    # Hand "$text" (or the full "$entry" JSON) to your agent host here
  done
  next=$(printf '%s\n' "$out" | jq -r '.result.messages[-1].sequence // empty')
  [ -n "$next" ] && seq="$next"
done
```

Both commands are documented in [Inbox](/docs/reference/inbox/#inbox-wait). **pixling-proxy** implements this loop per host; its source is in [pixling/agent-kit](https://github.com/pixling/agent-kit).

## Next steps

- [Plugins for your agent](/docs/plugins/): Install pixling-proxy for Claude Code, Codex, OpenCode, pi, DeepSeek Harness, or Antigravity CLI.
- [Inbox reference](/docs/reference/inbox/): Full options for pixling inbox receive, wait, watch, and read.
