Repository navigation
Draw SVG, Mermaid, math and HTML pages as pictures in Sonny - #147
Merged
Merged
Conversation
Protocol 14. configure replaces what a bot's client chose when it made it: its instructions, a model of the same family with an optional effort, and a root bot's gate (approve: [] alone removes it; a bot another bot made keeps the gates it descends from). It is refused while a turn runs or waits parked, answers which fields changed, and tells followers with a live configured event. ready.providers now names the efforts each binding's family takes, and the client keeps it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
The app's project file helpers and its ~/.agent/env reader move to agent-client, so a terminal client composes a lead the app's way. Finding a folder's project now stops at its repository's top, and the home folder's project applies to home itself only, so a repo under home is never claimed by it. The coordinator lists only its own project's agents when it names or finds a task. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
Sonny opens a folder's lead in a Codex-style TUI, lays each task out as a Rex window, and offers /model, /approvals, /status, /sound, /copy, /open and /quit. Agents get a rex-windows skill, and an errand skill when Errand is installed; Errand runs are drawn as calls, and detached jobs open in their own Rex window. Pictures come in a follow-up. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
In a terminal that speaks the Kitty graphics protocol (Rex, Kitty, Ghostty), Sonny draws a reply's SVG, Mermaid (through Pele), math (through MathJax) and HTML pages as pictures, and agents get a pictures skill saying so. Elsewhere they stay text. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
A steer restarts the demo script within a turn, and a turn keys its calls by id, so each request now names its calls afresh. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…-thread-45hlbm-pictures
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
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. |
This was referenced Oct 26, 2026
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53647ead5d
ℹ️ 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".
Clearing the thinking binding makes the next request strip thinking written under the old instructions. The docs now say a client-made fork's gates can be replaced too, since that client could make an ungated bot anyway. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…ject-thread-45hlbm-client
…t-thread-45hlbm-sonny
…-thread-45hlbm-pictures
…nect - History and live results read Anthropic tool_use/tool_result blocks as calls and outputs, so Claude bots' calls show with their output. - A history read the daemon cut at its byte limit asks for the rest. - Calls still running when Sonny attaches finish live. - After a reconnect the fleet reads the project's bots again, opening tasks that started meanwhile and marking stopped ones idle. - An Errand listing that runs past three seconds is killed. - A new lead takes the project file's model and effort first. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
A tool_started event carries a 2 KiB preview of a call's arguments, so a truncated one is read from the bot's items. The bot is inspected after the replay is skipped, so a turn that ended meanwhile is not shown as running. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…-thread-45hlbm-pictures
- CSS variables are filled in inside tags only, so a Mermaid label that reads var(--x) stays as written. - Image ids keep a 16-bit count, so pictures still in scrollback keep theirs for the first 65,535. - A fence a reply never closed shows its lines as code when the reply ends, instead of vanishing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…figure A turn that ran before configure moved the bot keeps the model and effort it ran at, in its record and as the cache the next turn takes as held. A keyed creation keeps a fingerprint of the instructions it was sent with, so a resend still matches after they are replaced. Schema 49. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…t-thread-45hlbm-sonny
…ject-thread-45hlbm-client
…-thread-45hlbm-pictures
A failed edit, write or read shows its error instead of the change it asked for. A call denied before it started is read from the bot's items and shown as denied. Sonny opened anywhere in a project attaches to the lead working in the project's folder, makes it there when missing, and refuses a same-named lead working elsewhere. Reconnecting pages back to the last node drawn and matches results to calls kept from before. The next page of approvals shows once the first is answered. An unclosed $( and a backslash before a non-ASCII character no longer crash the renderer. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…-thread-45hlbm-pictures
…-45hlbm-configure
…ject-thread-45hlbm-client
…t-thread-45hlbm-sonny
…-thread-45hlbm-pictures
- Reconnecting reads the bot after the replay, so a turn that ends meanwhile is not lost, and starts the approver again in auto mode. - A turn whose prompt history already drew still counts as running. - Errand handles are read from the matching result, Anthropic too. - `sonny show` finds a dotted project by its lead. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…-thread-45hlbm-pictures
- A hunk range that doesn't start with - or + is read as line 1 rather than sliced mid-character. - While /status holds the screen, the newest 5,000 transcript lines wait for it and a note says how many earlier ones went by. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…-thread-45hlbm-pictures
- A call waiting on the person is written above the status row in full, every line of its command, before y can allow it. - Bots Sonny makes get the default compaction instructions, as the CLI's and the app's do, so long conversations can compact. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…-thread-45hlbm-pictures
…, unclosed fences A call listed with cut arguments is shown whole, read from the node that planned it; when that read fails, y is refused and n denies it. Errand runs are keyed by bot and call, since call ids repeat across bots. Transcript lines go into scrollback in chunks a u16 row count holds. A fence or $$ block still open when a reply ends shows as code instead of vanishing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…-thread-45hlbm-pictures # Conflicts: # sonny/src/main.rs # sonny/src/transcript.rs
…ject-thread-45hlbm-client
…t-thread-45hlbm-sonny
…-thread-45hlbm-pictures
lydakis
changed the base branch from
claude/project-thread-45hlbm-sonny
to
main
October 26, 2026 02:32
# Conflicts: # Cargo.lock # sonny/Cargo.toml # sonny/src/main.rs # sonny/src/math.rs # sonny/src/rex.rs # sonny/src/term.rs # sonny/src/transcript.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fourth of five stacked PRs. It is based on #146.
What
In a terminal that speaks the Kitty graphics protocol (Rex, Kitty, Ghostty), Sonny draws parts of a reply as pictures where the fence is. Pictures are placed with Unicode placeholders, so they scroll with the text.
```svg```mermaidnodeorbun. Colors are written in for the terminal's light or dark background.```math,$$…$$nodeorbun. Inline$…$stays Unicode text, as before.```html/openopens the whole page.picturesskill tells agents they can reply with SVG and Mermaid.Screenshot
This one is put together from Sonny's real output. Sonny ran in a pty that answered its probe the way a dark Kitty-graphics terminal does. Each PNG it transmitted was placed over its placeholder cells, on top of the replayed screen (demo model, xterm.js):
Tests
cargo test -p sonny: 42 pass.Stack
configure