Skip to content

Sonny: memory reinforces what the person confirms - #431

Merged
lydakis merged 2 commits into
mainfrom
claude/project-thread-bhz8kn
Oct 30, 2026
Merged

lydakis merged 2 commits into
mainfrom
claude/project-thread-bhz8kn

Conversation

@lydakis

@lydakis lydakis commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Requested by George · project thread

This is the second half of the memory-first audit (write-up, first half #410). It adds a feedback loop: the person's praise and pushback reach memory and carry weight with later agents. George chose to ship it in 0.7.0. The coach thread's eval of #403 runs at its own pinned commit, so this PR doesn't touch it.

What changes

  • Counts on facts. A fact can carry confirmed and pushed_back in its front matter, written only when not zero. The index line shows them, for example - split-reviews (feedback, verified 2026-10-30, confirmed 3, pushed back 1): ..., so a later agent sees a preference's weight without opening it. This follows ExpeL's insight counts and ACE's helpful/harmful counters.
    • The memory tool's save takes confirmed / pushed_back; the script takes --confirmed N / --pushed-back N.
    • A save that leaves a count out keeps the count the fact had, so an agent rewording a fact doesn't reset its weight.
    • A count that isn't a whole number makes the file not a fact (memory_invalid), the same as a bad external.
  • The nightly said sees feedback. Until now it dropped reactions entirely. It now includes:
    • The person's reactions, each with reacted_to: the first line of the reply it answers. A reaction to the bot's last reply reached the bot as a bare emoji, so said pairs it with the reply before it in history. Feedback stays tied to what it was about, as ChatGPT Pulse keeps feedback with its card.
    • Answers to an ask, with recommended: the label of the option the ask recommended, taken from the ask call.
  • The cleanup's habit step also saves what worked. It saves approaches welcomed in words, with a reaction, or picked when recommended, more than once, and raises confirmed by the times seen. Pushback, or a pick against the recommendation, raises pushed_back. It removes a fact pushed back on more than it was confirmed, as ExpeL drops an insight at zero. Picking against the recommendation on one kind of question again and again is saved as a preference.
  • Guardrail, repeated in both skills: reinforce approaches, never agreement. OpenAI's 2025 sycophancy rollback traced back to thumbs-up data and memory.
  • The memory skill, memory-cleanup skill, docs/SONNY.md and FEATURES.md are updated.

Checks

  • memory::tests::a_facts_counts_show_in_the_index_and_outlast_a_save_without_them covers file and index rendering, keeping counts across a save without them, setting zero, script flags (once each, whole numbers, save only) and an invalid count.
  • the_cleanup_reads_the_persons_reactions_and_picks_with_what_each_answers covers:
    • an ask answer with its recommendation
    • a reaction quoting an older reply
    • a bare reaction paired with the reply before it
    • another agent's message skipped
    • plain words unchanged
  • cargo test --workspace, cargo fmt --check and cargo clippy --workspace --all-targets -D warnings pass locally.
  • No daemon, protocol or schema change. The fact format gains two optional fields, and older facts parse as before.

Not evaluated yet

The coach thread's two-day eval measures #403 alone. This loop needs its own run: on day 1 the scripted person praises one approach and pushes back on another, and on day 2 a fresh lead should repeat the first and avoid the second, without its feedback turning softer.


Generated by Claude Code

@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:29:29.533761Z db5ac85 New commits
🔒 Security Review ✅ Completed 2026-10-30T05:30:31.266233Z db5ac85 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.

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_013jkdGGVwTdQTtcHeKUqRa6
@lydakis lydakis self-assigned this Oct 30, 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: d16ee49c69

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

ℹ️ 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/said.rs Resolved
Comment thread sonny/src/said.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: 0117027dc0

ℹ️ 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/said.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: 805d1eb4c5

ℹ️ 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/said.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: 133ca5db0c

ℹ️ 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/said.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: 06942bcc1b

ℹ️ 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/said.rs Resolved
Comment thread sonny/skills/memory-cleanup/SKILL.md Resolved
Facts carry confirmed and pushed_back counts, shown in the index. The
nightly said gives the person's reactions with the reply each answers,
counted only while still on, and ask answers with what the ask
recommended. The cleanup saves what worked, never agreement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGGVwTdQTtcHeKUqRa6
@lydakis
lydakis force-pushed the claude/project-thread-bhz8kn branch from ceec538 to 70284fe Compare October 30, 2026 05:25

@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: 70284fe872

ℹ️ 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/skills/memory/SKILL.md Resolved
@lydakis
lydakis merged commit 382cec4 into main Oct 30, 2026
4 checks passed
@lydakis lydakis mentioned this pull request Oct 30, 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