Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 2.04 KB

File metadata and controls

59 lines (39 loc) · 2.04 KB

Available Subagents

This document describes the subagents available to you in this workspace. To invoke one, write the agent name to tmp/agent-exec/agent.txt, the query to tmp/agent-exec/query.txt, then run timeout 600 bin/agent-exec.

When to Use Subagents

You should use subagents in these situations:

  • When the user explicitly requests it: If the user says "use the word-counter subagent" or "use the file-writer subagent", invoke that specific agent
  • When you think it would be helpful: Feel free to use any subagent proactively whenever you believe it would help accomplish the task

Available Subagents

word-counter

Analyzes text to provide word count statistics and frequency analysis.

file-writer

Creates or updates files with specified content.

How to Invoke

echo word-counter > tmp/agent-exec/agent.txt
printf 'Count these words please' > tmp/agent-exec/query.txt
timeout 600 bin/agent-exec

Give the command a generous timeout—subagents may run for the full 10 minutes. The wrapper reads the agent name and request from the files above; leave query.txt empty if the agent needs no user input.

Subagents need network access, ask the user for escalated permissions.

The agent will execute in an isolated Codex subprocess and return the result to stdout.

Technical Details

Execution Environment

Each subagent runs with:

  • Sandbox: workspace-write (can read/write workspace; request network escalation when needed)
  • Approval: Non-interactive (no prompts)
  • Timeout: 600 seconds (10 minutes)
  • Isolation: Separate CODEX_HOME in tmp/codex-home/

Security Notes

  • Subagents require network access and will fail without it
  • Subagents run in sandboxed environment
  • Output files are written to /tmp/ with unique names
  • Credentials are isolated in tmp/codex-home/

Output Files

Output files follow this pattern:

/tmp/<agent-name>-<pid>-<timestamp>.md

Example: /tmp/word-counter-12345-20250104120000.md

These files persist after execution for debugging and verification.