fix: write Codex dev skills as files#2988
Conversation
|
Thanks for tracking this down — the bug in #2930 is real and the behavior here is correct: Codex can't load symlinked My concern is with how it's special-cased rather than the fix itself. The change hardcodes Could we route this through integration metadata instead? Roughly:
This follows the existing |
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #2930 by ensuring that Codex dev-mode extension installs write SKILL.md artifacts as real files (not symlinks), because Codex does not load symlinked skills. It adds a dev_no_symlink integration flag and threads it through command/skill registration to selectively disable symlink outputs for Codex while preserving existing dev symlink behavior for other agents.
Changes:
- Add
dev_no_symlinkintegration metadata (defaultFalse, enabled for Codex) and propagate it into agent registrar configs. - Update dev-mode output writing for agent commands and extension skills to honor the no-symlink policy.
- Add regression tests validating Codex dev installs write non-symlink
SKILL.mdoutputs and that the policy is exposed in config.
Show a summary per file
| File | Description |
|---|---|
| tests/test_extensions.py | Adds a regression test ensuring Codex dev installs create SKILL.md as a regular file. |
| tests/test_agent_config_consistency.py | Verifies Codex exposes dev_no_symlink in CommandRegistrar.AGENT_CONFIGS. |
| src/specify_cli/integrations/codex/init.py | Declares dev_no_symlink = True for Codex integration. |
| src/specify_cli/integrations/base.py | Introduces the dev_no_symlink integration attribute. |
| src/specify_cli/extensions.py | Adjusts extension skill registration to avoid dev symlinks when dev_no_symlink is set. |
| src/specify_cli/agents.py | Threads agent_config into output writer and disables dev symlinks when dev_no_symlink is set. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 6/6 changed files
- Comments generated: 2
| if not link_outputs or (agent_config or {}).get("dev_no_symlink"): | ||
| dest_file.write_text(content, encoding="utf-8") | ||
| return |
| if not ( | ||
| link_outputs | ||
| use_dev_symlink | ||
| and self._is_expected_dev_symlink(skill_file, cache_file) | ||
| ): | ||
| continue |
Description
Fixes #2930.
specify extension add --devcreated symlinked CodexSKILL.mdfiles, but Codex currently does not load those symlinked skills. This keeps dev-mode symlinks for other agents while writing CodexSKILL.mdoutputs as regular files in both the agent command registration path and the extension skill registration path.Normal non-dev installs are unchanged, and existing Copilot dev symlink behavior remains covered by the existing test.
Testing
uv run specify --helpuv sync && uv run pytestCommands run:
uv run --extra test pytest tests/test_extensions.py -k "add_dev_writes_codex_skills_as_files" -q(failed before the fix, passed after)uv run --extra test pytest tests/test_extensions.py -quv sync --extra test && uv run pytest -quv run specify --helpgit diff --checkAI Disclosure
Codex assisted with issue scouting, code-path inspection, and local review. I reviewed the final diff and ran the listed checks locally.