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
{{ message }}
Repository navigation
capture: captureOnCompact is undocumented, and its cooldown state is per-setup #108
1. captureOnCompact is undocumented and defaults ON under autoCapture. README.md's Options table lists autoCapture / captureModel / captureMax only, and the feature bullet still says "with autoCapture on, session-idle events get one cheap model pass". After #103, an autoCapture user who compacts and then idles pays two model calls per 5-minute window, per session. Repo rule: every option and every token spend is documented, because the zero-token default is the promise.
2. Cooldown state is per-setup() while setup is not once-per-process. lastRun and lastCompactRun are closures inside setup, and the file's own bunFloorChecked comment records that setup runs for more than one location. Every setup registers its own compaction hook, so one compaction can reach two live seams whose cooldown maps are strangers: two model calls on one transcript. The gates collapse the duplicate rows, so it is a token bug, not a correctness bug — but it sits on a trigger that is on by default.
Fix for both triggers: a module-level Map keyed ${trigger}:${sid} — same shape as turns in src/lock.ts.
Related cleanup
bench/capture-trigger-results.md is committed but cited by nothing (grep -rn capture-trigger README.md is empty). Kept bench results are supposed to be published evidence cited from README, like RESULTS.md and recall-results.md — cite it or drop it.
Also open
captureSession binds the session with setCurrent and then awaits a model call before writing, while gateContext() and appendMemory's stamp resolve identity from the global current sid at write time. The idle path could already race this but only fired on a quiet session; a compaction fires mid-turn, so the window is open during live activity by construction. The honest fix is threading the sid into the write instead of mutating module state.
Surfaced during the adversarial review of #103 (2026-10-25); merging was a maintainer decision, so this records the findings instead of blocking on them.
Taking this - #103 was ours, so the cooldown seams are familiar ground. Plan: module-level cooldown Map keyed `${trigger}:${sid}` (the turns shape from src/lock.ts) so every live setup() shares one truth; README gets the captureOnCompact options row, corrected token-spend wording ("one" is now "up to two" per window), and a cite for bench/capture-trigger-results.md (publish rather than drop, per the RESULTS.md pattern). The sid-threading from your "Also open" section we would deliberately leave to its own design conversation - threading identity into the write path instead of mutating module state is a seam decision, not a bug fix, and #68 says those stay separate. PR shortly.
Activity
WhollyMindless commentedon Oct 25, 2026
Taking this - #103 was ours, so the cooldown seams are familiar ground. Plan: module-level cooldown
Mapkeyed`${trigger}:${sid}`(theturnsshape fromsrc/lock.ts) so every livesetup()shares one truth; README gets thecaptureOnCompactoptions row, corrected token-spend wording ("one" is now "up to two" per window), and a cite forbench/capture-trigger-results.md(publish rather than drop, per the RESULTS.md pattern). The sid-threading from your "Also open" section we would deliberately leave to its own design conversation - threading identity into the write path instead of mutating module state is a seam decision, not a bug fix, and #68 says those stay separate. PR shortly.test(abogartz#108): address review nits - reset seam in every cooldow…
fix(#108): auto-capture cooldown is module truth across setups; captu…
Merge pull request #113 from WhollyMindless/fix/capture-cooldown-share
chore(release): 0.14.3 [skip ci]
abogartz-opencode-self-improvement commentedon Oct 26, 2026
🎉 This issue has been resolved in version 0.14.3 🎉
The release is available on:
Your semantic-release bot 📦🚀
test(abogartz#117): the idle-broadcast cooldown test waits on evidenc…