Skip to content

memory-cleanup: a server it cannot read holds the night open - #411

Merged
lydakis merged 3 commits into
mainfrom
claude/project-thread-u2fp8q
Oct 30, 2026
Merged

lydakis merged 3 commits into
mainfrom
claude/project-thread-u2fp8q

Conversation

@lydakis

@lydakis lydakis commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Requested by George · project thread

Follow-up to #403, prompted by George's question about what happens when the laptop or a sign-in isn't available.

Most of those cases already catch up:

  • Laptop asleep or off. Calendar triggers fire once on wake.
  • Model turn fails (offline, expired login). .said only moves when a cleanup finishes, so the next run rereads what was missed.

The gap was a chat or mail server failing during the habit step. The cleanup carried on and finished, since_ms moved past those messages, and nobody ever read them.

What changes

The skill text only (memory-cleanup step 5, step 7, and docs/SONNY.md):

  • Holds the night open. When a server the cleanup meant to read fails, it saves or updates a reference fact named unreadable-SERVER with the error and the time it started failing. It then skips cleanup finish, so the next night starts from the same since_ms and reads what was missed. The open cleanup is the existing cut-short path (duplicate: true).
  • Bounded. After three days it finishes anyway, so a server that stays broken can't hold said past its 56 KiB window.
  • Clears the fact. The fact is removed the night the server reads again.
  • No double counts. Habits keep their dates, so a night read twice counts nothing twice.
  • Reported. The reply names each server it could not read.

Not in this PR

Telling the person directly. A fact saved at night reaches a lead only with its next task update, and a night agent has no channel to the person. That needs a design and is raised with George separately.

Checks

Docs and skill only. No code, protocol or schema change.


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6
@lydakis lydakis self-assigned this Oct 30, 2026
@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-30T02:49:59.596232Z abb827c New commits
🔒 Security Review ✅ Completed 2026-10-30T02:53:57.970569Z abb827c 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.

@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: 5d6e9e7e1c

ℹ️ 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-cleanup/SKILL.md Resolved
Comment thread sonny/skills/memory-cleanup/SKILL.md Resolved
@lydakis
lydakis merged commit b7d607f into main Oct 30, 2026
4 checks passed
lydakis pushed a commit that referenced this pull request Oct 30, 2026
…st in /background

A nightly run that failed while the laptop was offline or a login had
expired failed unseen: the trigger recorded "sent" and the turn it sent
then failed. Now the window asks the daemon how each trigger's last sent
turn ended (one `wait` with timeout 0, every ten seconds, for turns not
known yet), and counts as failed:

- a trigger whose fire failed, or whose sent turn failed (a turn the
  person interrupted or steered is not a failure);
- a server the nightly memory cleanup could not read, by its
  `unreadable-SERVER` fact (#411).

The footer says `✗ N failed` in red, left of `↻`; the margin glance has
a red `✗ N` beside `↻`; both open /background, which lists what failed
first with the error under it. The person's own agents' failures (no
project in the name, such as memory-cleanup) show in every window. The
triggers tool's rows say how the turn their last fire sent ended
(`last.turn_status`, `last.turn_error`), so an agent sees what the person
sees. No daemon or protocol change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6
lydakis added a commit that referenced this pull request Oct 30, 2026
…st in /background (#419)

* memory-cleanup: a server it cannot read holds the night open

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6

* FEATURES: #411

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6

* memory-cleanup: the first night finishes without an unreadable server

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6

* Sonny: what failed in the background is a red ✗ in the footer and first in /background

A nightly run that failed while the laptop was offline or a login had
expired failed unseen: the trigger recorded "sent" and the turn it sent
then failed. Now the window asks the daemon how each trigger's last sent
turn ended (one `wait` with timeout 0, every ten seconds, for turns not
known yet), and counts as failed:

- a trigger whose fire failed, or whose sent turn failed (a turn the
  person interrupted or steered is not a failure);
- a server the nightly memory cleanup could not read, by its
  `unreadable-SERVER` fact (#411).

The footer says `✗ N failed` in red, left of `↻`; the margin glance has
a red `✗ N` beside `↻`; both open /background, which lists what failed
first with the error under it. The person's own agents' failures (no
project in the name, such as memory-cleanup) show in every window. The
triggers tool's rows say how the turn their last fire sent ended
(`last.turn_status`, `last.turn_error`), so an agent sees what the person
sees. No daemon or protocol change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6

* Sonny: a trigger that ended on a failure still shows, and turns are read only for this store's triggers

A one-shot that did not deliver, or a trigger stopped by an error, keeps
its row when its job goes; /background now lists such rows, scoped by the
store id each row now records, so the failure stays until `d` removes it.
The triggers tool asks this daemon only about triggers made on its store:
a turn handle names a bot and a turn, which another store's daemon has
its own of.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6

* Sonny: /background's pick has a column of its own, apart from the row's mark

`›` sat against the row's mark (`›✗`, `›↻`), which read as a glitch. It
now takes two columns, as the composer's `› ` does, and every line after
a row's first starts under its name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6

* Sonny: an answer that did not reach --reply-to fails in /background, and a start trigger stays its adder's once it ends

A turn that went well but whose answer could not be passed on now counts
as failed, with the delivery error. A retired `--start` trigger's row
keeps the agent that added it (`by`), so its failure stays in that
project's windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6

---------

Co-authored-by: Claude <noreply@anthropic.com>
@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