From 2e9f030681b694d2e60e809724bfd7f6caa50a5a Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 7 Jun 2026 22:41:21 +0300 Subject: fix: scope codex blocked prompts to live prompt region --- src/detect/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/detect/mod.rs') 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 @@ -1471,6 +1471,16 @@ mod tests { assert!(!detection.visible_blocker); } + #[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( -- cgit v1.2.3