feat(web): an agent with no plan posts to its workspace's inbox, and its instructions name no plan link and no pages
Merged
DA
5d ago+120+120+012345678901234567890123456789-57-57-01234567890123456789
Step 5 of the automations plan (docs/proposals/automations-scope.md). It is stacked on #2674 (planless start).
What changes
- A planless agent posts to its Inbox.
postInboxItemlocks the agent throughagentReachableBy(its workspace) rather than a join to its plan.- The item and its attachments are written with
plan_idnull and the agent'sorganization_id. - #2663's temporary
INBOX_REFUSAL.PLANLESSis gone, so the coder's Inbox tools work for every agent.
- An item is reached through its workspace.
itemReachableBy, which gates every read and answer of one item by id (readInboxItem,answerInboxItem, attachments), checks membership of the item's own workspace, or its plan's on a row the backfill hasn't reached. An item on a plan is reached exactly as before, because #2637's plan move carries the item's workspace along. - A planless agent's instructions name no plan link and no pages.
coderInstructionstakes whether the agent works on a plan. One with no plan isn't told aboutluke://plan/ā¦links or the Pages section, since pages are saved on a plan andshow_pagestill refuses a planless agent.- The text for an agent on a plan is byte-identical to before (checked by hashing every brief Ć CI combination before and after), so standing sessions keep their prompt-cache prefix.
- The lists stay plan-bound for now. The account's Inbox and the plan list still join items to their plan, so a planless item shows in neither until step 6 groups the Inbox by plan or automation and keeps planless items from builds that can't draw them. No planless agent exists until step 10 points runs at the workspace start, so nothing goes unseen in between.
Tests
inbox-store.test.ts: a planless agent's item is read and answered by a teammate who didn't start the agent, and neither read nor answered by an account outside the workspace. This fails without the store change, because the post itself is refused.coder-agent.test.ts: for every brief, an agent on a plan is told about plan links and pages, and a planless one about neither but keeps its Inbox section.- The existing Inbox, coder-host, and coder-inbox tests pass unchanged.
pnpm check:affected passes. This change is server-only; CI cannot verify the Mac UI, and ./scripts/verify.sh was not run (LUKE-159 stands in before the first release).
š¤ Generated with Claude Code
Summary by cubic
An agent with no plan can now post to its workspace's inbox, and its instructions no longer name a plan link or pages.
- Item posts and reads are gated by membership in the item's workspace, so a planless agent's item reaches its workspace's members and no one outside it, while an item on a plan stays reachable exactly as before.
- Only a planless agent's instructions leave out plan links ā both the
tryluke.devform and the olderluke://plan/one ā and pages; an agent on a plan is told of them exactly as before. - The account's Inbox and plan lists still join items to their plan, so a planless item appears in neither until a later step groups the Inbox.