Problem
The codex-cli-runtime skill instructs the codex:codex-rescue subagent to pass task prompts as positional arguments:
node "$CODEX_COMPANION" task "<raw arguments>"
When the prompt contains shell metacharacters (backticks, ${}, (), file paths), zsh interprets them before node receives the argument. This causes the Codex task to fail silently.
Observed errors
(eval):1: permission denied: app/services/results/serial_codes/destroy_service.rb
(eval):1: command not found: find_serial_code
(eval):1: no matches found: .record_limit(count)
(eval):1: parse error near `}'
(eval):1: parse error in command substitution
Root cause
The skill definition (skills/codex-cli-runtime/skill.md) only mentions positional argument passing. However, codex-companion.mjs already supports --prompt-file (line 614, readTaskPrompt function) and piped stdin (readStdinIfPiped).
Suggested fix
Update skills/codex-cli-runtime/skill.md to instruct agents to:
- Write the prompt to a temp file
- Pass it via
--prompt-file /path/to/file instead of as a positional argument
This avoids shell metacharacter expansion entirely.
Environment
- Claude Code 2.1.185
- codex plugin 1.0.4
- macOS (zsh)
Problem
The
codex-cli-runtimeskill instructs thecodex:codex-rescuesubagent to pass task prompts as positional arguments:When the prompt contains shell metacharacters (backticks,
${},(), file paths), zsh interprets them beforenodereceives the argument. This causes the Codex task to fail silently.Observed errors
Root cause
The skill definition (
skills/codex-cli-runtime/skill.md) only mentions positional argument passing. However,codex-companion.mjsalready supports--prompt-file(line 614,readTaskPromptfunction) and piped stdin (readStdinIfPiped).Suggested fix
Update
skills/codex-cli-runtime/skill.mdto instruct agents to:--prompt-file /path/to/fileinstead of as a positional argumentThis avoids shell metacharacter expansion entirely.
Environment