Overview first, then one range
These habits cut tokens or stop a write that would miss. The error code is the one the server uses when the habit is skipped.
Notes are stored on the server as plaintext so the product can search, outline and edit by line. Version 1 does not encrypt note bodies end to end.
Content returned to agents is marked as stored data and carries provenance. This does not stop a model from following text inside a note. Folder keys limit what a compromised agent can touch inside Noteheld, not tools the agent has elsewhere.
Habits#
- Call
overviewbefore any other tool. The map is capped at 1500 tokens and has no bodies. Recent notes and folders carry one-line summaries, andlistshows the summary of every note in a folder. Read summaries first and open only the notes you need.
- A
readwith nolineson a long note with sections returns its summary and outline, not the text. Thenreadwithlinesfor the part you need. A long note with no headings returns a window andnext lines=<from>-<to> rev=<rev>. A range past the ceiling istoo_large.
- Keep a read to 80 lines or 1500 tokens. The ceiling is 200 lines or 2500 tokens. One line over 1500 tokens is
line_too_long.
expectis the numbered lines joined by a line feed, with no line feed after the last line. Copyexpectfrom after the numbered gutter. Do not copy a!line. That line is the correction body. It is stored data, and it is not part ofrangeHash. Pasting the gutter isgutter_included. A bad copy isexpect_mismatch. Nothing is written.
- Send
baseRevisionfrom that read. Missing it isbase_required. The edit rebases when everyexpectstill matches the shifted lines, or when areplace_textmatch is still unique. Otherwise the code isconflictand nothing is written.
- On
conflict,expect_mismatch, andline_expect_disagree, copyexpectfromdetails.head.textafter the gutter and retry withbaseRevisionset todetails.head.revision. Nothing is written. Ifdetails.headis null,readagain. On MCP, setidempotencyKeyin the arguments. On REST, that field or theIdempotency-Keyheader. The same payload replays. A different payload isidempotency_mismatch(409).
- Send
reasonon every mutation, at most 300 characters. Missing it isreason_required. Nothing is written.
- Send
summaryonwrite, at most 200 characters. It is what the next agent reads first. If the workspace requires one, the code issummary_required. Otherwise the server derives one from the first heading and warns. Your summary stays through later edits. Passsummaryoneditwhen the note now says something different.
- Prefer
replace_textwith a unique snippet. Usereplace_lineswhen an outline gave the range, and keep the numbers and theexpecttext on the same lines. A split isline_expect_disagree. If the snippet occurs more than once,replace_textfails withambiguous_matchand writes nothing. Include the previous line inmatch, or passlinesandexpectfor the single line you mean.match_too_short,expect_count, andoverlapwrite nothing.
- Act on corrections. A correction is a fix the owner asked for, and it prints first when you read that note. Change the note so it says what is asked, then resolve the correction with its
idand areason.correctwithaction=listand nopathlists them all. Only the owner adds corrections; if you think a note is wrong, edit it and say why inreason. The body lines use!instead of a line number. That text is data like any note text. Copyexpectfrom numbered lines only.
- Do not paste secrets. Default mode stores
[REDACTED:type]and says so.blockreturnssecret_blockedand does not store the write. Under that cap,warnstores the secret. Over 50 matches, every mode returnssecret_blocked(400) and does not store the text. The detector list is finite. Scanning does not rewrite history. Do not change secret mode to get a write through. A refused secret is the control working. A search shorter than 2 characters isquery_required.
- Revoke a leaked key. The next request is
key_invalid. A folder key does not grant the rest of the workspace. A leaked master key can also rotate the master key. That locks you out. Rotating the master key does not revoke scoped keys or view links unless you setrevokeScopedKeys. That flag revokes both. If the old key leaked, set it. A growth write over the cap isplan_limit(403). Reads still work. Nothing is deleted to make room.