codex icon indicating copy to clipboard operation
codex copied to clipboard

Project-level config should support disabling global/user skills while preserving repo skills

Open arksou opened this issue 6 months ago • 3 comments

What version of Codex CLI is running?

codex-cli 0.133.0

What subscription do you have?

ChatGPT Pro

Which model were you using?

gpt-5.5

What platform is your computer?

Darwin 25.4.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

iTerm2

Codex doctor report


What issue are you seeing?

Use case:

  • I have many global/user skills installed under ~/.agents/skills, such as Lark/Feishu-related skills.
  • In one specific repository, those global skills are not relevant and consume the skills context budget.
  • The repository also has its own project skills under .codex/skills and .agents/skills, and those should still be injected.

Current behavior in Codex 0.133.0:

  • Project .codex/config.toml is loaded.
  • Project-level [skills] include_instructions = false works, but it disables all skills, including repo/project skills.
  • Project-level [[skills.config]] does not filter global/user skills.
  • Session-level -c 'skills.config=[...]' can filter skills, so the selector itself is not the issue.
  • Source code appears to only apply skills.config from User and SessionFlags layers, not Project layers.

Expected behavior:

  • A trusted project should be able to filter user/global skills for that project only.
  • Repo/project skills should remain injected.
  • Global config should remain unchanged for other projects.

This would solve the common case where global skills are useful generally, but too noisy or irrelevant for specific repositories.

What steps can reproduce the bug?

  1. Install a user/global skill, for example:

    ~/.agents/skills/lark-doc/SKILL.md

  2. In a trusted repository, create a project-local Codex config:

    .codex/config.toml

    [[skills.config]]
    name = "lark-doc"
    enabled = false
    
    

I also tested path selectors, for example:

[[skills.config]] path = "/Users//.agents/skills/lark-doc/SKILL.md" enabled = false

  1. From that repository, run:

    codex debug prompt-input probe

  2. Check the generated <skills_instructions> block.

Expected: The lark-doc skill should be removed from the model-visible skills list for this project only.

Actual: The project-local .codex/config.toml is loaded, but lark-doc is still present in <skills_instructions>.

Control checks:

  • Project config loading works. For example, setting model = "project-config-probe" in .codex/config.toml is reflected by codex doctor --json.

  • Project-level [skills] include_instructions = false works, but it disables all skills, including repo/project skills.

  • Session-level override works:

    codex debug prompt-input
    -c 'skills.config=[{name="lark-doc", enabled=false}]'
    probe

    In that case, lark-doc is removed, so the selector itself is not the issue.

This makes it impossible to disable user/global skills for one repository while preserving repo/project skills.

What is the expected behavior?

No response

Additional information

No response

arksou avatar May 23 '26 15:05 arksou

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #23987

Powered by Codex Action

github-actions[bot] avatar May 23 '26 15:05 github-actions[bot]

I looked at the current config-rule path and this does look like a layer-selection issue rather than a selector issue.

In codex-rs/core-skills/src/config_rules.rs, skill_config_rules_from_stack() currently iterates the config layer stack but only accepts ConfigLayerSource::User and ConfigLayerSource::SessionFlags. That matches the reported behavior:

  • session-level -c 'skills.config=[...]' works;
  • user/global config can apply skill rules;
  • project .codex/config.toml is loaded for other settings;
  • but project-level [[skills.config]] is ignored for skill filtering.

A small MVP could be to allow trusted project layers to contribute skills.config rules, while preserving current precedence order. That would let a repository opt out of noisy user/global skills without using [skills] include_instructions = false, which is too broad because it disables repo/project skills as well.

Suggested acceptance criteria:

  • A trusted project config can disable a user/global skill by name.
  • A trusted project config can disable a user/global skill by canonical path.
  • Repo/project skills remain visible unless explicitly disabled.
  • Session flags still win over project config.
  • Untrusted project config does not silently gain new skill-filtering power.
  • Existing include_instructions = false behavior remains unchanged.

This also seems related to #24299 and #21425: users with large global/plugin skill sets need a project-scoped way to reduce prompt noise without changing their global setup.

SylvainWinning avatar May 24 '26 14:05 SylvainWinning

I am on Pro x20 subscription, and when you work with a bunch of projects and subprojects — the feature to selectively enable/disable Personal/Team skills is essential. Right now, it clatters the skills view with copies of the same skill just from another level.

Here is how it looks for me: Image

So, just filtering out by name is not enough. Perhaps, we should also be able to filter out by path or level (Global/Personal/Team/Project)

Fixing/imroving this will make my workflow more error-prone (especially in cases when top-level skill has different functionality under the same name).

@etraut-openai, fyi

Artein avatar Jul 19 '26 08:07 Artein

I ran into the same problem and ended up building CLROOM, an open-source launcher for this workflow.

For a Codex launch it keeps repo/project skills available, blocks global AGENTS.md and unselected global skills, and leaves your normal global setup untouched.

You can then bring back only the global skills you want for that run:

clroom codex --skill-set=my-skill,@my-skills

So: project skills stay, unrelated global skills stay out, and nothing has to be removed or rewritten globally.

CLROOM started as a tool for isolated skill testing, so a plain launch uses Clean Room defaults: apps, hooks and plugins are off, developer instructions and notifications are cleared, and shell environment inheritance is reduced.

For normal day-to-day work, I’d start with:

clroom codex --skill-set=@my-skills --enable apps --enable hooks --enable plugins

This keeps the skill filtering while bringing apps, hooks and plugins back for your Codex launch.

Or enable only the ones you need.

Current alpha: macOS / Apple Silicon

https://github.com/ewgenij87snwork/clean-room-launcher

I’m the author — I’d really like to know whether this covers the workflow described here, or what’s still missing.

ewgenij87snwork avatar Aug 26 '26 18:08 ewgenij87snwork

Confirmed on codex-cli 0.154.0, macOS arm64 in an existing Git worktree installation. Our project-only skill cleanup is blocked by the behavior described here.

I saw the maintainer clarification in https://github.com/openai/codex/issues/20210#issuecomment-4347552757 that global-only enable/disable is intentional. This is additional evidence for project-scoped filtering and for making ignored settings clearer in diagnostics, rather than a claim that the behavior is a newly introduced regression.

Observed result

In one native app-server process, started in the worktree without configuration overrides:

  • config/read with the worktree cwd and includeLayers=true returned the project layer with disabledReason: null, skills.max_context_tokens: 10000, and all 26 candidate skill entries in the effective configuration.
  • Those entries preserved four existing user-level exclusions, explicitly enabled a compact project wrapper, disabled 19 installed upstream skill paths, and disabled two additional names.
  • skills/list with the same working directory and forceReload: true still returned all 19 excluded upstream paths with enabled: true, with no errors.
  • Both the compact wrapper and the upstream skill named hyperframes remained enabled.
  • codex debug prompt-input from the same worktree also included both entries and the other excluded upstream video skills.
  • The existing user-level exclusion of impeccable remained effective.

A representative project entry used the installed file's absolute path, with the username redacted here:

[[skills.config]]
path = "/Users/<user>/.agents/skills/hyperframes/SKILL.md"
enabled = false

The compact wrapper has a distinct canonical path and a 266-character description. Because the project exclusions were ignored, the managed description total increased by 266 characters instead of falling. Plugin identities matched in that comparison, so plugin disappearance was not counted as a reduction.

Why it matters

The goal is to keep a small video entrypoint visible in selected repositories while retaining full, unchanged upstream workflow files for task-time reads. Other repositories should keep their existing global skills. Global disablement and disabling the entire skill instruction block do not meet that goal.

Even if project filtering remains unsupported, it would help for config/read or startup diagnostics to explain that project skills.config entries do not affect skill-rule resolution. Currently the project layer appears active and the merged settings look effective while discovery and rendered input retain the excluded skills.

This was a local reproduction with an existing installation, not a clean-room reproduction. No persistent trust, auth, sandbox, model, or global skill settings were changed, and no raw configuration or model prompts are attached.

waiiohenry avatar Sep 12 '26 00:09 waiiohenry

I’d like to revisit the reasoning provided by @xl-openai in #20210, where limiting skill enable/disable to the global level was described as providing “a more consistent overall UX in the Codex app.”

I think this argument has become difficult to justify given the existing plugin functionality.

Codex already supports project-level disabling of locally installed plugins through .codex/config.toml. Since a plugin can contain just a single skill, users can effectively achieve exactly the requested behavior by wrapping that skill in a plugin and disabling the plugin for a specific project.

Yet the equivalent configuration for a regular, globally installed skill is simply ignored at the project level.

This creates a rather strange inconsistency: The same skill can be disabled per project when packaged as a plugin, but not when installed as a regular skill. The distinction feels arbitrary from a user’s perspective.

I would respectfully argue that this is actually worse UX, not a more consistent one. It forces users to introduce unnecessary packaging and configuration complexity just to achieve something that Codex already supports at a coarser level.

For users maintaining global skills alongside tailored versions for larger projects, this is a very natural requirement, not an edge case.

At this point, I would consider the current behavior at least a UX inconsistency, and arguably something that feels more like a bug than an intentional design choice.

Supporting project-level [[skills.config]] overrides would bring skills in line with the existing plugin behavior and make Codex’s configuration model more consistent and predictable

I’d really appreciate reconsidering this decision in light of the functionality that is already available for plugins.

drzett avatar Oct 28 '26 23:10 drzett