I’m trying to identify the supported result contract for programmatic tool calls inside Codex—not the ChatGPT API or the Responses API.
The official App Server documentation shows that command/exec returns:
{
"exitCode": 0,
"stdout": "...",
"stderr": ""
}
Reference:
In the Codex environment I’m using, functions.exec can invoke nested tools such as shell_command and apply_patch, but its declared return type is only Promise<unknown>.
Could someone clarify:
- Does the fulfilled value from nested
shell_commandmap exactly to App Servercommand/exec, acommandExecutionitem, or another internal wrapper? - If this mapping exists, what source file, generated type, version, or commit defines it?
- How can a client determine whether
stdoutandstderrare complete or truncated? Does a completed result guarantee that all output was delivered? - What is the exact result schema and postcondition contract for nested
apply_patch? - Are returned JavaScript values guaranteed to be ordinary non-Proxy objects, structured-clone values, or another documented representation?
- Is this result contract versioned or covered by a compatibility guarantee?
If these are intentionally internal and unsupported contracts, confirmation of that would also answer the question.