Keep long-running monitors polling after prose turns

This commit is contained in:
2026-08-06 23:50:51 -05:00
parent 17898e7d9b
commit 603437a24e
9 changed files with 143 additions and 18 deletions
+5 -2
View File
@@ -185,7 +185,9 @@ fn lrc_snapshot_follow_up_uses_the_cli_monitor_prompt_and_tools() {
let prompt = prepared.request.system_prompt.expect("system prompt");
assert!(prompt.contains("## Running Command Monitor"));
assert!(prompt.contains("poll with `read_shell_command_output`"));
assert!(prompt.contains("`read_shell_command_output` with a short delay"));
assert!(prompt.contains("next assistant output MUST be a tool call"));
assert!(prompt.contains("Do not end a still-running monitor turn with prose"));
assert!(prepared
.request
.tools
@@ -203,13 +205,14 @@ fn lrc_snapshot_follow_up_uses_the_cli_monitor_prompt_and_tools() {
.any(|message| match &message.content {
MessageContent::ToolResult { content, .. } => {
content.contains("Command ID: precmd-lrc-test")
&& content.contains("Continue monitoring with `read_shell_command_output`")
&& content.contains("The next assistant output MUST be a tool call")
}
MessageContent::MultiPart(parts) => parts.iter().any(|part| {
matches!(
part,
ContentPart::ToolResult { content, .. }
if content.contains("Command ID: precmd-lrc-test")
&& content.contains("The next assistant output MUST be a tool call")
)
}),
_ => false,