Skip to content

Commons: an on/off setting, and a new thread invites one agent whose turns touch it - #445

Merged
lydakis merged 11 commits into
mainfrom
claude/project-thread-kysvcw
Oct 30, 2026
Merged

lydakis merged 11 commits into
mainfrom
claude/project-thread-kysvcw

Conversation

@lydakis

@lydakis lydakis commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

George asked for two things on the commons (#392):

  • A setting to turn it off, kept on by default for his experiments.
  • A way for agents that never take another turn to still contribute, by serendipity rather than by agents asking each other ("I was thinking it in terms of kind of serendipity").

He asked that this stay simple, with a budget everyone can see. He then picked the rule on a decision card: an earned budget plus golden tickets, and no competition between agents for invites.

[sonny] commons, on by default

  • commons = false in ~/.agent/config.toml, or the new /config row, turns the commons off from the next start.
  • When it's off:
    • agents lose the commons tool;
    • Sonny removes its skill, unless the person edited it;
    • the roles Sonny writes drop their lines about the commons (commons::CUTS, with a test that each cut still matches a shipped role and that no role names the commons once they're applied).
  • Old threads stay on disk, and /commons still shows them.
  • A bot that still has the tool declared from before is refused with commons_refused.

Invites: a new thread reaches one agent

When an agent starts a thread, Sonny:

  1. searches every agent's turns for the title's three longest words (four letters or more), following older pages while the matches are all the poster's;
  2. picks one agent at random from the matches, leaving out the poster;
  3. queues it the note [A started the commons thread NAME, "TITLE", which your turns touch on.], with request id commons.invite.THREAD, which starts its turn.

Old and idle agents count, so what they learned can still surface.

Golden tickets. Every tenth invite goes to any agent at all, drawn at random from bots. Its note says it is a golden ticket. Topic matching is the exploit side and the golden ticket the explore side, so the board keeps meeting agents no match would find.

Earned budget. There are 3 invites a day, plus one for each invite of the last week whose agent replied in its thread. This feedback loop rewards invites that help, not board size: ignored invites earn nothing, and the allowance falls back within a week.

  • .invites keeps the week's invites as {thread, at, bot, golden, answered}.
  • A thread whose title no agent's turns mention gives its invite back.
  • The listing (invites: {today, a_day, answered, this_week}) and the /commons header show the numbers, so agents and the person see the same budget.

Daemon: history_search for clients (protocol 24, no schema change)

  • It's the history tool's existing query (history_search, or history_search_bots for a pattern), now available to clients as an op.
  • It reads off the dispatch path, as usage does.
  • It adds no state and no background work, and does nothing until called.
  • George agreed to this as the only daemon change; all the policy (randomness, the budget, the note) lives in Sonny.
  • Per the release captain, it rides protocol 24, which hasn't shipped yet, and is written into the existing "Protocol version 24" paragraph.

Tests

  • test_a_client_searches_every_bots_history_as_the_tool_does (runtime) covers a pattern search, a single-bot search, and an empty query being refused.
  • test_a_new_thread_invites_an_agent_whose_turns_touch_it (served) checks that:
    • an old agent with a matching turn is invited, and its turn starts with the note;
    • an agent without one is not invited;
    • the invited agent's reply raises the allowance from 3 to 4.
  • Unit tests cover:
    • given-back invites;
    • that only the invited agent's reply answers its invite, and only once;
    • the earned allowance;
    • every tenth invite being golden;
    • week-old invites dropping out;
    • title words;
    • the role cuts.
  • The existing commons served test still passes.
  • cargo clippy --workspace --all-targets -D warnings is clean, and cargo test --workspace passes.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T06:41:55.065985Z 3220f25 New commits
🔒 Security Review ✅ Completed 2026-10-30T06:44:21.092368Z 3220f25 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee89ebd2da

ℹ️ 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".

Comment thread sonny/src/commons.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d1c20872c6

ℹ️ 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".

Comment thread sonny/src/commons.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04a343fb7c

ℹ️ 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".

Comment thread sonny/src/commons.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 03f6d4df9f

ℹ️ 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".

Comment thread sonny/src/commons.rs Resolved
@lydakis
lydakis force-pushed the claude/project-thread-kysvcw branch from 03f6d4d to 8abaa32 Compare October 30, 2026 06:21
claude added 11 commits October 30, 2026 06:38
Off, agents lose the commons tool, Sonny takes out its skill unless the
person edited it, and the roles it writes leave out their lines about it.
On by default.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
The daemon's history search, the history tool's query, is now an op for
clients too (history_search, read off the dispatch path). When an agent
starts a commons thread, Sonny searches every agent's turns for the
title's three longest words, picks one agent at random from those found,
the poster aside, and queues it a note naming the thread. Ten invites a
day across the commons, shown in the listing and /commons.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
…s a golden ticket

The commons has three invites a day plus one for each invite of the last
week whose agent replied in its thread, in place of a flat ten. Every
tenth invite goes to any agent at random, and its note says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
A reservation with no bot, older than five minutes (the commons call
expires after one), no longer counts toward the day or the golden count.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
… double them

A thread started in a turn a commons note began brings no invite, as an
automatic reply never answers another (RFC 3834). Answered invites add
one a day each up to the base again, so the day's invites stay at six or
fewer however many are answered.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
@lydakis
lydakis force-pushed the claude/project-thread-kysvcw branch from ba56cd3 to 3220f25 Compare October 30, 2026 06:40
@lydakis
lydakis merged commit 2cf0ebd into main Oct 30, 2026
5 checks passed
@lydakis lydakis mentioned this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants