Lightweight coding agent that runs in your terminal
Rust
Reduce Guardian V2's default tool-call lag (#41158)
jif453a9bcc6970
diff --git a/codex-rs/ext/guardian-v2/src/async_scorer/config.rs b/codex-rs/ext/guardian-v2/src/async_scorer/config.rsindex 17d8f8c0b3..842cb4412e 100644--- a/codex-rs/ext/guardian-v2/src/async_scorer/config.rs+++ b/codex-rs/ext/guardian-v2/src/async_scorer/config.rs@@ -20,7 +20,7 @@ const MIN_MODEL_CONTEXT_ITEM_TOKENS: usize = 100;const MAX_MODEL_CONTEXT_ITEM_TOKENS: usize = 100_000;const DEFAULT_REVIEW_THRESHOLD: f64 = 0.5;const LEGACY_REVIEW_THRESHOLD: f64 = 0.8;-const DEFAULT_MAX_TOOL_CALL_LAG: usize = 3;+const DEFAULT_MAX_TOOL_CALL_LAG: usize = 2;pub(crate) const DEFAULT_CLASSIFIER_INSTRUCTIONS: &str = include_str!("classifier_instructions.md");pub(crate) const CLASSIFICATION_OUTPUT_INSTRUCTIONS: &str = "Your first output token is the entire classification: `high` for high risk or `low` for low risk. Output that token immediately and nothing else.";diff --git a/codex-rs/ext/guardian-v2/src/async_scorer/extension_tests.rs b/codex-rs/ext/guardian-v2/src/async_scorer/extension_tests.rsindex 8b4025e2ed..5c28c9082f 100644--- a/codex-rs/ext/guardian-v2/src/async_scorer/extension_tests.rs+++ b/codex-rs/ext/guardian-v2/src/async_scorer/extension_tests.rs@@ -1252,7 +1252,7 @@ max_classifier_instruction_tokens = 256}#[tokio::test(flavor = "multi_thread", worker_threads = 2)]-async fn contributor_uses_configured_prompt_effort_threshold_and_transcript() -> Result<()> {+async fn contributor_uses_configured_prompt_and_expires_scores_at_default_lag() -> Result<()> {skip_if_no_network!(Ok(()));let configuration = r#"@@ -1260,7 +1260,6 @@ async fn contributor_uses_configured_prompt_effort_threshold_and_transcript() ->enabled = trueclassifier_instructions = "Use the experimental security classification prompt."review_threshold = 0.60-max_tool_call_lag = 2reasoning_effort = "minimal"max_action_tokens = 128max_classifier_instruction_tokens = 100000