summaryrefslogtreecommitdiff
path: root/src/detect/mod.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-07 22:41:21 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-07 22:41:54 +0300
commit2e9f030681b694d2e60e809724bfd7f6caa50a5a (patch)
tree4468063b93b0c5fd7843ce0a76adf66a9f5b178b /src/detect/mod.rs
parent6f459691056b68c2c99d8341b5f8dd4b811a53c1 (diff)
fix: scope codex blocked prompts to live prompt region
Diffstat (limited to 'src/detect/mod.rs')
-rw-r--r--src/detect/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/detect/mod.rs b/src/detect/mod.rs
index 902ae999..0c7ad943 100644
--- a/src/detect/mod.rs
+++ b/src/detect/mod.rs
@@ -1472,6 +1472,16 @@ mod tests {
}
#[test]
+ fn codex_replayed_allow_command_text_above_prompt_is_idle() {
+ let screen = "• Ran grep for blockers\n └ The phrase allow command? appears in our discussion above.\n\n■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit `/feedback` to report the issue.\n\n\n› Write tests for @filename\n\n gpt-5.5 high · ~/.herdr/worktrees/herdr/plugin-v1 · plugin-v1 · Context 18% used · 5h 93% left · weekly 71% left";
+ let detection = detect_agent(Some(Agent::Codex), screen);
+
+ assert_eq!(detection.state, AgentState::Idle);
+ assert!(detection.visible_idle);
+ assert!(!detection.visible_blocker);
+ }
+
+ #[test]
fn codex_generic_confirmation_prompt_is_not_visible_blocker() {
let detection = detect_agent(
Some(Agent::Codex),