Skip to content

feat: Compress skill paths with root aliases#19098

Merged
xl-openai merged 3 commits intomainfrom
xl/plugins2
Apr 24, 2026
Merged

feat: Compress skill paths with root aliases#19098
xl-openai merged 3 commits intomainfrom
xl/plugins2

Conversation

@xl-openai
Copy link
Copy Markdown
Collaborator

@xl-openai xl-openai commented Apr 23, 2026

Add skill root tracking so model-visible skill lists can use short path aliases when absolute paths would exceed the metadata budget.

@xl-openai xl-openai force-pushed the xl/plugins2 branch 2 times, most recently from 3a6df41 to c2ad035 Compare April 24, 2026 04:14
@xl-openai xl-openai marked this pull request as ready for review April 24, 2026 04:15
@xl-openai xl-openai requested a review from a team as a code owner April 24, 2026 04:15
@xl-openai xl-openai requested a review from sayan-oai April 24, 2026 04:16
Comment thread codex-rs/core-skills/src/render.rs Outdated
Comment on lines +764 to +776
fn alias_instruction_overhead_cost(budget: SkillMetadataBudget) -> usize {
let absolute_lines = [
SKILLS_INTRO_WITH_ABSOLUTE_PATHS.to_string(),
SKILLS_HOW_TO_USE_WITH_ABSOLUTE_PATHS.to_string(),
];
let aliased_lines = vec![
SKILLS_INTRO_WITH_ALIASES.to_string(),
"### Skill roots".to_string(),
SKILLS_HOW_TO_USE_WITH_ALIASES.to_string(),
];

lines_cost(budget, &aliased_lines).saturating_sub(lines_cost(budget, &absolute_lines))
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we easily reuse the actual model-visible text constructed in AvailableSkillsInstructions::body() rather than constructing roughly the same text here?

Comment on lines 2630 to +2631
let available_skills = build_available_skills(
&implicit_skills,
&turn_context.turn_skills.outcome,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're changing model-visible context, can we have an integration test that asserts it takes the expected shape?

Copy link
Copy Markdown
Collaborator

@sayan-oai sayan-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests needed and one other comment but lgtm

@xl-openai xl-openai merged commit 1e560f3 into main Apr 24, 2026
25 checks passed
@xl-openai xl-openai deleted the xl/plugins2 branch April 24, 2026 22:49
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants