You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(orchestrator): make suggestions.md a mailbox, drop the byte cursor
The async human-feedback channel tracked delivery with a byte offset
(.goaloop/suggestions.cursor) into an append-only suggestions.md. That
assumed the file only ever grows: if the human edited or deleted earlier
notes, the offset drifted — a shorter rewrite could clamp the cursor to
end-of-file and silently swallow freshly added guidance.
Replace it with a mailbox model and no cursor at all. suggestions.md now
holds undelivered guidance; each fresh attempt atomically CLAIMS its
contents (os.rename aside), injects them into the brief, archives them to
.goaloop/suggestions.delivered.md (stamped per attempt), and clears the
file. The atomic rename is the whole trick: a note appended while a claim
is in flight lands either in that batch or in a fresh file the next attempt
picks up — never lost, never delivered twice, with nothing to drift when
the human edits or deletes earlier notes. The inflight file persists until
the archive write succeeds, so a crash mid-claim is recovered (at worst
delivered twice — harmless — never dropped) on the next call.
Bonus: each note now reaches exactly one attempt and history moves to the
archive, instead of stacking up in the live file (which, in a long run,
left the Runner guessing which of several blocks was current).
Docs (README, design.md, goal-run skill) updated to describe the mailbox.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CHb1FkoMGfDfwmeJR5hBG6
0 commit comments