diff --git a/hive-subagent-mcp/src/session.rs b/hive-subagent-mcp/src/session.rs index a8d8dfae..545f9e7e 100644 --- a/hive-subagent-mcp/src/session.rs +++ b/hive-subagent-mcp/src/session.rs @@ -4113,8 +4113,10 @@ mod tests { /// An ACP agent in plain `sh`, after `hive-runtime`'s own test agent. It /// has one session, `s1`, appends every method it is sent to /// `.methods` and every `session/prompt` line to ``, and - /// answers each prompt with `end_turn` — or, in `hold` mode, only once - /// `session/cancel` arrives. + /// answers each prompt with `end_turn` and a token `usage` — or, in + /// `hold` mode, only once `session/cancel` arrives. The `usage` keeps a + /// plain reply from `hive_runtime::acp::AcpError::EmptyEndTurn`, the + /// same reason `hive-runtime`'s own test agent's replies carry one. const ACP_AGENT: &str = r#" prompt= while IFS= read -r line; do @@ -4133,7 +4135,7 @@ while IFS= read -r line; do if [ "$2" = hold ]; then prompt=$id else - printf '{"jsonrpc":"2.0","id":%s,"result":{"stopReason":"end_turn"}}\n' "$id" + printf '{"jsonrpc":"2.0","id":%s,"result":{"stopReason":"end_turn","usage":{"inputTokens":1,"outputTokens":1}}}\n' "$id" fi ;; session/cancel) if [ -n "$prompt" ]; then