revert: remove compaction destination reminder (PR #2327)#2412
Merged
Conversation
The compacted event handler injected a system-tagged reminder into the live query after SDK auto-compaction, which caused the agent to send an unintended message. Reverts the four changes from #2327: - Remove `compacted` variant from ProviderEvent union - Restore `result` yield for compact_boundary in ClaudeProvider - Remove compacted event handler and getAllDestinations import in poll-loop - Remove compaction integration tests and CompactingProvider helper Closes #2325 differently — the reminder approach is not viable. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
romanbsd
added a commit
to romanbsd/nanoclaw
that referenced
this pull request
May 13, 2026
Today (2026-05-13 10:30 IDT) a recurring daily-digest task fired on time but produced no output. Unlike the 2026-05-11 incident (which was the SDK auto-compacting the task prompt away — see PR nanocoai#2411 on upstream/main), today no compaction happened. The agent saw the <task> block, mis-read its row-insertion timestamp as the scheduled fire time, conflated it with yesterday's manual-recovery delivery, and explicitly logged "Sending again would be a duplicate. Skipped" before ending the turn. markCompleted ran, next recurrence scheduled for tomorrow, container sat idle until the absolute-ceiling kill. Three coordinated changes: 1. formatter: expose `scheduled_for` on <task> blocks, populated from `process_after`. The existing `time` attribute reflects the row's insertion timestamp (often the previous fire), which today's agent read as the scheduled fire time. Keeping `time` for back-compat and adding `scheduled_for` removes the ambiguity. 2. scheduling.instructions.md: add a "When a scheduled task fires" section telling the agent each fire is independent, the scheduler guarantees no duplicates, and prior conversation history about late-delivered earlier fires is never about the current one. 3. compact-instructions.ts: extend the PreCompact custom-instructions so the compaction summarizer preserves the <task> body verbatim when the latest input is a task. This is the architectural analog of upstream PR nanocoai#2411 — that branch's push-after-compact mechanism was removed in PR nanocoai#2412, replaced with this PreCompact-driven approach. Tests: new `formatTaskMessage` describe block with two cases — distinct timestamp vs scheduled_for, and null process_after fallback. 91/91 agent-runner tests pass. Container source is bind-mounted (-v container/agent-runner/src:/app/src:ro) so no image rebuild is needed — next container spawn picks up the change. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
4 tasks
zenmindhacker
pushed a commit
to zenmindhacker/nanoclaw
that referenced
this pull request
May 26, 2026
…ination-reminder revert: remove compaction destination reminder (PR nanocoai#2327)
tamasPetki
pushed a commit
to tamasPetki/nanoclaw
that referenced
this pull request
Jun 4, 2026
…ination-reminder revert: remove compaction destination reminder (PR nanocoai#2327)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[system]-tagged reminder into the live query after SDK auto-compaction, which caused the agent to send an unintended messagecompactedvariant fromProviderEvent, restoresresultyield forcompact_boundaryin ClaudeProvider, removes the compacted handler inpoll-loop.ts, and removes the associated tests +CompactingProviderhelperTest plan
bun test— all 89 container tests passtsc --noEmit— typecheck clean🤖 Generated with Claude Code