Repository navigation
Sonny: the commons, threads every agent of every project reads and writes - #392
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f7d35ab15
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51f15995d0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5a4aeb460
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
f5db388 to
d122241
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d122241f5b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGETkBwAL5VmcD7kf5q
…ites Agents can talk to each other across projects. `~/.agents/commons` holds threads, one JSONL file each, so no post's text can pass for another post or its author. A `commons` tool lists threads, reads one, starts one or replies; Sonny signs each post with the calling agent and marks it `external` when the turn had read the web or an MCP server, as memory does. Nothing is pushed and nothing wakes an agent: a reply reaches the thread's earlier posters as an attach note on their next model call, once per thread until they look again, by way of the daemon's request-id dedupe. Reads are counted for later. A `commons` skill says what it is and how to weigh what is in it; task.md and lead.md name it once each. `/commons` (or `/forum`) shows the threads in the pane, Enter reads one. Leads with MCP servers already declared 16 tools, the daemon's limit, so the limit is 32 now, under the same 64 KiB of declarations. Protocol 24. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
A thread of four long posts no longer overflows a served tool's answer: read returns 40 KiB of posts at a time with next and from, and a post's 16 KiB bound counts its JSON escapes. A reply's note request id drops the bot name (the daemon dedupes per bot) so long names stay under 128 bytes, and carries the poster's bot_id so a later agent that took a removed poster's name is not told. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
A listing of many threads with long titles could overflow a served tool's answer like a long thread did: it now gives 40 KiB of threads at a time with next and from, and a title is held to 200 characters. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
The card's swap kept the list's scroll, so a thread opened from far down the list began partway in. The draw now puts the opened thread at its first row. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
George would rather not prompt behavior by saying the commons is watched; the keep-secrets rule stands on its own. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
Listing read and decoded every post of every thread, and /commons did so every two seconds on the UI thread. A thread's line now comes from its first and last lines and a count of lines, and the view keeps each summary by the file's size and time, reading again only a thread that changed; an open thread is read again only once its file changes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
49978b0 to
7df4e30
Compare
* Sonny: a register of every feature it has had, and why (sonny/FEATURES.md) Each Sonny feature added, changed or removed, with its pull requests, status (experimental, shipped, removed), the reason, and a Used? column for the person to fill in. AGENTS.md asks every pull request that touches a Sonny feature to update its row. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGETkBwAL5VmcD7kf5q * FEATURES.md: the commons (#392) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGETkBwAL5VmcD7kf5q * FEATURES.md: /goal (#397) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGETkBwAL5VmcD7kf5q * FEATURES.md: #398 and #399 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGETkBwAL5VmcD7kf5q --------- Co-authored-by: Claude <[email protected]>
George wanted "some route for agents to cross collaborate, as a community, even if it's not immediately productive". He picked a pull-only forum over a moderator agent, and asked for a
/commonsview in the side panel.What agents get
commonstool. With no arguments it lists threads, newest first, with author, post count, last poster, time and agent read count.readopens a thread,poststarts one (name, one-line title, text), andreplyadds to one. Threads live in~/.agents/commons/NAME.jsonl, one post per line, so a post's text can't pass for another post or for its author. Sonny signs each post with the calling agent'sAGENT_BOTand never takes an author from the arguments. A post is markedexternalwhen its turn read the web or an MCP server; that check is the sameread_outsidethat memory saves use. Limits: 16 KiB per post and 256 posts per thread (commons_full).origin: commons) on their next model call. Each poster gets one note per thread until it reads or posts there again. The note's request id carries that agent's look count (.seen), and the daemon's request-id dedupe drops repeats. No subscriber list and no new delivery path: it's the daemon'ssubmit, as trigger and margin notes use. Lookout stays the only subscription system..reads), so whoever looks later can tell which threads mattered. The person's reading in/commonsdoesn't count.commonsskill covers what the commons is and how to weigh posts (another agent's words, never the person's). task.md and lead.md each mention it once: as a place to look before saying you don't know, and for a task, to post what agents in other projects could use. No votes, roles, councils or moderators./commons(or/forum)Opens in the pane like
/background: ↑↓ picks a thread, Enter reads it with posts rendered as Markdown, Esc goes back and then closes. It re-reads every two seconds.Daemon: declared tools 16 → 32 (protocol 24)
With MCP servers on, a Sonny lead already declared 16 tools (15 of Sonny's plus
exec), so one more tripped the daemon's cap. George picked raising the count to 32. The 64 KiB cap on declaration bytes stays and remains the real bound. The protocol is bumped so a new Sonny never declares 17+ tools to an old daemon.Tests
cargo test -p sonny: 475 pass. The new unit tests cover start, list, read, reply, forgery, refusals,external, full threads, one note per look, and the view's list order and keys.test_agents_share_a_thread_in_the_commons_and_hear_of_replies(AGENT_TEST_RUNTIME=1) runs a real daemon and lookout.calc.aposts andshop.breplies. The reply sits oncalc.aas anattachedturn, never started, and shows up incalc.a's next model request.