Skip to content

Sonny: questions say where they stand, words in focus answer, and agents close their own - #776

Merged
lydakis merged 10 commits into
mainfrom
claude/project-thread-aa1rre
Nov 7, 2026
Merged

lydakis merged 10 commits into
mainfrom
claude/project-thread-aa1rre

Conversation

@lydakis

@lydakis lydakis commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

What

Every ask card now shows one state, and that state is the same for every reader: the footer, /status, the roster, sonny ask open and the deadline.

State Glyph Last row
Open yellow ? what the agent does meanwhile
Set aside muted ? Set aside: you wrote past it. A pick still answers it.
Answered ✓ Answered · <pick or words>, or Answered in your words · going with X · note
Withdrawn muted – Withdrawn · <why>
  • Words in focus answer the question (E9, George 11-07). While a question is in focus, whatever you send answers it. A number picks an option, and typed words are sent once as You asked (ID): Q plus the words. Either way the answer is drawn as question and answer. This works the same for questions that ask you to run a command, and for a task's questions pinned in the lead's window.
    • Esc lets you write freely, and sets the question aside.
    • Clicking a card's question brings it back into the composer. This includes a task's question that was set aside in the task's own window.
    • Text starting with / or ! never answers a question.
  • close_ask served tool {id, outcome: answered|withdrawn, option?, note}, modelled on claude.ai's close_decision. An agent closes its own question when your words answered it, or when it no longer matters. There is no text matching.
    • It refuses when you have already answered, or when the question is already closed.
    • It removes the question's deadline trigger. Deadline names now include the turn, because call IDs can repeat across turns.
    • Every reader of the history counts it.
    • A later pick from you still overrides an agent's close, and your answer stands over a close read after it.
    • The judge's decisions still counts only your picks.
    • The ask result now returns id.
  • Settled cards fold to two rows (George picked this 11-07): the question plus the state row. A click on the question unfolds the card. Cards are redrawn in place through a new screen::Tag::Ask.
  • Bounded memory.
    • Cards the screen has trimmed are evicted, amortized: the check runs each time the card map doubles. Rows the screen holds aside while an older page draws are kept.
    • Reading where one question stands keeps only that question's answers and closes.
    • The lead watches each task question, until you answer it, by the task's head node: one inspect per task at most every 5 s. A question is read again only once its task writes something new.
  • Tool wording trimmed, guard kept at half (George picked this 11-07). The guard is Sonny's lead tools against half of DECLARED_BYTES. With close_ask added, the lead tools came to 33,505 B, against a limit of 32,768. Wording in ask, close_ask, margin, start_task, subscriptions and run_in_pane is shortened, and what each says is kept. The total is now 32,711 B, a cut of 794 B on every lead turn.

Covers FEEDBACK B29, B37 and E9. No daemon change.

sonny ask list comes in a follow-up PR. It lets agents see their tree's open and recent questions before asking.

Screenshots

Real app, scripted model. They show an answered question, one withdrawn with a reason, one set aside, and an open question being answered in words.

Dark Light No colour
dark light no colour

Tests

cargo test -p sonny: all 1115 unit tests pass, plus the integration tests. Clippy is clean.

New tests cover:

  • parsing a close;
  • a close settling the question for every reader, including:
    • the close being answered skipping its own call;
    • the single-question reader keeping nothing else;
  • card states and folding;
  • words in focus answering, Esc writing freely, and / and ! answering nothing;
  • a card's state following its question, and a click bringing it back;
  • your answer standing over a later close;
  • trimmed cards being evicted, while held-aside rows are kept;
  • a set-aside task question being reopened by a click;
  • a watched task question following its task's withdrawal, and not being read again until the task's head moves.

sonny/FEATURES.md (ask row) and sonny/README.md are updated.

🤖 Generated with Claude Code

…and an agent can close its own

A question's card now shows one of four states: open, set aside, answered
or withdrawn. A settled card folds to its question and its state, and a
click opens it whole. While a question is in focus in the composer,
words typed for it are its answer, sent once and drawn as question and
answer like a pick; after Esc they are the person's own. A click on a
card's question brings it back to the composer.

An agent closes a question of its own with close_ask, as answered in the
person's words or withdrawn, with a note the card shows. The tool host
refuses a question the person answered themselves, and lets go of the
ask's deadline. Every reader counts a close as an answer: the window,
needs, the deadline gate. The ask tool's result now gives the ask's ID.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDJX2fS3npzLRY9L4Q
@lydakis lydakis self-assigned this Nov 7, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T05:15:45.773421Z 1e24475 New commits
🔒 Security Review ✅ Completed 2026-11-07T03:57:52.577106Z 18870c5 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.

@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: 18870c5616

ℹ️ 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
Comment thread sonny/src/asks.rs Resolved
Comment thread sonny/src/main.rs Resolved
Comment thread sonny/src/main.rs Resolved
…e task questions reopen, cards the screen let go of are let go, deadlines named by turn

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

@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: 940d0eec3b

ℹ️ 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
Comment thread sonny/src/main.rs Resolved

@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: 446e0dd2cc

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

@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: 8d4834a40d

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

ℹ️ 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
Restore the declared-tool guard to DECLARED_BYTES/2 and shorten ask,
close_ask, margin, start_task, subscriptions and run_in_pane wording,
keeping what each says.

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

@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: 575ab7815e

ℹ️ 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
Comment thread sonny/src/main.rs Resolved
Comment thread sonny/src/asks.rs Resolved
…ir outcome

A close still running may yet fail, so every reader counts it only once
its result says it was taken. A card the screen lets go of keeps where
its question stood, cut to a line, since its answer may sit on a newer
page not read again; a set-aside question goes with its card and is set
aside again when its page is read again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDJX2fS3npzLRY9L4Q
@lydakis
lydakis merged commit 8a10ff3 into main Nov 7, 2026
5 checks passed
@lydakis
lydakis deleted the claude/project-thread-aa1rre branch November 7, 2026 07:01
lydakis pushed a commit that referenced this pull request Nov 7, 2026
Picks now read as asks::picks (an option's number), since #776 lets
words in focus answer too: words end quiet, a pick does not. Also
passes trigger::tool its Caller where #776 removes a question's
deadline, which main needs since #734.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGEcHQ2BxUW7eMzTs6K
lydakis pushed a commit that referenced this pull request Nov 7, 2026
Conflicts in lookout/updates.rs (the goal hold beside #777's wait reads:
the goal parts go, the wait reads stay) and asks.rs (#776's reading of
an ask, with said_by_person now in reactions).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGYoqceB21grsa5Q3v
lydakis pushed a commit that referenced this pull request Nov 7, 2026
…w takes one

#776 and #771 each built on their own; together the deadline cleanup in
asks.rs called trigger::tool with one argument. Same line as #785.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGYoqceB21grsa5Q3v
lydakis added a commit that referenced this pull request Nov 7, 2026
#776 called trigger::tool with one argument, but #734 had already
given it a second (&Caller). Each PR was green on its own; together
main does not compile. Pass Caller::default(), as the deadline add
in the same file does.


Claude-Session: https://claude.ai/code/session_013jkdGFG8yDNENZhjTzfLnt

Co-authored-by: Claude <[email protected]>
lydakis added a commit that referenced this pull request Nov 7, 2026
…ons where the call lands (#782)

* Remove goals: the goal tool, /goal, and the lookout's check runner

George never used goals, and their check runner made the lookout run
work (a command for up to an hour, then another turn for the agent)
rather than only watch and tell. Gone with them: the `checking` and
`checked` task states, the lookout's hold on a goal's turns, the sky's
goal pulse, and the tool process budget's quarter for checks, so the
tool host now has all of `sonny.tool_processes`. A one-time migration
removes STORE.lookout/goals (retires 0.11.0).

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

* Keep a lead's reaction in a task where its react call lands

A lead reacting in one of its tasks named the task, and the lookout
followed every bot's newest message to find which of the person's words
it landed on, then wrote the task's Picked file. That is work only the
window needs, done by the companion that exists for agents while no
window is open.

Sonny's tool host now answers `react`: one naming another agent of the
same project is kept under the person's newest message there as the call
is answered; one on the caller's own messages is answered at once. The
lookout drops its reaction tracking, and nothing watches the stream for
reactions.

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

* Answer react in the tool host itself, and drop retired Sonny tools on refresh

The tool host answered react by spawning a `sonny tool` process like any
other served call, behind the process budget. Now it answers it in its own
process, as it takes the call: a reaction on the caller's own messages is
"Done." with no process, one naming a task lands on what the person had
written when it was taken, and those that write the task's file take
turns, so two never overwrite each other.

A bot made before goals were removed kept `goal` declared through every
refresh, since only this build's tool names counted as Sonny's. A
declared tool Sonny answers (`answered_by: sonny`) now counts as Sonny's
too, so a refresh drops one this build no longer has.

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

* Pass the ask deadline's trigger removal a caller, as trigger::tool now takes one

#776 and #771 each built on their own; together the deadline cleanup in
asks.rs called trigger::tool with one argument. Same line as #785.

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

---------

Co-authored-by: Claude <[email protected]>
lydakis added a commit that referenced this pull request Nov 7, 2026
… each stands (#787)

* Questions: close_ask's deadline removal passes the caller trigger::tool now takes

#776 and #771 merged in turn: #771 gave trigger::tool a caller, and
#776's close_ask still called it without one, so main did not build.
Removal ignores the caller, as the deadline's creation does.

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

* sonny ask list: the questions a lead's agents asked lately and where each stands

The ask description points agents at it before asking; the sentence on
what to do meanwhile moves out, since every ask result already says it.

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

* sonny ask list: --all goes on as --all, a yes says what it covers, a node's questions stay together, a fork leaves its source's question to it

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

---------

Co-authored-by: Claude <[email protected]>
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