# codex subagent

> Delegate independent code reviews and research tasks to a local Codex subagent with persistent threading.

codex subagent is a paid AI agent skill on Agensi by 纯希, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $1 (one-time purchase)
- Creator: [纯希](https://www.agensi.io/creators/creator-651)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-10-17
- Security: scan passed (2026-10-17); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/codex-subagent
- Tags: ai-agents, code-review, mcp, openai-codex, automation

## About this skill

Development often suffers from confirmation bias, especially during self-review or complex debugging. The Codex Subagent skill enables multi-agent delegation by bridging your environment to a local OpenAI Codex CLI. It allows you to spin up independent subagents that can audit your work, perform adversarial reviews, or execute isolated research tasks without cluttering your main conversation context.

### What it does
- **Persistent threading** allows for multi-turn conversations where the subagent remembers previous context and instructions.
- **Adversarial review** triggers an independent audit of your code to find edge cases, contract violations, and logic bugs.
- **Granular sandboxing** controls access levels, from read-only investigations to workspace-write permissions for automated fixes.
- **External verification** provides a second opinion on complex implementations to reduce the risk of biased errors.

### How it works
1. **Initiate** a new session using the `ask` tool, providing a self-contained prompt and specific working directory.
2. **Review** the output and the generated `threadId` to determine if further investigation is required.
3. **Iterate** using the `followup` tool to challenge findings, request evidence, or refine the subagent's output within the same thread.
4. **Relay** verified results back to the main workflow, citing the subagent for transparency.

### Frameworks & tools
This skill requires the `dsh-codex-bridge` MCP server, OpenAI Codex CLI, and Node.js 18+. It is compatible with MCP-enabled environments like Claude Code, Cursor, and DSH.

### Why this beats prompting it yourself
Manual prompting within a single session leads to context bloat and model bias. This skill offloads specific cognitive tasks to a fresh instance with its own persistent state, ensuring a truly independent critique of your code.

### Use cases
- Run an adversarial code review on a git diff before submitting a PR.
- Delegate a background debugging task while you continue feature development.
- Cross-check a complex architectural decision against a second model's logic.
- Execute sandboxed file operations or test runs via a separate agent thread.

### Known limitations
Codex cannot see the primary conversation context unless explicitly included in the prompt. Requires local installation of the Codex CLI and the dsh-codex-bridge.

## Requires

- Node.js
- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the codex subagent skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does using a subagent differ from just asking my primary AI agent to review my code?

This skill prevents context bloat and 'confirmation bias' by spawning an independent agent instance to audit your code, providing a truly objective second opinion that wouldn't be possible within a single, linear conversation thread.

### What technical environment is required to run the Codex Subagent?

The skill requires the dsh-codex-bridge MCP server, the OpenAI Codex CLI, and Node.js 18+; it is designed to work seamlessly with MCP-enabled environments like Claude Code, Cursor, and DSH.

### Can I control whether the subagent has permission to modify my local files?

Yes, through granular sandboxing, you can toggle between 'read-only' mode for safe investigations or 'workspace-write' permissions if you want the subagent to apply automated fixes directly to your files.

### What happens to the subagent's memory once a specific task is completed?

The 'persistent threading' feature allows the subagent to remember previous turns and context within its own dedicated session, enabling you to conduct deep, multi-step investigations without cluttering your main workspace.

### Does the subagent automatically see my entire chat history with my main AI?

No, the subagent operates in a silo for maximum objectivity; it only sees the specific files or context you explicitly share via the 'ask' tool, ensuring its review is not influenced by your primary conversation history.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
