subagent_spawn: only cleanup jit-* configs; fix Returns doc

This commit is contained in:
Levi Neely 2026-05-17 13:59:59 +02:00
parent 2703ea5d3f
commit 36eeb38a06
2 changed files with 3 additions and 2 deletions

View File

@ -24,7 +24,7 @@ pipe: stages=[
]
```
**Returns**: `subagent_generate` returns the agent config name. `subagent_spawn` returns the session path (e.g. `s/my-session`).
**Returns**: `subagent_generate` returns the agent config name. `subagent_spawn` returns structured KV: `session`, `path`, `backend`, `model`.
## subagent_generate

View File

@ -73,7 +73,8 @@ done
printf '%s\n' "$prompt" > "$B/prompt" || die "failed to submit prompt"
# Clean up JIT agent config now that the server has loaded it.
[ -n "$agent" ] && rm -f "$OLLIE/a/${agent}.json" 2>/dev/null || true
# Only remove configs with the jit- prefix (generated by subagent_generate).
[[ "${agent:-}" == jit-* ]] && rm -f "$OLLIE/a/${agent}.json" 2>/dev/null || true
# Report resolved values from the live session.
resolved_backend=$(grep -m1 '^backend=' "$B/cfg" 2>/dev/null | cut -d= -f2- || echo "${backend:-default}")