Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/detect/manifest/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,38 @@ fn codex_osc_title_plain_is_idle() {
assert!(result.visible_idle);
}

#[test]
fn codex_model_capacity_error_is_blocked() {
let screen = "⚠ Selected model is at capacity. Please try a different model.\n\n\
› Summarize recent commits\n\n\
gpt-5.6-sol high · /work · Ready\n";
let result = osc_explain(Agent::Codex, screen, "project", "");

assert_eq!(result.state, AgentState::Blocked);
assert_eq!(
result.matched_rule.as_ref().map(|r| r.id.as_str()),
Some("model_capacity_blocked")
);
assert!(result.visible_blocker);
}

#[test]
fn codex_stale_model_capacity_error_remains_idle() {
let screen = "⚠ Selected model is at capacity. Please try a different model.\n\n\
• Explored\n\
└ Read Cargo.toml\n\n\
› Summarize recent commits\n\n\
gpt-5.6-sol high · /work · Ready\n";
let result = osc_explain(Agent::Codex, screen, "project", "");

assert_eq!(result.state, AgentState::Idle);
assert_eq!(
result.matched_rule.as_ref().map(|r| r.id.as_str()),
Some("osc_title_idle")
);
assert!(result.visible_idle);
}

#[test]
fn codex_background_terminal_screen_does_not_override_osc_idle() {
// Background terminal tasks can be long-lived helpers such as dev servers.
Expand Down
12 changes: 10 additions & 2 deletions src/detect/manifests/codex.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id = "codex"
version = "2026.07.18.1"
version = "2026.08.05.1"
min_engine_version = 2
updated_at = "2026-07-18T00:00:00Z"
updated_at = "2026-08-05T00:00:00Z"

[[rules]]
id = "osc_title_blocked"
Expand All @@ -11,6 +11,14 @@ region = "osc_title"
visible_blocker = true
contains = ["Action Required"]

[[rules]]
id = "model_capacity_blocked"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
state = "blocked"
priority = 1090
region = "bottom_non_empty_lines(3)"
visible_blocker = true
contains = ["Selected model is at capacity. Please try a different model."]

[[rules]]
id = "osc_title_working"
state = "working"
Expand Down
12 changes: 10 additions & 2 deletions website/agent-detection/codex.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id = "codex"
version = "2026.07.18.1"
version = "2026.08.05.1"
min_engine_version = 2
updated_at = "2026-07-18T00:00:00Z"
updated_at = "2026-08-05T00:00:00Z"

[[rules]]
id = "osc_title_blocked"
Expand All @@ -11,6 +11,14 @@ region = "osc_title"
visible_blocker = true
contains = ["Action Required"]

[[rules]]
id = "model_capacity_blocked"
state = "blocked"
priority = 1090
region = "bottom_non_empty_lines(3)"
visible_blocker = true
contains = ["Selected model is at capacity. Please try a different model."]

[[rules]]
id = "osc_title_working"
state = "working"
Expand Down
Loading