Conversation
…tool before the first run - inboxReminder (config.json, a boolean or one per host; on by default wherever the session has plannotator_inbox): resolveInboxReminder / configuredInboxReminder in packages/shared/config.ts, mirrored by the mod's resolveInboxReminderEnabled. No env var of its own: the tool switch gates it. - INBOX_REMINDER_TEXT (and INBOX_REMINDER_TEXT_NO_WAKE for OpenCode 1) in the connection contract. - Claude Code mod: a prompt.context block (plannotatorInbox) once per conversation, only with the tool and the switch on. - Claude Code mod: plannotator_inbox is registered before the Inbox ever ran, from a bundled tool list (inbox-default-tools.ts, generated by scripts/sync-mod-inbox-tools.ts and pinned to a real Inbox's /mcp). The link stays silent (no HTTP, no files) until a call starts the Inbox. - Pi: a hidden before_agent_start message (plannotator-inbox-reminder) on the session's first prompt, not repeated after /reload or /resume, re-delivered only after a compaction that summarized it away; the Ask-this-session bridge never reads it as a take-over. - OpenCode 2: a composed system line on requests that offer the tool (primary agents, not title requests); OpenCode 1: the no-wake line in experimental.chat.system.transform.
…e lazy tool transform registerInboxOpenCode2 reports whether the host's tool draft took the tool, but OpenCode 2 applies a tool transform per request, so at plugin setup the answer is still false and the context hook was never registered. Gate on the connection being found; addInboxReminder already checks each request's own tool list, so the line still never names a tool the agent lacks. Proved on the real opencode2 2.0.19 (inbox-v2.test.ts, 5/5).
- The reminder speaks only for an Inbox that has run here: the Claude Code mod still registers plannotator_inbox before the first run (bundled list), but adds the prompt.context block only when inbox/inbox.json existed at the first session.start. Pi and OpenCode already need the registry for the tool. - Claude Code names the tool by the full name $.tool.register returned (inboxReminderText), so tool search finds the deferred tool. Fixed per process. - OpenCode 2 without session.prompt (tool registered wakes:false) gets the wait_for_reply wording (openCode2InboxReminder). - OpenCode 1: the line is its own system part (never merged into the host's parts), and only for an agent that has the tool: not a subagent, not an agent whose tools switch plannotator_inbox off (wildcards too). - Docs: no "Settings writes inboxReminder" claim yet; OpenCode's line is on every request; Claude Code's tool needs no first run. - Tests: engine harness for no registry (tool, no reminder), -p (none), a refused tool.register (none), the full name; OpenCode 1 agent gating and part layout; OpenCode 2 no-wake wording.
…led lookup keeps the session's answer
…thout add and stop the wake after each test
Owner
Author
|
Review fixes, merged with main (#1885 and #1891 included). No force-push.
Local runs: |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of the approved "inbox-agent-awareness" work (approval decisions 4 and 8). Part 1 (auto-add, uninstall, CLI) and part 3 (global note, Settings → Agents, install prompt) are separate PRs.
What changes
inboxReminder(config.json; a boolean for every host or one per host, e.g.{ "inboxReminder": { "claude-code": false } }). On by default wherever the session hasplannotator_inbox, never without it. No env var of its own:PLANNOTATOR_INBOX_TOOL/inboxToolgate it through the tool.resolveInboxReminder(config, env, host)=resolveInboxTool(...) && (configuredInboxReminder(config, host) ?? true)inpackages/shared/config.ts.resolveInboxReminderEnabled(apps/hook/hooks/mod/enabled.ts), kept equal byenabled.test.tsover every combination.The line (
INBOX_REMINDER_TEXT, connection contract, copied into the mod): "Plannotator Inbox is on: when you finish long work, or need a decision the person isn't here to give, send it with plannotator_inbox send_message and keep going. Their reply comes back here."prompt.contextblockplannotatorInboxbefore_agent_startmessage,customType: "plannotator-inbox-reminder"/reload//resume(the branch is read); again only after a compaction that summarized it away; neversystemPromptcontexthook, composed into the system partplannotator_inbox(primary agents, not title requests), same bytes each timeexperimental.chat.system.transformThe Pi "Ask this session" bridge ignores the reminder's
customType(it can ride the run answering a question).Claude Code gets
plannotator_inboxbefore the Inbox ever ran (decision 8).discoverInboxToolsfalls back to a bundled list (apps/hook/hooks/mod/inbox-default-tools.ts), generated from a real Inbox's/mcptools/listbybun run scripts/sync-mod-inbox-tools.tsand pinned byinbox-default-tools.test.ts, which fails when an Inbox MCP tool changes without a re-sync. Untilinbox/inbox.jsonexists, the link sends no HTTP request and writes no file (no lease, no claims folder). The first call starts the Inbox withplannotator inbox --background(no tab), and the wake polls from then on.PLANNOTATOR_INBOX_TOOL=0/inboxTool: falsestill means no tool and no reminder.Deviations from the approval record
INBOX_REMINDER_TEXT_NO_WAKE("… Call wait_for_reply when you need their answer.") instead of "Their reply comes back here." DESIGN §3 requires the texts to stay truthful per host.kindprimary).Tests
apps/hook/hooks/mod/enabled.test.ts: the reminder mirror against the shared resolver.apps/hook/hooks/mod/inbox-default-tools.test.ts: the bundled list equals a real Inbox'stools/list.apps/hook/hooks/mod/inbox.test.ts(real Inbox, real processes): proof 01 is now "no registry: the tool from the bundled list, 0 HTTP requests and no files in 2.5 s, the first call starts the Inbox and lands its message, and the wake polls after".apps/hook/tests/register.test.ts(engine harness,scripts/test-claude-code-mod.sh, 28/28 on Claude Code 2.1.296): the tool is registered with no registry and nothing is asked or written; the first call runsplannotator inbox --background; the reminder block appears once and is identical across calls; no block withinboxReminderoff orPLANNOTATOR_INBOX_TOOL=0.apps/pi-extension/inbox.test.ts(real Pi 0.84.4 in RPC mode):inboxReminder.pi: falsesends none.entriesCarryRemindercases.apps/pi-extension/pi-session-bridge.test.ts: the reminder in the answering run is not a take-over.apps/opencode-plugin/inbox-reminder.test.ts,inbox.test.ts(OpenCode 1 entry),inbox-v2.test.ts: the line appears once with identical bytes on the next request. Theinbox-v2.test.tsassertion runs only in CI, whereopencode2is installed.tests/never-touch-the-real-inbox.test.ts,tests/package-bunfig.test.ts,bun run typecheckall pass.Not run locally: the Pi 0.79.1 floor job (
PI_TEST_OLD_CLI). Pi on 0.84.4 accumulatesbefore_agent_startmessages from several handlers, so the reminder sits beside the plan framing.