Skip to content

Sonny: an agent's name in the conversation opens that agent - #435

Merged
lydakis merged 6 commits into
mainfrom
claude/project-thread-3mj9h1
Oct 30, 2026
Merged

lydakis merged 6 commits into
mainfrom
claude/project-thread-3mj9h1

Conversation

@lydakis

@lydakis lydakis commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Requested by George · project thread

What

When the conversation names another agent, the name is a click that opens that agent in the pane, as a roster click does. This works in lead replies, the "↳ Task updates · …" rows, "↳ From calc.neg ▸", the /status card's text and whatever the pane draws. It's useful when a task asks a question or has a finding: you go there in one click.

A reply naming tally.halves, clicked: the task opened in the pane

How: one mechanism in the one renderer

  • Detect, don't emit (GitHub @mention precedent). Screen::find_links already turns a word into a file link when the file exists. The same resolver now also turns a word into sonny:agent/BOT when a bot has that name. links::Names asks the daemon once per dotted word that may be a name (bots {"name": word, "limit": 1}) and caches the answer. A word that only looks like a name stays plain, like GitHub linking @name only when the account exists. When an answer arrives, Screen::relink makes the next draw find links again. Your own bot is never linked.
  • Look. Names are drawn in the agents' blue (visual system Sonny: one visual system across every terminal theme #405). Like every button they are never underlined and never written out as OSC 8 links.
  • Rows a click opens elsewhere. A row link no longer drops the agent names found in its text. They come first, so a click on the name opens the agent and a click on the rest of the row opens the message or cluster.
  • 's. A trailing possessive is no part of a name or a path (tally.readme's links tally.readme).
  • Keyboard path. This reuses Sonny: every fold has a key, and the clean view stays text #421's /status keys rather than adding a binding. /status opens with Watch.pick already on the agent named lowest on screen (Screen::last_agent), so /status then Enter opens the agent a reply just pointed to. The design-system thread agreed to this approach.

/status opened with tally.halves, the agent named last, already picked

Prompts

George asked that agents name agents more deliberately once names are clickable, without overdoing it. lead.md (after "Lead a reply with what needs the person…") and task.md now say to write an agent's whole name, such as shop.fix, when pointing the person to it, where it helps them act. This is a default that memory can override, per #410.

Not covered

  • The approver is a daemon companion, not a bot, so it has nothing to open. Its denials stay inline as before.
  • Text inside a program shown in the pane (a task's own Sonny) is that Sonny's to link. It does, and its pane opens there.

Checks

  • cargo test -p sonny --bin sonny: 536 passed. New tests: links::may_name, Names asks once and links once known, and a screen test (name opens the agent in blue on a row that opens elsewhere, 's and the sentence's dot excluded, no OSC 8).
  • cargo clippy -p sonny --all-targets clean, cargo fmt.
  • Live in the demo rig (scripted model, real daemon): the screenshots above.

Generated by Claude Code

lydakis pushed a commit that referenced this pull request Oct 30, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGD5ibBa7HcUjyc7FL9
@lydakis lydakis self-assigned this Oct 30, 2026
@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-30T05:22:39.831340Z fa34584 New commits
🔒 Security Review ✅ Completed 2026-10-30T05:24:01.106531Z fa34584 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: afce418d85

ℹ️ 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/links.rs Resolved
Comment thread sonny/README.md Resolved
Comment thread sonny/src/links.rs Resolved
lydakis pushed a commit that referenced this pull request Oct 30, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGD5ibBa7HcUjyc7FL9
@lydakis
lydakis force-pushed the claude/project-thread-3mj9h1 branch from 807d7eb to c2f34c7 Compare October 30, 2026 05:03

lydakis commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@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: 02cc2a8f85

ℹ️ 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/main.rs Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 02cc2a8f85

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

lydakis commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0bfbce87d3

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@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: 0bfbce87d3

ℹ️ 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/links.rs Resolved

lydakis commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

A reply that points to another agent ("tally.halves has a question for
you") left the person to find it in /status. Now any word that is a bot's
name, wherever the one renderer draws it (a reply, a row of task updates,
"↳ From calc.neg", the pane's text), opens that agent in the pane, as a
roster click does. As GitHub links an @name only when the account is
there, a dotted word is asked about once with the daemon's `bots` lookup
and links only when a bot has that name; it is drawn in the agents' blue
and, like every button, never underlined. On a row a click opens
elsewhere, the name opens the agent and the rest of the row what it did.

The keyboard path reuses /status's keys: it opens with the agent named
last on screen already picked, so /status then Enter opens it.

lead.md and task.md say to write an agent's whole name when pointing the
person to it, where that helps them act.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGD5ibBa7HcUjyc7FL9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGD5ibBa7HcUjyc7FL9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGD5ibBa7HcUjyc7FL9
…e's own 's is kept

A name drawn before its agent was made stayed plain: the answer that it
was no agent's name was kept for good. Such an answer, or an unanswered
lookup, now holds 30 seconds, and a task the lead starts is known at once.
A path ending in 's is tried whole before the 's is taken off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGD5ibBa7HcUjyc7FL9
…s keys

Each lookup waited in the main loop, so a slow daemon held the screen and
the keys for as long as every word took. The words go to one background
job a batch at a time, each waiting at most 2 seconds; the loop takes the
answers once the job is done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGD5ibBa7HcUjyc7FL9
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 2039a1a1e3

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

@lydakis
lydakis force-pushed the claude/project-thread-3mj9h1 branch from 2039a1a to fa34584 Compare October 30, 2026 05:21
@lydakis
lydakis merged commit 8a858ef into main Oct 30, 2026
4 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