Codex Pro Tool icon

Codex Pro Tool

AI Tool node backed by the local Codex CLI for explicit outside or higher-risk Codex runs.

Codex Pro Tool

AI-generated

Summary

Execute Codex CLI with configured model and options, returning the final answer as an n8n AI tool.

Inputs

  • task (required) — The request to execute with Codex.
  • context — Optional extra context, source material, or constraints for the request.

Output shape

string when includeMetadata is disabled, otherwise JSON string.

When includeMetadata is false, returns the final answer text. When true, returns a JSON string containing response, usageMetadata, responseMetadata, and additionalKwargs (codex_raw_output, codex_stdout_jsonl).

Examples

Example 1: Basic Codex run returning just the answer.

includeMetadata=false, default model gpt-5-codex, default timeout 300000ms.

Example 2: Run with full metadata and specific options.

includeMetadata=true, model=gpt-5.4, timeout=600000, maxRetries=2, sandboxMode=workspace-write.

Links

Discussion