Conversation
…unless the operator asked A PreToolUse hook on send/reply/forward/share tools. It allows one only when the operator's latest instruction (a human-origin message or an AskUserQuestion answer) asks for that kind of action; contract-shaped PDFs are always refused; unattended runs never send unless AIOS_OUTWARD_OK names the tool. Records are selected by structure, so a subagent report or tool output never counts as the operator. Wired per SETUP §10 Hook D; guarded by tests/outward-action-gate.test.sh. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MSPpqccgQRozGpK9UvBKb
The App and Glass deliver a bus request by typing it into the target session, and the transcript records it as origin.kind human / promptSource typed, indistinguishable from the operator. A scheduled prompt containing "sent" would therefore unlock a send. hooks/bus_log.py fingerprints every request text when it is written (--hook on Write|Edit for sessions, --sweep for an inbox watcher); the gate refuses a typed message whose fingerprint is logged, and the "(HH:MM, launchd)" shape as a floor. Tests: 22 passed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MSPpqccgQRozGpK9UvBKb
|
Follow-up (93f5251): a gap found in review, now closed. The AIOS App and Glass deliver spawn-inbox requests by typing them into the target session's terminal, so the transcript records them as Fix: Tests: Still unverified: how a comment sent to Claude from an artifact ( 🤖 Generated with Claude Code |
Problem
A Claude Code user reported that, asked to "push a project further", the agent pulled a contract PDF from Gmail, placed a signature image on it and was about to send it. AIOS has the same shape open:
INTENT.mdsays "stop and ask" for external comms and legal, but only as prose, and anaskpermission rule does not prompt in auto mode. Nothing mechanical stands between a model finishing a vague goal and a send.What it does
hooks/guard-outward-action.py, a PreToolUse hook on the send / reply / forward / share tools (Gmail, Outlook, Teams, Drive, Slack; more viaAIOS_OUTWARD_EXTRA):origin.kind == "human"(notisMeta) andtoolUseResult.answers. Subagent hand-backs, peer messages, tool output and headless (sdk) prompts are alltype: "user"in the transcript, and none of them may speak for the operator — reading "the latest user text" lets a subagent's report that says "send" authorise a send.AIOS_OUTWARD_OK.AIOS_ALLOW_OUTWARD=1,~/aios/hooks/.outward-gate-off.Wiring: SETUP §10 Hook D (macOS + Windows),
hooks/_index.mdrow, CHANGELOG entry, CI step.What it deliberately does not do
settings.json), like Hook C; nothing changes until wired.How it was tested
tests/outward-action-gate.test.sh: 19 passed, 0 failed — incl. subagent-report laundering, tool-output laundering, headlesssdkprompt, question-text vs chosen answer, contract vs invoice PDF, escape hatches, malformed payload.🤖 Generated with Claude Code
https://claude.ai/code/session_016MSPpqccgQRozGpK9UvBKb