skills/smithery.ai/codex-subagent

codex-subagent

Installation
SKILL.md

This skill lets you spawn a nested Codex process (a “subagent”) using codex exec so it can work with the same project and AGENTS.md instructions.

filename="$(openssl rand -hex 4)"
codex exec "count the total number of lines of code in this project" 2>>/tmp/${filename}.log

In non-interactive mode, codex exec does not ask for command or edit approvals. By default it runs in read-only mode, so it cannot edit files or run commands that require network access.

When you use this skill, follow these logging rules:

  • Before running codex exec, generate a unique log file name with openssl rand -hex 4.
  • By default, append 2>>/tmp/${filename}.log to your codex exec command so only the subagent’s final message is visible to the caller, while stderr is captured for debugging.
  • If a run fails, behaves unexpectedly, or the user explicitly asks to see what the inner agent is doing, read the log file (for example: cat /tmp/${filename}.log).

Since the codex exec may run couple hours, set a generous timeout so long-running subagent work can complete:

  • Use a timeout of at least 20 minutes for the Run (or Bash) tool unless the user explicitly requests a shorter limit.
Installs
1
First Seen
Mar 20, 2026
codex-subagent from smithery.ai