GPT WORLD / INDEPENDENT CODEX FIELD MANUAL Source review · 2026-07-31

Retrospective edition / TOOLS

Use code execution as a disposable compute cell

Send bounded inputs, define expected artifacts, and validate outputs outside the sandbox before they enter business workflows.

01 / DECIDE

Architecture decision

Use it for calculations, data transformation, charts, and file inspection where deterministic code improves the answer.

Send bounded inputs, define expected artifacts, and validate outputs outside the sandbox before they enter business workflows. Map input, output, state, and side effects as one observable path before deciding which layer owns use code execution as a disposable compute cell.

02 / BUILD

Three-step implementation

  1. 01

    Frame the contract

    Write down the caller, data classification, success condition, timeout, cancellation, and ownership. Use it for calculations, data transformation, charts, and file inspection where deterministic code improves the answer.

  2. 02

    Build one narrow path

    Implement one end-to-end path with request correlation, typed state, and reversible failure handling. Send bounded inputs, define expected artifacts, and validate outputs outside the sandbox before they enter business workflows.

  3. 03

    Prove the outcome

    Turn acceptance into a repeatable fixture, contract test, or browser test. Fixtures verify calculations independently and reject missing, oversized, malformed, or unexpected artifacts.

03 / BOUND

Production boundary

A sandbox does not make unknown code trustworthy; restrict inputs, output types, size, runtime, and downstream effects.

04 / PROVE

Acceptance evidence

Fixtures verify calculations independently and reject missing, oversized, malformed, or unexpected artifacts.

SOURCE / HTTP

Reproducible source probe

curl -fsSI 'https://developers.openai.com/api/docs/guides/tools' | sed -n '1,5p'

PRIMARY / OFFICIAL

Official OpenAI sources

Sources checked · 2026-08-10

  1. 01Using tools