-
Notifications
You must be signed in to change notification settings - Fork 556
fix(codex): Transform Task agent calls to skill references #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(codex): Transform Task agent calls to skill references #120
Conversation
f2910ae to
a2c2019
Compare
Tested and Working ✅Verified locally with Codex CLI 0.89.0:
This is the expected behavior - Codex doesn't have subagent spawning like Claude Code, so it reads the skill and executes instructions in the main thread. Note: During testing, found and fixed an additional bug where the prompt files weren't being transformed (only skill files were). Both are now correctly transformed. |
Adds comprehensive content transformation for Codex compatibility: 1. Task agent calls: `Task agent-name(args)` → `Use the $agent-name skill to: args` 2. Slash commands: `/command-name` → `/prompts:command-name` 3. Agent references: `@agent-name` → `$agent-name skill` This bridges the syntax gap between Claude Code and Codex: - Claude Code uses Task tool with subagent_types - Codex uses skills and /prompts: namespace Transformations are applied to both skill and prompt files during conversion. Tested with Codex CLI 0.89.0 - all transformations working correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
a2c2019 to
dc834a4
Compare
Full End-to-End Test Passed ✅Tested the complete workflow in Codex CLI 0.89.0:
The Ready for review. |
|
TY!! you are the best |
|
I'll add CI here as well so we can see it pass on PRs |
|
These are actually my first open-source contributions — made using Claude Code + compound-engineering itself. Thanks for building this! |
|
Love this! |
…veryInc#120) Adds comprehensive content transformation for Codex compatibility: 1. Task agent calls: `Task agent-name(args)` → `Use the $agent-name skill to: args` 2. Slash commands: `/command-name` → `/prompts:command-name` 3. Agent references: `@agent-name` → `$agent-name skill` This bridges the syntax gap between Claude Code and Codex: - Claude Code uses Task tool with subagent_types - Codex uses skills and /prompts: namespace Transformations are applied to both skill and prompt files during conversion. Tested with Codex CLI 0.89.0 - all transformations working correctly. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Adds comprehensive content transformation to the Codex converter, bridging syntax differences between Claude Code and Codex.
Problem
Claude Code and Codex have different syntax for invoking commands, agents, and referencing other features:
Task agent-name(args)Use $skill to: args/command-name/prompts:command-name@agent-name$skill-name skillThe converter was transforming structure (commands → prompts, agents → skills) but not content references within those files.
Solution
Added
transformContentForCodex()function that handles all content mappings:/prompts:namespace$skillsyntaxApplied to both skill and prompt files during conversion.
Testing
/prompts:workflows-plannow correctly invokes/prompts:deepen-plan(instead of failing with "no such file or directory: /deepen-plan")Before/After
Task calls:
Slash commands:
Agent references:
🤖 Generated with Claude Code