Subagents
Book writer
Updated 6 Oct 2026
On this page
For agents
Load this page when: you need to know how books are written, edited or recovered
- Use
trove items appendto add content andtrove items put <id>:<page>to change one page. - Always pass
--expect-version Ntoput, with the version fromtrove items get <id> --json. - After a refused write, read the book again, merge your change, and retry at most 3 times.
The book writer creates and edits Markdown books and manuscripts. It edits so that it never overwrites another writer's work.
| Signal | What happens |
|---|---|
| You say "write a book about..." | The writer drafts an outline, then the book |
| You confirm a manuscript entry | The writer adds the entry |
| The manuscript is marked auto-update | The writer adds the entry, then your agent shows a one-line notice |
| A write is refused | The writer reads again, merges, and retries |
What it does
The writer creates new books with trove items create and trove items import <file>. It edits existing books page by page. It shares the book with other writers, such as other sessions or a teammate's agent.
When it starts
- You use a writing phrase, such as "write a book about", "add a section to" or "draft a manuscript".
- You confirm a manuscript entry that your agent proposed.
- A manuscript is marked auto-update. The writer gets the entry directly.
See Manuscripts.
How it edits without losing work
Another writer can change the book between your read and your write. A whole-book put would then delete their work. The writer follows three rules, in this order:
- Use
trove items appendto add content. An append is spliced in on the server, so it cannot conflict. - Use
trove items put <id>:<page>to change one page. Other pages stay untouched. - Always pass
--expect-version Ntoput. The version comes fromtrove items get <id> --json.
When a write is refused
A refusal means nothing was written. The writer then:
- Reads the book again.
- Applies its change to the fresh copy and keeps the other writer's content.
- Retries with the new version.
It retries at most 3 times. If the book still conflicts, the writer stops and tells you.
Check and undo
The writer compares trove items toc <id> before and after a write. Every title present before must still be present.
To undo, ask your agent: "Show the version history of my book, and restore the version before the last edit." A restore saves the current text first, so you can undo a restore too.
How a book is split into pages
Each # heading starts a new page. Headings at level two and below stay inside their page. A file sent to put <id>:<page> must hold exactly one # section.
Size caps
These caps are fixed. They are not plan limits.
- A whole-document
putis refused above 1 MB (HTTP 413). Use a page-levelputorappendinstead. - A book holds at most 30 MB. Split a larger file into several parts, and ask your agent to import each part as its own book.
For upload limits per plan, see Plans and limits.
Auto-update manuscripts
An auto-update manuscript carries its own writing instructions. The writer reads them with trove ms show <id> --json and follows them exactly. It writes with page-level operations. It never deletes existing wiki content. It supersedes old content with a dated note.
What it never does
- It never overwrites a book without a version check.
- It never changes a book without your approval, except an auto-update manuscript.
- It never hides a failed write. It reports the failure and the exact command.
Errors and fixes
| Error | Fix |
|---|---|
| Item not found | Ask your agent to list your library and check the id. |
trove: command not found | The shell PATH is stale. Open a new terminal or run trove setup. |
| Not authenticated | Run trove auth login. |
| No content provided | The file is empty. Check the file, then ask your agent to try again. |
413 Payload Too Large on put <id> | The book is over the 1 MB cap. Use put <id>:<page> or append. |
| Content would split into N pages | The page file has more than one # heading. Demote extra headings to ##, or use append. |
| 409 modified concurrently | Another session wrote at the same moment. Ask your agent to read the page again and retry. |
| Page N not found | Ask your agent to show the table of contents of the book, to see the current page numbers. |
Model and tools
The book writer runs on Opus. It uses Bash, Read and Write.
Best practice
Write each chapter as an explanation followed by "Rules for agents", with RULE, WHY and APPLY lines. Use one # heading per page. Ask your agent to edit one page at a time, so that each edit has a version check. See Write books agents can read and Write a book. For manuscripts, each manuscript sets its own approval rule. See Manuscripts that stay useful.
Direct CLI
Your agent runs these through the trove command. You can run them yourself in a terminal, but asking your agent is the recommended way: it picks the right flags, waits for processing and checks the result.
| Task | Command |
|---|---|
| Create a book from a file | trove items import <file> |
| Add content | trove items append <id> --file <file> |
| Change one page | trove items put <id>:<page> --expect-version N |
| See the version | trove items get <id> --json |
| See the page numbers | trove items toc <id> |
| Review and undo edits | trove items history <id>, then trove items restore <id> --version N |
See the CLI reference.