Skip to content

Sonny: a lead reacts 👀 to the person's words in a task it routed elsewhere - #330

Merged
lydakis merged 21 commits into
mainfrom
claude/project-thread-ezdgfy
Oct 29, 2026
Merged

lydakis merged 21 commits into
mainfrom
claude/project-thread-ezdgfy

Conversation

@lydakis

@lydakis lydakis commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

What

Sometimes the person writes, in one task, something that belongs to another task. The lead can already pass it on. This PR adds two things: the lead tells the first task which part went where, and it marks the person's message there with 👀 so the person can see it was picked up.

  • react takes an optional bot (sonny/src/reactions.rs). A lead names one of its tasks, and the reaction goes on the person's newest message in that task.
  • The lookout records it (sonny/src/lookout/mod.rs). On a live react call that names a target, it finds the person's newest message in the target, meaning a user item with no from, no origin and no reaction. It then writes {node: [(by, emoji)]} to ~/.agent/sonny/reactions/{key}.by.json. The write is atomic: it writes a temp file and renames it. The target must be one of the caller's own project agents, and not the caller itself.
  • The task's window draws it (sonny/src/main.rs).
    • On replay, the reaction shows under the message it marks.
    • Live, the window re-reads the file about once a second.
    • If nothing has been drawn after the message yet, the reaction goes inline under it. Otherwise it gets a quiet row: ↳ calc.lead reacted 👀 to “…”.
    • A targeted react call is not drawn in the lead's own window.
  • lead.md: the one principle paragraph gains a sentence. When part of what the person says in one task belongs to another, the lead passes that part on in their words, tells the task where they said it which part went where so nothing is done twice, and reacts 👀 there.

The daemon is unchanged. Everything is client-side.

Tests

  • New unit test a_lead_s_reaction_in_a_task_is_kept_by_the_person_s_message_and_read_once. It covers the write, reading each addition once, removal, and target.
  • Ran cargo test -p sonny (338 passed), plus cargo fmt and cargo clippy -p sonny --all-targets -D warnings.
  • An A/B eval of this case on a Mac (main vs this branch) is running. Results will follow in a comment.

claude added 17 commits October 28, 2026 23:26
… inside their folder

A lead read a task's "I don't have that" as the task's own business and
left the person to carry the answer across from another task. And a lead
whose folder holds other projects heard nothing from their leads: they
were neither made by it nor named its way, so the person's question to one
lead never reached the lead above it.

- lead.md: the principle asks who has what a task needs, not only who an
  event changes; the lead passes it on when it is written down, else has
  the holder send it straight to the one that needs it, tells the one
  waiting what is coming, and sees it arrive. The leads of projects inside
  its folder are its tasks in all else.
- task.md: look in the other agents' turns or ask the lead before telling
  the person you do not know.
- Lookout: a lead watches the nearest leads inside its folder as tasks
  (not what they make, nor the turns their own lookout starts); the home
  folder's lead watches none. New built-in `lacks` picks a task's turn
  end that shows it going without what another task, memory or the lead
  has.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGY9Qav3k3Abe8hMQE
A lead opened in another folder moves there with its next message; the
lookout kept its old folder, so its old parent kept hearing it and its
new one did not. Each accepted or queued message's workspace now updates
the bot's record, and the subscriber's own folder, before nesting again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGY9Qav3k3Abe8hMQE
A steer's folder is for that message alone, and the daemon does not move
the bot for it. A lead's message naming another folder now has the
lookout read the daemon's record, live only, and move the lead when that
says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGY9Qav3k3Abe8hMQE
Replaying a bot's created event put its record back to the folder it was
made in, so a lead moved since went back under its old parent after a
restart. The same bot as listed now keeps its listed record.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGY9Qav3k3Abe8hMQE
George wants the lookout as simple as can be, forwarding rather than
judging, so this PR adds no built-in: the lead text and the inner leads'
forwarding carry the routing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGY9Qav3k3Abe8hMQE
Taking the whole listed record in place of the created event's changed
what a subscriber's judge was picked from, so a subscription's look-for
was never judged. Only the folder comes from the listing now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGY9Qav3k3Abe8hMQE
…a task knows its lead

George: given a long list, the lead should break it into separate tasks
as the project coordinator he uses does; and tasks talked of telling
the lead to make a task without knowing they could. task.md now names
the lead, says it sees every message and turn end of the task, and has
the task ask it for what lies outside its brief (a task of its own for
separate work, what another agent found) instead of sending the person.
lead.md: the fewest agents, but one per separable goal; a message of
several asks becomes a task per goal at once, the person's words in each
brief, and the person hears which task took what.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGY9Qav3k3Abe8hMQE
…words as the person's

From the A/B eval (gpt-6-sol, 3 runs each): given four asks, the lead
wrote the small README part itself 2/3 times, leaving an uncommitted
edit beside the tasks' branches; and once it quoted a task's words as
the person's in a new brief.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGY9Qav3k3Abe8hMQE
Drop the lookout's automatic watching of the leads in subfolders: a lead
hears the tasks it starts, and another lead when the person asks, by a
subscription with updates naming it exactly. Default lead text no longer
leads the leads of projects inside its folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGY9Qav3k3Abe8hMQE
A prompt another bot's turn or a named client sent reaches the model with
a text part after its words naming the sender, so an agent never takes
another agent's words for the person's. content[0] stays the words. A bot
made with hide_senders (--hide-senders, or senders = "hidden" in
~/.agent/config.toml for the bots the CLI and Sonny make) reads the words
alone. The role files drop the From line convention it replaces.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGY9Qav3k3Abe8hMQE
A lead's react tool takes an optional bot: the lookout records the reaction
against the person's newest message in that task, and the task's window
draws it. lead.md's principle now covers passing on part of what the person
said in one task to the task that owns it, telling the first task which part
went where, and reacting 👀 there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGY9Qav3k3Abe8hMQE
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 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-29T02:50:39.845506Z 1872ae3 New commits
🔒 Security Review ✅ Completed 2026-10-29T02:54:36.147632Z 1872ae3 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: e8acd0a6c9

ℹ️ 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/lookout/mod.rs Resolved
Comment thread sonny/src/lookout/mod.rs Resolved
Comment thread sonny/src/lookout/mod.rs Resolved
…he person wrote

Applied on a tool_completed that neither failed nor was denied; the
person's newest message is read newest first through next_from and short
history_items reads, and an Anthropic tool result is not theirs.

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

@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: 8f6146335d

ℹ️ 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/lookout/mod.rs Resolved
Comment thread sonny/src/lookout/mod.rs Resolved
Comment thread sonny/src/main.rs Resolved
…e replay

A call that ends after the lookout last watched still lands; a window draws
a lead's reaction it read before the message itself landed.

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

@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: 3f309ef6b0

ℹ️ 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/lookout/mod.rs Resolved
Comment thread sonny/src/lookout/mod.rs Resolved
Comment thread sonny/src/reactions.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: 94d6b9ccff

ℹ️ 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/lookout/mod.rs Resolved
@lydakis
lydakis merged commit 0aa7976 into main Oct 29, 2026
3 checks passed
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