Repository navigation
Sonny: /new makes any agent; every list narrows as typed - #626
Conversation
…ast typed /switch alone (and /lead alone) opens one list of every agent over the composer, found by typing with the shared matcher: the folder's leads first, then the project's agents, then other projects' leads, then the rest; the agent beside the conversation is picked to start, and a last row makes a new lead. /switch NAME still opens an agent at once, and a name found in none lists what it narrows to. Each of a project's Sonny windows now notes where it is (none for a bare terminal) and when the person last used it. An agent's show_agent and run_in_pane, and the lead's new task tabs, follow the open window used last, as tmux picks the most recent client, so a Sonny in Ghostty no longer opens agents in another terminal's Rex session. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
…ad's tabs opening there Codex review on #604: a worker window marking itself made the lead's window not the latest, so later task tabs stopped opening even in the same home; and a worker borrowed whichever home was typed in last. A lead now opens task tabs while the window used last is in its own home, and an agent's window takes its home once, when it starts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
Codex review on #604: /switch execs the other agent's Sonny in the same process, so the old project kept counting the window as open. Before exec its entry is kept as a closed window's (pid 0), its place kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
…once Codex review on #604: a task's window that replaced its lead's (the only open one) could not learn its home, so it never marked; it now gets the place it replaced in the same terminal (--window-place, unlisted). And a quick return from another window was lost to the once-a-second throttle: only typing is throttled now; Enter, clicks, pastes and focus mark at once. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
Codex review on #604: a window opened by show_agent with every Sonny closed could not learn its home. Every window Sonny opens in a layout (show_agent, the lead's task tabs, /switch) now gets --window-place; a window opened by hand falls back to the newest home known, open or closed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
The test wrote another sky's haiku while the read started at Ready could still be on its way; on a slow runner that older read landed last and the haiku was never seen. It now lets that read land first. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
…-7nasaw # Conflicts: # sonny/FEATURES.md # sonny/src/main.rs
…-7nasaw # Conflicts: # sonny/src/main.rs
…-7nasaw # Conflicts: # sonny/FEATURES.md
George (on #604): talking to one agent in Ghostty and another in Rex at once, each should act where it is spoken to. The places record was one most-recent window per project; it now notes the agent each window shows, and an agent's show_agent/run_in_pane, and a lead's task tabs, go by the window used last of those showing that agent, a task's by its maker's, then the project's. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
/lead is gone, and /switch no longer has a "new lead" row. `/new [NAME]` asks three things: - the profile: every profile file, a lead's roles first, the project's own marked; - where a worker works: a worktree, this folder, or an empty folder; - its first message, which starts it and names it. Esc goes back a step, and nothing is made before the message is sent. A lead stays in this folder in the profile picked. Any other agent is this lead's task, and the window becomes the new agent. A send that starts nothing says why over the kept message, where a busy lead's status line would hide it. A task's window no longer welcomes it as the folder's lead. The task is the lead's through a new `agent run --new --created-by BOT`. It sends the maker's id in create, so the task is the lead's while its first message stays the person's. The daemon is unchanged. Inside an agent's shell, a bot is made only by that agent. Every list over the composer narrows as you type, through one shared picker (list::Picker). An agent's question keeps its options as they are. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
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: 23a6be6d75
ℹ️ 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".
Each change answers a Codex review finding on #626. - A /new task inherits the lead's model and effort, unless the project names the tasks' own, as a task the lead starts from its shell does. - The lead's mode is read from this window's daemon, not the default one, so the task's sandbox and approvals follow the lead. - While the new agent's first message is written, y, n and a are letters, not answers to the old lead's approval. - A new lead's first message reaches it as a message. It is never run as a command or a shell line. - A picture in the first message is refused with the reason. Nothing is made and the message is kept: neither start carries a picture. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: edebff97e1
ℹ️ 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".
Each change answers a Codex review finding on #626. - A task's profile is read from the lead's folder as it is now. Before, a worktree's copy as of its last commit was read, so a profile not yet committed was not found, and an edited one ran as committed. - A profile is a lead's when the role it resolves to builds on `lead`. The new `policy::lineage` follows the same layers a bot's role does, so a folder's superlead.md extending the shipped one is a lead's. `policy::profiles` no longer returns what each file extends. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b5415fc2e
ℹ️ 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".
Each change answers a Codex review finding on #626. - /new passes the profile picked even when it is what every task runs as, so its model and tools apply. Its words are still told once. - When a change of view clears the replies, the /react or /reply list closes with them. Before, the next draw indexed an empty list and Sonny crashed. The draw also skips a row it cannot find. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86466c0afc
ℹ️ 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".
This answers a Codex review finding on #626. While /react or /reply was open, a reply coming or going (the oldest leaves past nine) shifted every index. A row then matched one reply's words but showed and picked another. The list now holds the replies as they were when it opened. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 796249bddd
ℹ️ 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".
This answers a Codex review finding on #626, the same as /react's. The list now holds the denials as they were when it opened. An approved retry leaves the live list by its call id, not by its row. The other lists already hold their own rows: /switch, /new, and the /fast and /permissions choices. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48e12b9ef7
ℹ️ 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".
Each change answers a Codex review finding on #626. - While a new agent's first message is written, a leading / is offered no command, so Enter sends the words as typed. - A new lead's first message reaches its window through a file of the person's own (mode 600) beside the store. The window reads the file, removes it and sends the message. Before, the message was one exec argument, and Linux refuses an argument of 128 KB or more. The file is written before the lead is made, so a failed write makes nothing. - A list that ranks a taken row higher keeps that row picked. Before, /switch could open the agent ranked above the one picked. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2cd391e6de
ℹ️ 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".
…lead's role Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
|
The This PR doesn't change the daemon's parking or answered tools. Its only daemon-side change is the Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
While any sandboxed command runs, bubblewrap holds an empty placeholder /tmp/.git, so a test folder under /tmp could read as a git checkout and offer a worktree. The /new test now works in a checkout of its own, and the place choices are decided from whether the folder is in git. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 938b00cac1
ℹ️ 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".
This answers a Codex review finding on #626. Linux refuses one argument of 128 KiB or more, so a long pasted first message made no worker. Every task start now passes the brief to `agent run` on stdin (`-- -`), which joins its words the same way. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b1f201d1b
ℹ️ 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".
This answers a Codex review finding on #626. A profile noted for a lead that was since removed stayed beside the store under its name, so a new lead of that name made in the project's own role ran as the old one's. Making a lead in the project's role, or starting a task with no profile of its own, now forgets any such note. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG8kk4PkzKWAc5neW8
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGG5PKzf3A9NDuvu9Xu
This follows #604.
/leadis gone, and/switchno longer has a "new lead" row. One command,/new, now makes agents. Every list over the composer can also be narrowed by typing./new [NAME]/newasks three things in turn:•. Custom profiles such asreviewerandresearcherare included.client/src/policy.rsgainsprofiles(), which lists the client roles that the Profiles index still hides.threads_inis "project", only "this folder" is offered.Esc goes back a step, and nothing is made before the message is sent.
A lead stays in this folder, in the profile picked. Its profile is noted the way a task's is, and
project::rolereads it. Any other agent becomes this lead's task. Either way, the window becomes the new agent. A lead's first message is sent by its own window, through the unlisted--sendflag on the exec.Making the task the lead's:
agent run --new --created-by BOTA task started from a Sonny window has to be the lead's, but its first message is the person's words. Before this change, only an agent's shell could say who made a bot, through AGENT_BOT and AGENT_BOT_ID, and that also makes the prompt the agent's. AGENT_TURN is required to say which agent turn wrote it.
--created-byalready exists as a filter onls. Onrun --new, it now names the maker. The CLI inspects that bot for its id and sendscreated_byandcreated_by_idin create, with no author on the prompt. The daemon is unchanged, since it already accepts a creator from plain clients.These cases are refused:
--created-bywithout--new, or with--fork.Sonny's task start drops AGENT_BOT, AGENT_BOT_ID and AGENT_TURN when it passes the flag. The flag is documented in
docs/CLI.md, and there is a CLI test.Every list narrows as you type
list::Pickeris one shared picker. It keeps a list's rows, what is typed and the pick, and it handles arrows, typing, paste, Enter and Esc in one place. It matches on name or on what a row is. Letters are marked only when the name matched.These lists all use it:
/switch,/new's two lists,/react,/approvals,/permissionsand its choices,/fast,/retryand/reply. An agent's question keeps its options as they are, because their order is its recommendation.Found while running it on a real daemon
/newsaid nothing. The error went to the status line, which shows the running turn instead whenever the lead is busy. The error now replaces the heading over the kept message, in red.Checks
cargo fmt --check,cargo clippy -D warningsandcargo test --workspacepass.tests.test_cliandtests.test_acppass./lead NAMEbecame/switch NAMEin test_acp./new→ reviewer → worktree → "Review the rounding fix in tally.py" madetally.review-the-rounding-fixwithcreated_by: tally.lead, in its own worktree, in the reviewer profile. The window became it./new→ lead → "Plan the 1.0 release notes" madetally.lead.plan-the-1-0. The window became it and sent the message.sonny/FEATURES.mdandsonny/README.mdare updated.The pane
/filter is not in this PR. It follows the sidebar PR, so the panes change once.