subagent daemon: explain the status when returning it, not up front
The `status` tool description enumerated all five states it can report, so every caller paid for four answers it didn't get and read the explanation in the wrong place. The description now states only what the tool is for and that it costs nothing to call; each answer it returns carries its own meaning and the caller's next move instead — running, starting and idle were terse, the not-found error terser still, and they had been leaning on the enumeration to be legible. The killed answer and the end-of-turn todo are unchanged. `continue`'s description keeps its killed-resume sentence: that describes what the tool does, not a state it might hand back. Refs #4326
This commit is contained in:
parent
0bdee751b9
commit
ae84174e3a
2 changed files with 60 additions and 10 deletions
|
|
@ -164,12 +164,8 @@ impl SubagentMcp {
|
|||
|
||||
#[tool(
|
||||
description = "Report whether a subagent is currently running — a zero-cost check that \
|
||||
never launches a process, unlike `continue`. Distinguishes running, starting (a \
|
||||
`start`/`continue` is in flight but not yet a confirmed spawn — this is normally \
|
||||
over in well under a second), killed (its last turn died on a signal — the kernel's \
|
||||
OOM killer, a stopped unit, an `interrupt` — so its work was cut off mid-turn rather \
|
||||
than finished), idle (a session exists, its last turn finished, nothing is in flight \
|
||||
— `continue` to give it another turn), and no such session at all."
|
||||
never launches a process, unlike `continue`. The answer says what state it found \
|
||||
and what to do about it."
|
||||
)]
|
||||
fn status(&self, Parameters(args): Parameters<StatusArgs>) -> String {
|
||||
match session::status(&self.state, &args.name, args.dir.as_deref()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue