Watch
0
0
Fork
You've already forked hyperhive
0

Point agents at /agents/<name>/work and default subagents to it

The system prompt now names the work dir for worktrees, clones and build
trees, and keeps state/ for notes. A subagent started without a dir runs
in the agent's work dir instead of the daemon's own cwd.
This commit is contained in:
atlas 2026-10-15 21:18:05 +02:00 • committed by mara
commit 043c9445f6
7 changed files with 32 additions and 12 deletions

View file

@ -79,8 +79,9 @@ struct StartArgs {
trigger: String,
/// Working directory for the subagent's session — e.g. a git worktree
/// you've already prepared for it, so a parallel batch of subagents
/// never race on the same working tree. Must exist. Omit to inherit
/// this daemon's own working directory (today's default). The daemon
/// never race on the same working tree. Must exist. Omit to use your
/// work dir, `/agents/<you>/work` (it has no `CLAUDE.md` above it, so the
/// subagent does not load yours). The daemon
/// remembers whichever `dir` you give here against `name`, so a later
/// `continue`/`status` for the same name doesn't need to repeat it —
/// only pass it there again if you want to point at a *different*
@ -164,7 +165,7 @@ 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 name with no
/// anywhere other than your work dir. A name with no
/// session in the directory searched is refused, naming it.
#[serde(default)]
dir: Option<String>,