Skip to content

feat: project notes agents leave for later threads - #1008

Merged
badcuban merged 17 commits into
mainfrom
feat/project-notes
Nov 19, 2026
Merged

badcuban merged 17 commits into
mainfrom
feat/project-notes

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Agents can now leave short project notes that later threads in the project read: how to run a flaky test, which port a service needs. Stacked on #1006 (the project brief); plan: docs/design/project-brief-notes.md, piece 2.

How it works:

  • Each session starts with the list (title and one line) of the notes it may see, after the brief. project_note_read reads one by title; project_note_write writes one.
  • A setting, "Notes agents write": Off, Ask me first (the default: every note an agent writes waits for the user), or Keep without asking (kept at once, but shown only to agents with no more access than its writer until the user shows it to all threads).
  • A note waiting for the user shows as a row in the thread where it was written, with Keep and Discard. It isn't an approval or an activity, so it never marks the thread as needing the user, pauses a goal or holds back wrapping up. Undoing the turn that wrote it discards it, at once and after a restart.
  • Settings › Instructions lists the picked project's notes on that computer: read, edit, remove, add, keep or discard suggestions, show a limited note to all threads.
  • Access is judged by the runtime, not the thread's stored setting. A writer's note gets the narrowest of the thread's access and mode, the level the agent really runs at (Pi has no Auto) and a lead pass's ceiling. A reader counts at the level its chat asks for. Suggestions are never listed or readable by title. A write over an existing title is a suggestion, except a thread rewriting its own limited note. Agents under an outside agent's limit can't write; side answers, General Chats and fenced threads get no notes.
  • Approval names what the user saw: Keep names the suggestion's id, and "Show to all threads" names the note's version, so a rewrite that lands first is refused.
  • The app's note changes go through one RPC, projectContext.changeNote: four more RPCs pushed the WebSocket RPC table past the size where the type checker turns the server's layer types into any.
  • The lead chat's role text says rules for the whole project belong in a note.

The two tools add 1,368 bytes to the tools Claude loads on demand, nothing up front. The Claude replays are re-recorded because Claude's allowed tools now include them.

Checked live on a throwaway server: a Codex thread wrote a note (a suggestion under Ask), it was kept through the app's RPC, and a new Claude thread found it through its list and project_note_read.

The plan (docs/design/project-brief-notes.md, rev 3) and the first part
of piece 1: project_briefs (migration 122) with a revision checked on
save, the ProjectContext service with projectContext.subscribe and
projectContext.setBrief, the projectContext capability, the optional
projectInstructions on ProviderSessionStartInput, and the
ProjectInstructions lookup ProviderService will use at every start.
Delivery to each provider and the page come next.
…ry computer

A Brief section under the project picker: a text box, Save, and a line
saying which computers the save reached. Each computer's save sends the
revision this app last saw there; a stale answer from the picked computer
shows the newer text and keeps the user's edit one click away. Computers
that hold another brief get a Use this brief on <computer> too button.
Hidden where the project's computer lacks the projectContext capability.

Also: projectContext.subscribe and setBrief on the web RPC client, the
source's brief carried into Set up on another computer, ways in from the
project menu, the command palette and the lead chat's crown card, and the
app guide's place and topic for the brief.
ProviderService looks up the project's brief at every adapter start,
recovery inside sendTurn included, and hands it to the adapter. Side
answers, General Chats and threads behind the link fence get none.

- Claude: after Threadlines' own system prompt append.
- Codex: the thread's developer instructions, after the user's own from
  config/read. A resumed thread whose brief changed gets it added with
  thread/inject_items, since Codex writes developer instructions into the
  conversation only when it creates a thread.
- OpenCode: the end of the threadlines instructions entry.
- Pi: the end of the instructions file.
- Muse and ACP agents: ahead of the first prompt after a start, again
  only when the brief's hash differs from the one kept in the cursor.

"Set up on another computer" copies the brief with the project, into an
empty brief only. Piece 1's labels say "Project brief" until notes land.
- The brief saves on the same folder of the same repository on each
  computer, whatever the sidebar's grouping: grouping by repository no
  longer joins another project in that repository, and "Keep separate" no
  longer leaves the other computers out.
- Each computer's revision is taken when the edit begins, so a brief
  saved on another computer meanwhile is refused there, not overwritten.
- ACP: a prompt the agent refused, or one a revert removed, sends the
  brief again on the next prompt.
- Codex: a revert forgets which brief the conversation holds, so the next
  resume adds it again rather than leaving it out.
…es in the thread

The Notes section lists the picked project's notes on its computer, with
Keep and Discard for suggestions, Show to all threads for a note kept
without asking, and the user's own add, edit and remove. The "Notes agents
write" setting sits at its top. A suggestion also shows as a plain row
after the turn that wrote it, read from the computer's project context, so
nothing that decides a thread needs the user sees it. One shared
subscription per computer feeds both. The menu and crown card now say
"Project brief and notes" and "Brief and notes", and the guide topic
covers notes.
Saving, removing, approving and resolving a suggestion were four RPCs,
which pushed the WebSocket RPC table past the type checker's size limit.
They are now one, changeNote, whose payload says which by kind and which
answers with the note after a save or a kept suggestion.
…es the version seen

- An agent without the access level its chat asks for (Pi has no Auto)
  runs at the next safer one, and notes now judge it at that level, both
  as a writer's ceiling and as a reader.
- "Show to all threads" carries the version the row shows; a note its
  writer rewrote since is refused instead of approved unseen.
- An open note keeps the user's draft when the note changes elsewhere,
  and says it changed.
The previous change judged readers and writers alike by the level a
runtime really runs at. When the provider list can't place a runtime, that
falls back to the three legacy levels, so a real Auto reader would count
as Auto-accept edits and see notes limited to that level. A writer still
uses the level it runs at, which only narrows its note's ceiling; a reader
now uses the level asked for, which only hides more notes.
With the editor kept open across a rewrite, the button sent the version
from the list, so a rewrite the user hadn't read would be approved. While
a note is open, approval now names the version of the text on screen, and
the server refuses it once the note has changed.
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 19, 2026 6:52am UTC

Request Review

Base automatically changed from feat/project-brief to main November 19, 2026 06:50
Main is the brief's squash on top of #1007, and this branch already holds
both, so the merge changes no code.
@badcuban
badcuban added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit d02d7bf Nov 19, 2026
24 checks passed
@badcuban
badcuban deleted the feat/project-notes branch November 19, 2026 07:07
badcuban added a commit that referenced this pull request Nov 19, 2026
Project notes (#1008) added project_note_write; it gets the same saved-key check as the other room tools that change something.

This branch was previously deployed

1 inactive deployment
Preview — 9fc993f7 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant