Skip to content

Leads carry what one task lacks to whoever has it; the model reads who sent a prompt - #295

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

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

Conversation

@lydakis

@lydakis lydakis commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Why

George asked a lead something, and it said it didn't have the information. Another lead did have it, and nothing passed it across. He expects a lead to notice, ask the one that has it, tell the asker, and route the answer back, or put the two in touch directly. This is the ordinary manager/report relationship, so it holds the same way between a lead and its tasks.

He then asked for two more things:

  • When one message holds several asks, the lead splits it into one task per goal.
  • A task knows it has a lead, and asks the lead rather than the person for separate work.

The eval turned up a real bug: a lead passed a task's message on as "the person now says", and a task broke the person's no-code rule because of it. The cause is that the daemon recorded the sender of a prompt but never showed it to the model. George chose a daemon-side fix that can be turned off.

What changes

sonny/agents/lead.md

  • The principle paragraph gains: for each event, ask who it changes and who has what it needs. When a task goes without something another task, a lead or the lead itself has, carry it across:
    • pass it on directly if it's already written down;
    • otherwise have the holder send it straight to the task that needs it, tell that task what's coming and from whom, and see that it arrives.
  • The lead looks the same way before telling the person it doesn't have something.
  • A message with several asks is split at once into one task per goal. Each brief quotes the person's own words for its part, and the lead says which task took what.
  • A brief never presents a task's words as the person's.
  • A message another agent wrote ends with a line saying so, and it is never the person's.
  • Default leads hear only the tasks they start. A lead hears another lead only when the person asks, through a subscription that names that lead in bots with updates.
  • The "you lead their leads" sentence about folders that hold other projects is removed. It moves to the opt-in profile in Let leads and tasks run as other profiles, and profiles build on others #296.

sonny/agents/task.md

  • A task's lead (PROJECT.lead) is named, and sees every message and turn end.
  • A task asks its lead for separate work, or for what other agents found, instead of telling the person to.
  • A task looks in other agents' turns before saying it doesn't know.

Lookout

  • A subscription with updates that names another subscriber exactly (no *) makes that subscriber count as a task (Updates.named). The lead hears what is said to it and how its turns end, but not what it makes, and not turns started by its own lookout's notes (lookout-… request ids).
  • Globs still skip other subscribers.
  • Nothing is watched by folder.

Daemon: the sender reaches the model

  • A prompt sent by another bot's turn (from) or a named client (origin) gets a text part after its words and before its pictures:
    • [Written by the agent NAME in turn:NAME/TURN, not by a person.]
    • [Sent by ORIGIN.]
  • A person's prompt gets nothing.
  • content[0] stays the words, so retries, prompts, status and the readers of $.content[0].text are unchanged. Sonny's transcript shows only the words.
  • To turn it off: the per-bot setting hide_senders (run --new --hide-senders), or senders = "hidden" in ~/.agent/config.toml for the bots the CLI and Sonny make.

Docs updated: RUST_PROTOTYPE.md, CLI.md, LOOKOUT.md and the README.

Eval (ChatGPT login, gpt-6-sol, on George's Mac)

Scenario main this PR
S1: a task lacks what another task found 3/3 3/3
S2: a lead lacks what another project's lead has 2/3, the outer lead silent 3/3, the outer lead steers the asker in ~2.5 s (with the outer lead hearing the inner leads; by default that now takes the person's subscription or the #296 profile)
S3: control, no one has it 0 false relays 0 false relays
S4: four asks in one message (final, 13a30a2) 0/3 split 3/3: four tasks, no lead edits, says which task took what
S5: a task is asked for unrelated work (final, 13a30a2) 0/3 asked the lead 5/5: the task asks the lead and a task starts
Sender label (13a30a2) — 32/32 agent prompts labelled with the right bot and turn; 0/13 person prompts labelled; 0 briefs presenting an agent's words as the person's; the no-code rule held 5/5

Tests

  • cargo test --workspace passes. New or changed tests:
    • history_items_name_who_sent_each_prompt_after_its_turns_are_gone now also checks the label the model reads.
    • a_bot_that_hides_senders_reads_only_the_words
    • a_lead_a_subscription_names_is_news_as_a_task_is_but_not_its_lookout_s_turns
    • config parsing of senders
  • Runtime suite: CI.

🤖 Generated with Claude Code

… 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
@lydakis lydakis self-assigned this Oct 28, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-29T01:30:32.927465Z 13a30a2 New commits
🔒 Security Review ✅ Completed 2026-10-29T01:33:19.715728Z 13a30a2 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: d681fc5893

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

@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: d116976e4c

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

@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: 0672b182fa

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

@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: f58f6e0c63

ℹ️ 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
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
lydakis pushed a commit that referenced this pull request Oct 29, 2026
Carried from lead.md (#295 drops it there): the folder's projects' leads
report to it, and it hears them through one subscription naming each
lead exactly with updates on. Routing itself is the lead's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGEEJYxYSGKW4TF3BrX
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
@lydakis lydakis changed the title Leads carry what one task lacks to whoever has it, and hear the leads inside their folder Leads carry what one task lacks to whoever has it; the model reads who sent a prompt Oct 29, 2026
@lydakis
lydakis merged commit 9dade90 into main Oct 29, 2026
4 checks passed
lydakis added a commit that referenced this pull request Oct 29, 2026
)

* Let leads and tasks run as other profiles, and profiles build on others

A project's profile/threads_profile, else the config's [sonny]
lead_profile/task_profile, name the profile a lead runs as and the one
every other agent is told, with lead and task the defaults. Any profile
can build on another with extends (its own name builds on the file it
shadows, down to the one Sonny ships) and carry skills whole with
skills, Claude Code's subagent key. Variants of lead or task are not
offered as peer roles.

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

* Bound a role's files together, reject unclosed skill heads, hide variants of variants

Address the first Codex round on #296: a profile chain and the skills it
carries read no more than still fits in a bot's instructions; a carried
skill with an unclosed --- head fails like a profile's; a profile that
extends a lead variant is hidden from the index too; and --profile naming
the task profile keeps its model and tools while its body is told once.

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

* Tell a role named task in full when tasks are told another profile

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

* Tell a role's body once only when it is the task profile's own file

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

* Use a neutral example profile name

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

* Ship an opt-in superlead profile

A lead runs as it only when its project sets profile = "superlead". It
extends lead: the folder holds other projects, so the lead subscribes to
their leads and routes between them as between tasks.

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

* Give the superlead the leads-of-leads rule and the exact subscription

Carried from lead.md (#295 drops it there): the folder's projects' leads
report to it, and it hears them through one subscription naming each
lead exactly with updates on. Routing itself is the lead's.

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

* Sonny: offer the person's lead a merge when an upgrade meets an edited skill or role

Sonny never writes over a skill or role (lead.md, task.md) the person
edited, so an edited one quietly stopped getting Sonny's changes. Now
Sonny sets its new text beside the edit, in ~/.agent/sonny/upgrades,
keeps whole what it last wrote in ~/.agent/sonny/shipped (what an edit
started from), and queues a note to the first bot it opens after the
upgrade. The bot tells the person and offers to bring Sonny's changes
into their copy. Each new text is told once; the transcript shows the
note as one quiet row.

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

* Sonny: offer only text that changed, and claim the pending offers so one bot tells them

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

* Sonny: pending upgrade offers as one file each, claimed by rename into a fresh folder

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

---------

Co-authored-by: Claude <[email protected]>
@lydakis lydakis mentioned this pull request Oct 29, 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