subagent_spawn: auto-cleanup JIT config; report resolved backend/model
- Remove JIT agent config from a/ after session creation (server has already loaded it), eliminating identity debris accumulation. - Read actual backend/model from session cfg instead of echoing CLI-level defaults. - Remove manual cleanup instruction from prompt (now automatic).
This commit is contained in:
parent
65f7bc3bd9
commit
2703ea5d3f
|
|
@ -86,7 +86,6 @@ Remaining args: the task prompt (immediate task only — coordination lives in t
|
|||
- Subagents do not share memory. Pass context explicitly in the seed prompt.
|
||||
- Peers are known at spawn time. Assign `-name` to each and include the full roster in each identity.
|
||||
- Names must be globally unique under `s/`. Duplicate names fail silently.
|
||||
- Clean up when done: `rm $OLLIE/a/<name>.json`
|
||||
|
||||
## Returning results to the parent
|
||||
|
||||
|
|
|
|||
|
|
@ -71,4 +71,11 @@ done
|
|||
[ -d "$B" ] || die "timeout waiting for session $name"
|
||||
|
||||
printf '%s\n' "$prompt" > "$B/prompt" || die "failed to submit prompt"
|
||||
printf 'session=%s\npath=%s\nbackend=%s\nmodel=%s\n' "$name" "$B" "${backend:-default}" "${model:-default}"
|
||||
|
||||
# Clean up JIT agent config now that the server has loaded it.
|
||||
[ -n "$agent" ] && 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}")
|
||||
resolved_model=$(grep -m1 '^model=' "$B/cfg" 2>/dev/null | cut -d= -f2- || echo "${model:-default}")
|
||||
printf 'session=%s\npath=%s\nbackend=%s\nmodel=%s\n' "$name" "$B" "$resolved_backend" "$resolved_model"
|
||||
|
|
|
|||
Loading…
Reference in New Issue