Inbox
Pixling is preparing for Mac App Store release. Join the waitlist on pixling.app to hear when it launches.
Messages the user writes to a bound resident, along with answers to earlier questions that no call was waiting for, sit in the inbox for that resident’s namespace/key (see Resident binding). Nothing is pushed to your agent. For the walkthrough, see Give your agent a resident; for retry behavior, see Effects and retries.
User message / late answer / user stow │ ▼ Inbox (namespace/key) │ │ │ IDs + kinds │ body + mark read ▼ ▼ inbox.watch inbox.read (or inbox wait)namespace and key are the same correlation keys used by resident.ensure, not authentication. You can still read the inbox of a stowed resident.
The user can write to a bound resident at any time, producing a kind: message entry. Connecting a receiver for that namespace/key tells Pixling your session hears messages right away. Without a receiver, the input area shows a line noting that the message will not be read until your session checks, naming the session just like the resident’s nameplate. Only the CLI’s inbox receive holds a receiver; MCP cannot.
pixling_inbox_watch
Section titled “pixling_inbox_watch”| Argument | Required | Value |
|---|---|---|
namespace |
Yes | Client namespace bound via resident.ensure. |
key |
Yes | Client key bound via resident.ensure. |
waitMs |
No | Milliseconds to wait for unread entries: 0–55000 (default 0). |
{"namespace": "codex", "key": "session-123", "waitMs": 50000}Returns unread entry IDs and kinds (message, answer, closed), never bodies or previews:
{"messages": [{"messageID": "…", "entityID": "…", "sequence": 12, "kind": "message"}]}- Waits once and returns: An empty array means nothing new arrived before
waitMselapsed;0returns an immediate snapshot. - No cursor or acknowledgment: Unread IDs reappear on every call until you read them with
inbox.read. - Safe to repeat: Read-only and idempotent.
- Waiter limits: At most 1 pending wait per key and 32 app-wide; exceeding either fails with
rejected/tooManyWaiters. - EOF cancellation: Keep the sending side of the connection open while waiting; closing it (EOF) cancels the wait.
- Unbound keys fail immediately: A
namespace/keynever bound viaresident.ensurefails withrejected/notBoundwithout waiting. - Does not wake your host: Watching only reports unread IDs to the active caller.
pixling_inbox_read
Section titled “pixling_inbox_read”| Argument | Required | Value |
|---|---|---|
namespace |
Yes | Client namespace bound via resident.ensure. |
key |
Yes | Client key bound via resident.ensure. |
messageID |
Yes | Entry UUID returned by inbox.watch. |
{"namespace": "codex", "key": "session-123", "messageID": "…"}Returns one entry and saves its read status:
{"messageID": "…", "entityID": "…", "sequence": 12, "kind": "message", "text": "…", "read": true}Entry kinds
Section titled “Entry kinds”kind: message: Text the user typed to the resident.kind: answer: The user’s answer to an earlier question given while no call was waiting.textis empty,messageIDequalspromptID, andanswerholds{promptID, outcome: answered|cancelled, selectedChoiceID?, selectedChoiceIDs?, enteredText?}.answer.outcomeis authoritative, includingcancelled. No reply is required, and these entries do not appear on the desk.
kind: closed: Written once when the user puts the resident away from the desk, Studio, or stow all.textis empty, andclosedholds{reason: userStowed, closedAt}(ISO 8601).- The resident accepts no further messages, while earlier unread entries remain readable. Any relay holding a receiver sees it end at the same moment.
- Your own
resident.stowdoes not create this entry.inbox.watchlists only theclosedentry for the resident the key is currently bound to.
Read rules and refusals
Section titled “Read rules and refusals”- A
messageIDbelonging to another key, or one no longer retained, fails withrejected/notFound. - If saving the read state fails, no body is returned. A response lost in transit may still have marked the entry read; reading the same
messageIDagain returns the same body for as long as it is retained. - Reading an entry does not mark it understood or completed. Reply using
message.sendtoclient:<namespace>/<key>, never toauto.
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| A user message | 1–4000 characters, nonblank, at most 16000 UTF-8 bytes; line breaks and tabs allowed. |
| Unread entries per key | 32 (closed entries do not count toward this limit). |
| Total retained entries | 256 across the inbox. |
| Read entries | Kept up to 7 days, or dropped earlier when room is needed. |
Retention eviction: Unread entries for a resident still on the desk are never dropped. When room is needed at the 256-entry limit, unread entries for off-desk residents drop first, oldest first, with closed entries dropped before others.
pixling inbox watch --namespace codex --key SESSION_KEY --wait-ms 50000 --jsonpixling inbox read MESSAGE_ID --namespace codex --key SESSION_KEY --jsoninbox watch: Maps toinbox.watch. In the CLI,--wait-msdefaults to50000(maximum55000;0for an immediate snapshot). Without--json, it prints one ID per line orno unread messages.inbox read MESSAGE_ID: Maps toinbox.read. Without--json, human output depends on the entry kind:message: Prints the message body.answer: Printsanswer to question PROMPT_ID: answered (CHOICE_ID)oranswer to question PROMPT_ID: cancelled, withtext: …on the next line for a typed answer.closed: Printsclosed by the user: userStowed at TIME.
inbox wait
Section titled “inbox wait”pixling inbox wait --namespace codex --key SESSION_KEY [--since SEQ] [--timeout-ms N] --jsonWaits until something new arrives, prints the unread IDs, and exits. This is the building block for waking your agent without the plugin.
- Event-driven, no polling: Subscribes first to the app’s payload-free Darwin notification, reads
inbox.watchwithwaitMs0, and re-reads on each notification. - No waiter slot usage: Does not consume the app’s 32
inbox.watchwaiter slots, so any number of sessions can wait simultaneously. --since SEQ: Counts only unread entries with a strictly greatersequence. Pass the highestsequenceyou have already handled so it does not return immediately; omit it to return on any unread entry or if the inbox restarts from sequence0.- Unreachable tolerance: While Pixling is not running, restarting, or has CLI connection turned off,
inbox waitlogs once to stderr and keeps waiting. Other errors, such as an unbound key, return immediately as usual. --timeout-ms: With a positive timeout, exits0with the last read document (emptymessages), or exits3with anunavailabledocument if Pixling was unreachable on the final read. Without it, waits indefinitely.- Parent lifetime: Exits automatically when its parent process exits, including after a crash or
SIGKILL. - Output: Same document shape as
inbox watch, withmessagesfiltered by--since. Read bodies withinbox read.
Darwin notification name
inbox wait subscribes to user.uid.<uid>.app.pixling.inbox.<SHA256 hex of namespace NUL key>.
inbox receive
Section titled “inbox receive”pixling inbox receive --namespace codex --key SESSION_KEY --jsonHolds a receiver open for the key so Pixling knows your session hears user messages right away, suppressing the “not read until your session checks” note in the input area. Prints nothing while active and exits when the receiver ends.
- Prerequisites: The resident must be bound by
resident.ensureand on the desk, and CLI connection must be on. - Concurrency: Multiple receivers may hold the same key (the session counts as hearing while at least one is connected), up to 32 receivers total across the app.
- Lifetime: No time limit, heartbeat, or polling. Ends when the process or its parent exits (including crash or
SIGKILL), and the app removes the receiver; parent exit returns exit code3. - No auto-reconnect: Run it again when you want to resume receiving, for example after Pixling restarts.
- Pair with
inbox wait:inbox receiveneither wakes your host nor reads the inbox. Runinbox waitalongside it to react to new entries.
Exit outcomes:
| Exit code | Result | Meaning |
|---|---|---|
0 |
{"reason": "userStowed"} |
The user put the resident away. The inbox also gets a kind: closed entry. Do not hold it again. |
3 |
unavailable, detail: disconnected |
Connection ended while holding: Pixling quit or restarted, or CLI connection was turned off. |
3 |
unavailable, other detail |
Pixling was unreachable or not ready yet. |
5 |
rejected, detail: notBound |
No resident.ensure binding uses this namespace/key. |
5 |
rejected, detail: notOnDesk |
The resident is not on the desk (for example, the user put it away). |
5 |
rejected, detail: tooManyWaiters |
32 receivers are already held. |
Without --json, a user stow prints receiver ended: userStowed.
Relaying a wake into your host is outside Pixling itself. See Wake your agent for which hosts support waking and how to wire it up.