aboutsummaryrefslogtreecommitdiff
path: root/src/detect
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-10 22:41:18 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-10 22:41:18 +0300
commit1fc5e84d461ff7c3cfcc0ed134df0939665fc937 (patch)
treeef40526369306c72e14286359ecd6158c5a5ad50 /src/detect
parentf9b67570d2e6bbfbda822ead19aed7c65b09ab08 (diff)
fix: stop marking codex background terminals as working
Diffstat (limited to 'src/detect')
-rw-r--r--src/detect/manifest/tests.rs13
-rw-r--r--src/detect/manifests/codex.toml15
2 files changed, 7 insertions, 21 deletions
diff --git a/src/detect/manifest/tests.rs b/src/detect/manifest/tests.rs
index 0f425384..fd2ef15b 100644
--- a/src/detect/manifest/tests.rs
+++ b/src/detect/manifest/tests.rs
@@ -648,18 +648,17 @@ fn codex_osc_title_plain_is_idle() {
}
#[test]
-fn codex_background_terminal_screen_beats_osc_idle() {
- // Codex doesn't set is_task_running() for background terminals, so title is
- // plain (idle). The screen rule background_terminal_working at priority 800
- // beats osc_title_idle at priority 100.
+fn codex_background_terminal_screen_does_not_override_osc_idle() {
+ // Background terminal tasks can be long-lived helpers such as dev servers.
+ // They should not make Codex look busy once the foreground turn is idle.
let screen = "background terminal running · /ps to view · /stop to close\n";
let result = osc_explain(Agent::Codex, screen, "llm-proxy", "");
- assert_eq!(result.state, AgentState::Working);
+ assert_eq!(result.state, AgentState::Idle);
assert_eq!(
result.matched_rule.as_ref().map(|r| r.id.as_str()),
- Some("background_terminal_working")
+ Some("osc_title_idle")
);
- assert!(result.visible_working);
+ assert!(result.visible_idle);
}
#[test]
diff --git a/src/detect/manifests/codex.toml b/src/detect/manifests/codex.toml
index 8cd42fa3..fe5eea7c 100644
--- a/src/detect/manifests/codex.toml
+++ b/src/detect/manifests/codex.toml
@@ -1,5 +1,5 @@
id = "codex"
-version = "2026.06.10.2"
+version = "2026.06.10.3"
min_engine_version = 2
updated_at = "2026-06-10T00:00:00Z"
@@ -45,19 +45,6 @@ any = [
]
[[rules]]
-id = "background_terminal_working"
-state = "working"
-priority = 800
-region = "bottom_non_empty_lines(6)"
-visible_working = true
-any = [
- { contains = ["background terminal running"] },
- { contains = ["Waiting for background terminal"] },
- { contains = ["/ps to view"] },
- { contains = ["/stop to close"] },
-]
-
-[[rules]]
id = "weak_blocker"
state = "blocked"
priority = 600