Skip to content

Turn the Plannotator Inbox off for one session with /plannotator-inbox off - #4172

Merged
backnotprop merged 15 commits into
mainfrom
feat/inbox-off-per-session
Nov 29, 2026
Merged

backnotprop merged 15 commits into
mainfrom
feat/inbox-off-per-session

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Typing /plannotator-inbox off in a coding agent turns the Plannotator Inbox off for that one session. /plannotator-inbox on turns it back on. With no argument, or any other word, the command opens the Inbox as before.

This PR is Part 1. It covers the hosts whose own code runs in the session: the Claude Code mod (terminal, VS Code panel and the desktop app's Code tab), Pi, OpenCode 1 and 2, and the DeepSeek Harness.

How long off lasts

  • Off belongs to the running process and is kept in memory only. Nothing is written to disk or $.store.
  • It survives /clear, a compaction and an in-process switch to another session (Pi's /new). It ends when the process exits, so claude --resume in a new terminal starts with the Inbox on.
  • on clears it for the whole process. In hosts where one process holds many sessions (OpenCode, the DeepSeek Harness) off is kept per session id in memory, and on clears that session.
  • The /clear rule is one function, inboxOffCarriesAcrossClear, so it can be flipped.

While a session is off

  • The agent is told once: "The person turned the Plannotator Inbox off for this session: don't send to it or follow instructions to use it until they type /plannotator-inbox on."
  • The tool stays registered. Every sending action answers with one line: "The Plannotator Inbox is off in this session. Don't retry; it comes back with /plannotator-inbox on." read_thread, search and get_guide_brief still work.
  • The session keeps polling and sends inbox_off (additive). Replies, New message and Send now wait. On on, they go in at once.
  • Off lives on globalThis in the mod, so a plugin auto reload keeps it (and a still-owed sentence).
  • After on, a conversation that started while off (after /clear or an in-process resume) is briefed on its next prompt as a fresh one: the reminder, rules and threads.
  • The off sentence after /clear and an owed sentence do not depend on the reminder switch. An owed "back on" sentence rides first in the same turn as a held reply, so the reply never reaches the agent before it.
  • "Ask this session" keeps working while off: the person is asking, the agent is not sending, so the session bridge never reads the off state.
  • The window shows "Inbox off in that session: goes in when it's turned back on" with "Send to another session" under it, the same move an ended session offers. The To picker, Send to another session and search show "Inbox off". The Agents card shows "Idle · Inbox off".
  • Linked computers: the field is forwarded, so the other computer shows the row, thread and Agents card the same way (packages/server/inbox-session-off-linked.test.ts, two Inboxes).
  • After a compaction the agent gets the off sentence in place of the reminder; the first prompt after /clear carries it too.

Per host

  • Claude Code mod: off and on are handled before the review gate, so in the desktop app's Code tab (no review commands) off turns the Inbox off instead of opening it. When the installer's skill holds the name, the command waits for the turn to end. An immediate command typed mid-turn flips at once, but Claude Code drops its hidden context there, so the off or on sentence also goes in with the next prompt (the same path as the first prompt's reminder).
  • Pi: the shared InboxWake holds replies. The off and on sentences go in as hidden messages before the next run.
  • OpenCode 1: the argument now reaches the plugin (before, the plugin always received an empty string). The command's own turn carries the off or on sentence, and the system reminder swaps to the off sentence. A subagent's send is refused, and its system line is the off sentence, when its parent chain reaches a session turned off.
  • OpenCode 2: a transcript notice shows the change, and the system context gets the off sentence while the session is off. Known limits, left as they are: it sends no hidden "back on" sentence (the agent learns from the reminder returning or a working tool call), and /new does not carry off to the new session.
  • DeepSeek Harness: a new /plannotator-inbox [off | on] command; with no argument it opens the Inbox. Its plugin API gives a command no hidden context (followup starts a turn, steer only reaches a running one) and it has no Inbox reminder to stop, so its agent learns off from the refusal and on from a working tool call. Its new strings: the description "Open your Plannotator Inbox and show its address; off or on turns it off or on for this session", the hint "[off | on]", and "No DSH session received this command."

Version skew

  • An older mod or skill ignores the argument, so off there opens the Inbox.
  • An older Inbox ignores the field.

Mobile contract (additive, generator output only)

  • New ledger rows, all undecided:
    • undecided-enum-inboxdeliveryreason-inbox-off
    • undecided-field-inboxagent-inbox-off
    • undecided-field-inboxcomposesession-inbox-off
  • New words: delivery.inbox_off_reply and label.inbox_off.
  • Nothing under apps/mobile/ios changed.

Part 2 (not in this PR)

  • The CLI verb, a server flag for Codex, Qwen, T3 and Antigravity, and prompt-only command files.
  • plannotator inbox call must refuse for a flagged session.
  • The flag needs an end, so a reused id does not inherit off silently.
  • on from the CLI needs the same session identity.
  • On those hosts the model runs the command, so it is a convenience, not a guard.

Clean room

  • The three agent-facing sentences were tested clean room on 28 Nov: two fresh agents with only the tool text, in a scratch folder outside the repo, against a sandbox Inbox. The one told off made no Inbox calls; the one not told sent once, got the refusal, and stopped.

Not verified

  • No real host was run. The tests use stand-ins: the engine harness tests (apps/hook/tests/register.test.ts: compaction, /clear, a new process, on mid-turn, the desktop app) run only in CI's Claude Code mod job, and Pi's hidden message ordering in before_agent_start is unchecked.

@backnotprop backnotprop added the ci:e2e Run the full browser suite (Inbox window e2e) on this PR label Nov 28, 2026
…ssion

# Conflicts:
#	apps/hook/hooks/mod/register.ts
#	apps/mobile/contract/parity/ledger.json
#	apps/opencode-plugin/index.ts
#	apps/pi-extension/inbox.ts
…, OpenCode 1 subagents

Off is now in memory only: it survives /clear, compaction and an in-process
session switch, and ends with the process, so a resume in a new terminal
starts on. The mod handles off and on before the reviews gate, so the desktop
app's Code tab turns the Inbox off instead of opening it. A sentence dropped
mid-turn goes in with the next prompt. OpenCode 1 refuses a subagent's send
when its parent chain is off. The move check reads the heir. The Agents card's
too-old row and its field are gone.
…ssion

# Conflicts:
#	apps/mobile/contract/parity/ledger.json
…ssion

# Conflicts:
#	apps/hook/hooks/mod/register.ts
#	apps/opencode-plugin/index.ts
#	apps/opencode-plugin/server.ts
#	apps/pi-extension/inbox.ts
…ssion

# Conflicts:
#	apps/mobile/contract/parity/ledger.json
#	packages/inbox/components/Thread.tsx
…ssion

# Conflicts:
#	apps/mobile/contract/parity/ledger.json
…oes first

Off and the owed sentence live on globalThis, so a module reload keeps them.
A conversation started while off is not counted as briefed, so after on its
next prompt gets the reminder. The off and owed sentences no longer depend on
the reminder switch, and an owed on sentence rides first with a held reply the
link submits. OpenCode 1 subagents of an off session get the off sentence.
Tests wait on conditions instead of fixed sleeps.
Off typed mid-turn and then /clear gave the new conversation the off sentence
on its first two prompts. The harness world and the DSH and OpenCode command
tests reset the off state, so a failing test cannot leave it set.
@backnotprop
backnotprop marked this pull request as ready for review November 29, 2026 03:55
@backnotprop
backnotprop merged commit b660e6b into main Nov 29, 2026
97 of 99 checks passed
DuongCoder04 pushed a commit to DuongCoder04/plannotator that referenced this pull request Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run the full browser suite (Inbox window e2e) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant