Repository navigation
Conversation
- README: /auto-resume off|on is strictly session-scoped; the old --all global wildcard is ignored by v2; pause marker is deleted at startup, re-arming every session after a restart. - src/v2/index.ts: source-of-truth comment matches per-session behavior. - src/v2/index.session-pause.test.ts: bun:test suite covering per-session pause, wildcard/invalid-id rejection, off/on roundtrip, restart reset.
Owner
|
I am working on this stale file because I don't like the approach because with multiple opencode instances on the same machine there are problems. |
Owner
|
So it seems that I already fixed with the latest commit. |
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
/auto-resume offused to pause every session on this machine. The v2 code honoured a global*wildcard in the pause marker file (written byauto-resume-toggle --all), and the marker (~/.config/opencode/auto-resume.paused) kept the pause stuck until someone deleted the file. The README already documented pause as per-session and restart-cleared; the code did not do either. This PR makes the code match the doc./auto-resume off|onis now strictly the current session; other sessions are unaffected.auto-resume-toggle --allwrites*, which the v2 build ignores — per-session IDs only.Evidence
Before (upstream v1.2.7 with this branch's tests present, fix absent):
After (branch
fix/per-session-auto-resume-toggle, cherry-picked cleanly onto v1.2.735e5607):Tests isolate HOME (temp dir via top-level
await import("./index?session-pause=…")), so the real~/.config/opencode/auto-resume.pausedis never touched. The four tests: per-session pause + other session still recovers;*/invalid ids rejected;onre-enables only the target session; restart deletes the marker and re-arms.Merge Danger
Door: Two-way door — behavior change confined to v2 pause semantics; reverting restores the global wildcard.
Blast Radius: Minor. v1 behavior is untouched. v2 users who used
--allfor a machine-wide pause will get per-session pauses instead, and any pause they had set will be re-armed after a restart. Both move in the safe direction: a forgotten pause can no longer silently disable recovery.One code behavior change, one README section, one new test file. No migration, no schema, no new dependency.