Skip to content

Sonny: name the project lead, survive a terminal waking, open a new lead in its own tab - #238

Merged
lydakis merged 6 commits into
mainfrom
claude/project-thread-51pp6w
Oct 28, 2026
Merged

lydakis merged 6 commits into
mainfrom
claude/project-thread-51pp6w

Conversation

@lydakis

@lydakis lydakis commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Tab and terminal fixes from a day of heavy use with several projects open.

Changes

  • The lead is named by its project. Every project's lead showed as lead · working, so messages were typed into the wrong project's tab. Windows and tabs now read shop lead · done · 2 working. The empty composer now reads Message shop lead (or Steer shop lead while a turn runs), not Ask anything, so a misplaced message is caught before it is sent.
  • Sonny survives a terminal that is slow after the Mac wakes. On a resize, the inline viewport asks the terminal for its cursor. A terminal waking from sleep can miss that answer, and the draw error ended Sonny. A failed draw is now tried again on the next tick, and Sonny gives up only after 30 failures in a row, about a minute. The key-reading thread also retries a failed read instead of stopping, so Sonny no longer goes deaf to keys.
  • A new lead opens in its own tab. project add, run from an agent's shell, now opens the new lead in a Herdr workspace or Rex session of its own, beside the caller's. The output says where (opened_in), or why not (not_opened).
  • The pane skills name Sonny by its upgrade-proof path. install_skill used current_exe(), a versioned Homebrew path that breaks after an upgrade. It now uses skills::sonny_path(), as the other scripts do.
  • Skills never close the person's tabs. The Herdr and Rex skills now say: never close a tab, pane, window or block the person typed in or asked to open, ask first, and close only what you opened.

Screenshots

The empty composer, before and after:

The composer before ("Ask anything") and after ("Message shop lead")

Testing

  • cargo test -p sonny --bin sonny: 213 passed. cargo clippy -p sonny --all-targets and cargo fmt --check are clean.
  • The screenshot is from Sonny on this branch, run against a real daemon and a scripted model inside tmux.
  • The wake-from-sleep path was not reproduced here: it needs a terminal that drops the cursor-position reply. The change only turns that one error from fatal into a retry.

…y after a tool call, keep the answer a steer came after

- An overload or rate limit that Anthropic sends after the stream began is
  the 529 or 429 it would have been before it, and is retried as one; it
  failed the turn with provider_error and no retry.
- Retries after an overload or a stall start at 2 s instead of 250 ms: a
  stall resent at once with the same context stalls again.
- An empty reply once the model has replied in the turn, as after a
  reaction with nothing to add, ends the turn; an empty reply to a prompt
  or an empty summary still fails as empty_completion.
- A turn handle's result carries before_steer, the last text the turn
  wrote before its last steer, when it then ended on a reply to the steer.
- read refuses an image or other binary file with file_not_text, naming
  its kind, instead of putting its bytes in context.
- A command whose output reader stops reading (| head) exits quietly
  instead of panicking.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGHW3CCrgg5qbk2KQVA
…s reply on resume

An overloaded_error inside the stream now closes the model's pool as an
HTTP 529 does, and its retry waits on the pool like a rate limit; only a
stalled stream keeps its own seconds-long backoff. A turn that parked on a
call the model made, or on its pool after one, still counts as having
replied when it resumes, so an empty reply then ends it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGHW3CCrgg5qbk2KQVA
@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-28T00:07:34.606061Z 371f9a9 PR opened
🔒 Security Review ✅ Completed 2026-10-28T00:11:48.734601Z 371f9a9 PR opened
ℹ️ 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.

@lydakis
lydakis merged commit 9a74c8e into main Oct 28, 2026
1 check passed
@lydakis lydakis mentioned this pull request Oct 28, 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