From daef02a565f2a4fd8ccaa8da8cfc288e706d48cf Mon Sep 17 00:00:00 2001 From: starr-openai Date: Tue, 7 Apr 2026 10:57:54 -0700 Subject: [PATCH] Simplify /context skill instruction label Co-authored-by: Codex --- codex-rs/core/src/context_manager/context_breakdown.rs | 10 ++-------- codex-rs/tui/src/context_window.rs | 2 +- ...ests__renders_default_context_window_breakdown.snap | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/codex-rs/core/src/context_manager/context_breakdown.rs b/codex-rs/core/src/context_manager/context_breakdown.rs index 7ffdf9f041..6ffcfa8e96 100644 --- a/codex-rs/core/src/context_manager/context_breakdown.rs +++ b/codex-rs/core/src/context_manager/context_breakdown.rs @@ -331,13 +331,7 @@ fn classify_content_item( fn classify_developer_text(text: &str) -> (ContextSectionKind, String) { let trimmed = text.trim_start(); if starts_with_tag(trimmed, SKILLS_INSTRUCTIONS_OPEN_TAG) { - return ( - ContextSectionKind::User, - format!( - "Skill instructions ({} skills)", - count_catalog_entries(trimmed) - ), - ); + return (ContextSectionKind::User, "Skill instructions".to_string()); } if starts_with_tag(trimmed, APPS_INSTRUCTIONS_OPEN_TAG) { return ( @@ -672,7 +666,7 @@ mod tests { "AGENTS.md instructions for /repo".to_string(), "Base instructions".to_string(), "Environment context".to_string(), - "Skill instructions (1 skills)".to_string(), + "Skill instructions".to_string(), "Reasoning".to_string(), "Skill: notify (/tmp/skills/notify/SKILL.md)".to_string(), "User message".to_string(), diff --git a/codex-rs/tui/src/context_window.rs b/codex-rs/tui/src/context_window.rs index 18e6888b83..1628d078ef 100644 --- a/codex-rs/tui/src/context_window.rs +++ b/codex-rs/tui/src/context_window.rs @@ -403,7 +403,7 @@ mod tests { label: "User".to_string(), tokens: 12_000, details: vec![ThreadContextWindowDetail { - label: "Skill instructions (42 skills)".to_string(), + label: "Skill instructions".to_string(), tokens: 12_000, }], }, diff --git a/codex-rs/tui/src/snapshots/codex_tui__context_window__tests__renders_default_context_window_breakdown.snap b/codex-rs/tui/src/snapshots/codex_tui__context_window__tests__renders_default_context_window_breakdown.snap index 99fa7c8523..03819c6870 100644 --- a/codex-rs/tui/src/snapshots/codex_tui__context_window__tests__renders_default_context_window_breakdown.snap +++ b/codex-rs/tui/src/snapshots/codex_tui__context_window__tests__renders_default_context_window_breakdown.snap @@ -14,7 +14,7 @@ Context map ■ Conversation 40.0% ■ User ~12,000 tokens 60.0% of used - ██████████ Skill instructions (42 skills) (~12,000 tokens) + ██████████ Skill instructions (~12,000 tokens) ■ Conversation ~8,000 tokens 40.0% of used ██████░░░░ Tool output (~5,000 tokens)