Skip to content

Sonny: fixes from a week of use (backup, lookout news, triggers, memory read, version, message time) - #555

Merged
lydakis merged 10 commits into
mainfrom
claude/project-thread-19d030
Oct 31, 2026
Merged

lydakis merged 10 commits into
mainfrom
claude/project-thread-19d030

Conversation

@lydakis

@lydakis lydakis commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

What

Sonny fixes found in a week of everyday use of 0.7.0.

Backup (sonny setup backup)

  • Nothing the ignore files name gets copied, and a copy already in the repository goes.
    • The check uses the incoming rules: each folder's .gitignore is copied from the home before that level is asked.
    • It is asked one level at a time with git check-ignore --stdin -z, written beside the reads so git never stalls, and it never walks into ignored folders.
    • A link or file in the copy where the home now has a folder is removed first.
  • Sockets and pipes in the home are skipped. Before, one socket failed the whole sync.
  • A first copy that failed part way restores nothing over the home. Adopting restores only from the remote's own head (fetch + origin/HEAD), and does nothing when the remote has no head.
  • setup backup --help prints the usage instead of being taken as a repository URL. Any other flag is refused.
  • The setup step asks the agent to check that the host shows the new repository as private before the first push.

Lookout news

  • When the lookout didn't see a turn start, for example after a restart, it reads who asked for the turn (prompts) along with the turn's reply, so the turn is named as it would have been. If that read fails, the turn names no one, instead of guessing "the person".
  • A trigger's run that completed and replied nothing is no news, the way cron mails a job's output only when it printed some.
    • Runs that failed, were stopped, resolved their task or ended a goal are still told.
    • A reply that could not be read is never taken for an empty one.
    • The automation skill now tells monitors to reply nothing on a quiet run.

Triggers

  • A repeating trigger's fire that finds its agent working now waits behind the work, the way anacron runs a missed job once. Before, it was skipped.
  • Only one fire of each trigger waits at a time, so a frequent monitor never piles up. A further fire is skipped with the note, as before.

Memory

  • An unscoped read by name inside a project falls back to the person's own facts when the project has none of that name.

Version

  • When built from a git checkout, sonny --version and agent --version name the commit, e.g. sonny 0.7.0 (31a2902ab).
  • The Linux release step builds from the tag's checkout, so it now expects the commit in the version.
  • Formula builds come from tarballs with no git, so they stay sonny 0.7.0.

The time on each message

  • A model has no clock. After compaction, and over a long day, it made times up.
  • Chat harnesses stamp each message they pass a model, so the person's words (from Sonny or an ACP client) and the lookout's notes now end with a line like [Sent Sat 31 Oct 2026 16:12, UTC-04:00.].
  • The line comes after the words, so the cached prompt before it stays cached.
  • Every surface draws the words without the line, through crate::text.

sonny/FEATURES.md rows are updated.

Tests

  • cargo test -p sonny -p agent-client passes: 793 + 83 + 24 tests.
  • cargo clippy --all-targets and cargo fmt are clean.
  • python3 -m unittest discover -s release passes: 28 tests.
  • The runtime suites tests.test_trigger and tests.test_served pass, except for tests that need bubblewrap, which this machine lacks.

No daemon behaviour changes. The only change in src/ is the --version text.

🤖 Generated with Claude Code

…ersion)

- Backup: never copy what the repository's .gitignore names, or sockets
  and pipes; a first copy that failed part way restores nothing over the
  home (restore only from the remote's own head); `setup backup --help`
  prints the usage instead of cloning a URL named `--help`; setup checks
  the host shows the repository private before the first push.
- Lookout: a turn that started before the lookout watched names no one
  instead of "asked by the person"; a trigger's run that completed and
  replied nothing is no news, as cron mails only a job's output. The
  automation skill tells monitors to reply nothing on a quiet run.
- Memory: an unscoped `read` by name in a project falls back to the
  person's own facts.
- `--version` of sonny and agent names the commit when built from a git
  checkout; release tarballs stay plain.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGxFkGajbntA1atiYT
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-31T22:44:14.369405Z e4d1452 New commits
🔒 Security Review ✅ Completed 2026-10-31T20:00:28.908059Z 4ae9a9f 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: 4ae9a9f620

ℹ️ 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/home.rs Resolved
Comment thread sonny/src/home.rs Resolved
Comment thread sonny/src/home.rs Resolved
A model has no clock: the time a conversation started at falls out with
compaction, and over a long day it guessed times. As chat harnesses stamp
each message they pass a model, the person's words (from Sonny or an ACP
client) and the lookout's notes now end with a line such as
`[Sent Sat 31 Oct 2026 16:12, UTC-04:00.]`. The line comes after the
words, so the cached prompt before it stays cached, and every surface
draws the words without it.

Records of what Sonny did for the person (shell runs, reactions without
words, notes taken away) and trigger fires stay as they were.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGxFkGajbntA1atiYT
@lydakis lydakis changed the title Sonny: fixes from a week of use (backup, lookout news, memory read, version) Sonny: fixes from a week of use (backup, lookout news, memory read, version, message time) Oct 31, 2026

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

ℹ️ 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/home.rs Resolved
Comment thread sonny/src/lookout/updates.rs Resolved
Comment thread sonny/src/main.rs Resolved
- Backup: git's ignore check reads its paths while it answers, so they are
  written beside the reads; paths go NUL-terminated (`-z`), so names git
  would quote match; each folder's incoming `.gitignore` is copied before
  its level is asked, so a new rule holds from the sync that brings it;
  a link or file where the home now has a folder goes before git is
  asked about the folder.
- Lookout: who asked for a turn it did not see start is read with the
  turn's reply (`prompts`), so a turn the person asked for is still
  named as theirs after a restart; a reply that could not be read leaves
  the turn's end told as before, never taken for an empty reply.
- Release: the Linux package step expects the version with its commit.

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

@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: d0f199d0a4

ℹ️ 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/home.rs Resolved
Comment thread sonny/src/lookout/updates.rs Resolved
A repeating trigger's fire that found its agent working was skipped, with
a note: a daily report that fired while a turn held the agent was lost
until the next day. Now it waits behind the work, as anacron runs a
missed job once and systemd's `Persistent=` timers do: the fire queues,
unless a fire of the same trigger already waits there, so a frequent
monitor never piles up. That later fire is skipped with the note, as
before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGxFkGajbntA1atiYT
@lydakis lydakis changed the title Sonny: fixes from a week of use (backup, lookout news, memory read, version, message time) Sonny: fixes from a week of use (backup, lookout news, triggers, memory read, version, message time) Oct 31, 2026

@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: f31f094c28

ℹ️ 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/trigger.rs Resolved
Merges main (the ask fallback, model names in /usage, lookout topics and
digests) and stamps every lookout source note, the resent one too, in
`source()`.

Fixes three review findings:
- The backup removes a copied `.gitignore` that is a link (or anything
  but a plain file) before copying the home's rules, so they never land
  where the link points.
- A trigger's run that went well and replied nothing drops the trigger's
  own words that started it too, so the lead is not woken at all.
- The check for a fire already waiting reads the agent's turns page by
  page while they are still waiting work (queued, ready, attached), so
  the notes skipped fires leave never hide it.

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

@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: 7bc06899a6

ℹ️ 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/trigger.rs Resolved
Rows that never ran (a steer the running turn took in, a message
cancelled while it waited, an attached note) can be newer than a fire
still queued, so they no longer end the search; only a turn that started
does, since queued work starts in order.

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

@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: 7ef3bd874c

ℹ️ 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/home.rs Resolved
Git judges an ignore check by what the copy has at the path too, so a
rule for folders (`cache/`) left out the home's new file `cache` while
the old folder was still there. The folder goes first, as the copy would
replace it, the way a link or file that became a folder already did.

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

@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: 2e71c2f1ca

ℹ️ 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/lookout/updates.rs Resolved
The lookout read a fire's prompt and its turn's reply on their own, so
the prompt read could land after the empty reply was dropped and wake
the lead with "trigger wrote in it". As with a goal's next turn, a
fire's words are no longer news at all: its turn's end is, and a run
that went well and replied nothing is none.

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

@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: b66e72dea6

ℹ️ 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/lookout/updates.rs Resolved
A trigger's run that went well now waits on its own until its reply is
read, instead of joining the task's other ends at once. Two runs that
both ended before either reply came back used to merge into one end
that neither empty reply could clear, so the lead heard of two silent
runs. Held apart, a run with no words is dropped and one with words is
told with them. One whose reply could not be read, or whose read was
cut off, is told without it.

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

@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: 1774140c06

ℹ️ 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/home.rs Resolved
…ent line

A backup's ignore check now sends git each path byte for byte and reads
its answer the same way. A name that is not UTF-8 used to reach git
changed, so a rule naming it never matched and its contents were backed
up anyway.

The scripted test models read a message without the line saying when it
was sent, as a model reads past it, and the ACP test checks that the
lead's prompt carries that line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGxFkGajbntA1atiYT
@lydakis
lydakis merged commit 1d2f62b into main Oct 31, 2026
10 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