Title:
Request for documented Codex functions.exec nested-tool result contract
Body:
I’m looking for official, normative documentation for the Codex app
functions.exec nested-tool return contract.
Could OpenAI clarify:
-
Is a fulfilled shell_command result inside functions.exec identical to
Responses API LocalShellCallOutput or ShellCallOutput? -
What are the exact schema and version for stdout, stderr, exit code,
timeout, failure, and promise rejection? -
How can callers determine whether output was truncated?
Are original length, complete length, or full-output digest available? -
Does status=“completed” normatively guarantee that the value delivered
to functions.exec is complete and untruncated? -
What is the exact apply_patch result schema, including mutation outcome,
affected paths, failure state, and completeness? -
Are nested-tool results guaranteed to be non-Proxy ordinary objects,
structured-clone values, or host objects? -
Is this contract versioned and covered by compatibility guarantees?
Please link to official documentation where possible.
ChatGPT is a product not for you to program or think about. It is for you to consume.
The documentation is all about using it, not asking programming questions about it, as you don’t develop your own software to call ChatGPT, and the Codex SDK means you have given up writing software and instead committed to comprehending obtuse proprietary software. The Codex SDK uses an app server layer, abstracting the remote communication, but you do have the source if you really want to see.
Here’s a link to official documentation about as technically deep as you will get, how to set permissions on a sandbox for the equivalent of shell tool: Codex App Server | ChatGPT Learn
Here’s the SDK source, if you want to investigate ultimate calls to pay-per-use API (which does have moderate documentation), vs ChatGPT’s API and subscription account use:
# OpenAI Codex Python SDK - API Reference
Public surface of `openai_codex` for Codex workflows.
Turn streams are routed by turn ID so one client can consume multiple active turns concurrently.
Thread starts default to `ApprovalMode.auto_review`; turn starts accept an optional `approval_mode` override.
## Package Entry
```python
from openai_codex import (
Codex,
AsyncCodex,
CodexConfig,
ApprovalMode,
Sandbox,
ChatgptLoginHandle,
DeviceCodeLoginHandle,
AsyncChatgptLoginHandle,
AsyncDeviceCodeLoginHandle,
This file has been truncated. show original
Thanks—the App Server documentation is a useful lead. My question is narrower: does the Codex desktop functions.exec nested shell_command result map exactly to App Server command/exec or commandExecution?
If so, could you point me to the exact repository URL, commit/tag, source file, and generated type that define that mapping, including output truncation and completeness behavior?
Likewise, which App Server type maps to the nested apply_patch result, and what postcondition does a completed result guarantee?
I’m trying to distinguish an implementation-specific mapping from the public App Server protocol itself.