Auto-resume of interrupted sessions has no opt-out, and stale recovery markers make it fire on finished sessions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Ask
Add an opt-out for automatic resume of interrupted sessions. For example
[features] auto_resume_interrupted = false in ~/.jcode/config.toml, plus a
JCODE_AUTO_RESUME_INTERRUPTED env override.
Problem
When I resume a session, jcode often starts work at once, without a prompt from
me. It does this even for sessions that were already finished. There is no way
to turn this off.
The cause is the reload/crash recovery path, not auto-poke. My config has
auto_poke = false.
Evidence on my machine
A stale recovery record still sits in ~/.jcode/reload-recovery/:
{"reload_id":"reload_1786449647560_...","session_id":"session_ant_1786447268112_...",
"role":"interrupted_peer","status":"pending",
"directive":{"reconnect_notice":null,
"continuation_message":"Your session was interrupted by a server reload while a tool was running. The tool was aborted and results may be incomplete. Continue exactly where you left off and do not ask the user what to do next."},
"reason":"attached peer session running during reload",
"created_at":"2026-08-11T12:00:47.562472306+00:00"}
The record is from 2026-08-11 and the status is still pending. A second stale
marker sits in ~/.jcode/pending-soft-interrupts/ from 2026-08-13.
The continuation message tells the model to continue and to not ask the user.
So the resume starts a turn with no input from me.
Two problems, one report
- No opt-out.
/continueis the manual path. The automatic path has no
flag.explicit_was_interruptedandinferred_was_interrupteddecide, and
the user cannot say no. - Markers are not cleared. A crash leaves the record at
status: pending.
The session then looks interrupted forever. Resume fires again on each
resume, days later.
Suggested fix
- Add the config flag and the env override.
- Clear or expire recovery records. A record that is days old is not a live
interruption. - Optional: on resume of an interrupted session, show a one-line prompt and let
the user press a key, instead of starting the turn.
Version
jcode v0.78.0 (2f7e3bcc6), Linux x86_64.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the reload/crash recovery path, including records under ~/.jcode/reload-recovery/ and ~/.jcode/pending-soft-interrupts/, and inspect how explicit_was_interrupted and inferred_was_interrupted trigger resume. Done means the config flag and environment override can disable automatic resume, while stale recovery markers no longer retrigger it; add or update tests for both behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100