Repository navigation
feat(stow-guard): the token-line ask asks for a quick save, the daily ask keeps the full pass #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e8f913f
feat(stow-guard): the token-line ask asks for a quick save, the daily…
arjmad 0d24590
fix(stow): a quick save leaves existing memory entries alone and budg…
arjmad 06da7f5
fix(stow): a quick save leaves a superseding memory write to the full…
arjmad cb635ef
docs(stow): a quick save routes a non-answer superseding finding to i…
arjmad 37007e0
fix(stow-guard): the age ask waits while the context is over the toke…
arjmad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| 2026-11-22: Arjun answered "Yes" in the helm to the recommendation that the stow guard ask for a quick save at its token line and keep the full pass for its daily age ask. | ||
| The guard asks at `tokens=240000` against a compaction near 300K, and a full pass (budget report, all three memory files, date checks, curation, the cascade) used up that gap: compaction hit in the middle of the pass, the helm re-read its 69KB startup digest to finish, and the pass captured only a few lines because open work was already on durable records. | ||
| Decision: the context ask asks for `/stow quick`, which runs only the knowledge sweep and open-record persistence, adds a memory entry only when the budget report shows room, skips the startup-memory pass, the cascade and the restart question, and never says reset-safe. | ||
| The age ask (`hours=`, default 24) still asks for the full pass, and a quick save does not move its clock (`last_stow` in `state/.stow-guard.json`), so the full pass still comes due once a day after quick saves. | ||
| The guard tells them apart by the stow Skill call's args: a first word of `quick` is a quick save, anything else is the full pass. | ||
| The once-per-crossing state, the offer handling and `restart=1` are unchanged, and a guard ask still never offers a restart; the fresh restart still follows only a `/stow` the captain types and his "Start fresh now" pick, so this amends the "saves everything" wording of [the typed-stow restart record](2026-11-22-typed-stow-restarts-helm.md) and nothing else in it. | ||
| No upstream proposal yet: the stow guard is upstream's, but its token line and this fleet's long-running helm are what made the full pass too big for the gap. | ||
|
|
||
| | What | Files or functions | Upstream code touched | Status | Last checked sync | | ||
| | --- | --- | --- | --- | --- | | ||
| | The stow guard's context ask asks for `/stow quick`, its age ask for the full pass, and a quick save does not move the full pass's clock | `bin/fm-stow-guard.sh` (header, transcript read, block messages), `tests/fm-stow-guard.test.sh`, `docs/configuration.md` ("Stow guard") | `bin/fm-stow-guard.sh`, `tests/fm-stow-guard.test.sh`, `docs/configuration.md` | carried | 427056c4 | | ||
| | The stow skill gains a quick save mode selected by the `quick` argument | `.agents/skills/stow/SKILL.md` (description, "Quick save", startup-memory pass, sweep step 3, receipt, cascade) | `.agents/skills/stow/SKILL.md` | carried | 427056c4 | |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The age ask can still ask for a full pass while the session is above the token line. This PR set out to stop exactly that, and the case is wider than the 'both due at one stop' limit the PR accepts. Example: the context ask fires at hour 23 since the last full pass, and the quick save no longer moves last_stow. At hour 24 the age branch fires (the context branch is skipped because fired[sid] is already true) and asks for a full pass, even though tokens are still at or above the threshold. Fix: skip or defer the age ask while tokens >= threshold (or while fired[sid] is true), so it waits until the context has dropped below the line.
Failure scenario: tokens=240000, last full stow 23h ago. Stop A has 250K tokens, so the context ask asks for /stow quick, which runs and leaves last_stow unchanged. The helm keeps working for 61 more minutes at 260-290K. Stop B finds now-last_stow >= 24h and now-asked >= 3600, so it blocks with 'Run the /stow skill now (full pass, no argument)'. The full pass then starts about 10-50K tokens before compaction, and compaction hits mid-pass. That is the failure cited in the decision record.