Allow skills to be marked required and fail closed when unavailable
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
What variant of Codex are you using?
Codex CLI 0.147.0
What feature would you like to see?
Summary
Add a per-skill required setting (or equivalent always-injected mode) in config.toml so a small user-selected set of skills is guaranteed to remain available and loaded, independent of initial skill-catalog truncation.
Current behavior
[[skills.config]] can select a skill by name or path and set enabled, but enabling only makes the skill eligible. Codex caps the initial model-visible skills list, and enabled skills can be omitted when the catalog exceeds that budget.
On Codex CLI 0.147.0, a user-level skill existed on disk and global AGENTS.md explicitly required it for every task, but the skill was absent from the injected Available skills catalog. The agent therefore reported the required skill as unavailable. A mandatory workflow declared in global instructions is consequently nondeterministic when the catalog is large.
Requested behavior
Support a configuration such as:
[[skills.config]]
name = "agents-brain"
enabled = true
required = true
Suggested semantics:
- Resolve and validate required skills before applying the general catalog budget.
- Always include their metadata and load their full
SKILL.mdinstructions into the model context. - Preserve or reload required skills after compaction.
- Fail visibly at session startup if a required skill is missing, invalid, disabled by policy, or cannot fit within a bounded required-skills budget.
- Support path selection for duplicate skill names.
The required set should be intentionally small. If a separate mode is clearer, equivalent semantics could be expressed as injection = "required" | "catalog" | "on_demand" | "off".
Expected result
Users can enforce cross-repository workflow, safety, or synchronization skills without copying their full contents into AGENTS.md, disabling unrelated skills, or relying on catalog ordering. A required skill is either loaded or produces an explicit startup error; it is never silently omitted.
Additional information
Environment: macOS, Codex CLI 0.147.0.
Related but distinct requests:
- #19090 tracks skills silently dropped from the model-visible catalog.
- #19679 requests a configurable overall metadata budget.
- #21425 requests separating installed skill availability from default injection.
- #33945 requests automatic skill routing and mentions always-visible pinned skills as one broader control.
This request is narrower: a declarative, fail-closed contract for a small required subset. Increasing the overall budget or improving routing would not provide that guarantee.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with config.toml skill selection and the session-startup path that builds the Available skills catalog, then trace how selected names or paths resolve to each SKILL.md. Done means required skills are validated before catalog limits, remain loaded after compaction, and produce a visible startup error when unavailable or over the bounded required-skills budget.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100