Repository navigation
feat: ask agents and wait for replies with alera inbox - #912
Conversation
There was a problem hiding this comment.
Important
alera inbox wait can hang on permanent errors and print a blank reply, filtered thread listings can skip matches, and the pasted reply hint fails outside bash.
Reviewed changes across the store, the host verbs, and the new CLI.
- Ask and wait.
alera inboxasks a running agent from outside a terminal and chains host waits past the 10 minute ceiling, exiting 2 on timeout. - Host API.
inbox.*is advertised asinboxV1, allowed for paired phones exceptinbox.wait, and named on the hub reverse allowlist. - Store. Questions and replies are orchestration rows with
reply_to_idandexternal_meta. Deliveredext:rows no longer expire, and old threads are pruned. - Delivery. A paste larger than one batch stays queued instead of being marked delivered, and external questions get their own banner.
- Refresh and push. The host emits
inboxChangedand an attention push that carries ids, not reply text. - Orchestration guard.
ext:handles are rejected as terminal identities, and orchestration requests now honor the mobile allowlist.
ℹ️ Nitpicks
skills/alera-orchestration/references/messaging.mdstill documents onlyalera orchestration inbox(a terminal mailbox). Agents will not discoveralera inbox, and the two names are easy to mix up.
grok-4.7 | 𝕏
9819a52 to
08a912e
Compare
There was a problem hiding this comment.
ℹ️ No new issues in this delta.
Reviewed changes since the prior review at 9819a52. The branch is now the CLI commit on feat/inbox-host, and alera inbox wait no longer retries a host refusal.
- Classified wait failures. A live host's error, including an unknown question and a missing
inboxV1, returns immediately. A dropped connection keeps retrying until the deadline. - Closed the pending exit. The slice is never
0, and apendingpoll is reported astimeoutso the process exits 2. - Named cancel and read results. Human output covers a cancelled question, a mark-read count, and a purge count.
grok-4.7 | 𝕏
08a912e to
4071055
Compare
There was a problem hiding this comment.
ℹ️ No new issues in this delta.
Reviewed changes since the prior review at 08a912e. The branch was restacked, and the rewritten CLI commit separates usage failures from wait timeouts and prints the listing cursor.
- Usage exit code.
usagereturns 64, so a missing--bodyorpurgewithout--confirmis no longer the same exit as a wait timeout. - Thread cursor. Human listings append
more: --before <n>when the host returnsnextBefore.
grok-4.7 | 𝕏
4071055 to
ee927a1
Compare
cc64097 to
8ebd3ca
Compare
8ebd3ca to
90e237e
Compare

Summary
alera inboxlets any process on the machine (another agent session, a script, an integration) ask an Alera agent a question and read the answer later, without an Alera terminal.alera inbox targets [--workspace]lists askable agents and how a question reaches them.alera inbox ask --to <handle> | --workspace <id> [--agent claude] | --thread <question> --body|--body-file|--body-stdin [--subject] [--priority] [--expires-in 30m]prints the question id.alera inbox wait --question <id> | --inbox ext:ci [--after <cursor>] [--timeout 2h]chains host waits past the 10 minute host ceiling and retries across a host restart. It exits 2 on timeout so scripts can tell "no answer yet" from errors.alera inbox list|threads|show|read|cancel|purge --confirm.--inboxdefaults toALERA_EXTERNAL_INBOX, thenext:user. A follow-up inherits its thread's inbox.Stacked on the host PR.
Validation
cli_inbox_testscover duration parsing, ask/wait/purge flags and conflicting targets or bodies.inbox_commandsunit tests cover the inbox address default, exit codes and the human summary.cargo clippy -p alera-cli --all-targets -- -D warningspasses.Risk
New top-level command only. Existing commands are unchanged apart from
read_bodybecoming crate-visible.