Watch
0
0
Fork
You've already forked hyperhive
0

hive-subagent-mcp: refuse a continue whose session is not in the dir searched

resume_target no longer falls back to the bare name when the project dir
holds no session titled it: continue (and a goal run's next turn) refuses
before anything spawns, naming the directory searched. A store that cannot
be resolved refuses too, with the io error. The fallback notice is gone.
This commit is contained in:
atlas 2026-10-07 11:55:34 +02:00
commit 0e015197b6
3 changed files with 116 additions and 158 deletions

View file

@ -164,8 +164,8 @@ struct ContinueArgs {
/// is exactly when you're most likely to be reaching for `continue`. So
/// pass it when pointing the session at a *different* directory than
/// last time, and pass it again after a restart if the session lives
/// anywhere other than the daemon's own working directory. A resume that
/// finds nothing says which directory it searched.
/// anywhere other than the daemon's own working directory. A name with no
/// session in the directory searched is refused, naming it.
#[serde(default)]
dir: Option<String>,
}
@ -245,9 +245,10 @@ impl SubagentMcp {
of the daemon that spawned it). Returns once the turn is underway rather than the \
instant the process exists — a second or so, not the length of the turn — so a \
reply saying the turn started means it started; a name already running is refused. \
A name with no session to resume is not refused up front, because claude's own \
`--resume` decides that: a miss comes back as this call's own error, naming the \
directory that was searched, so check `dir` before concluding the session is gone. \
A name with no session in the directory searched is refused up front, before \
anything spawns, and the error names that directory — the session is only found \
under the `dir` it was started in (or the one this daemon remembers for the name, \
which a restart forgets), so pass `dir` before concluding the session is gone. \
Resuming a session whose last turn was killed is allowed — the reply says so, since \
that turn's work stopped wherever it had got to."
)]