Collect the result of a running Codex job
codex_job_resultRetrieve the output of a previously started Codex job by its job_id, waiting up to a specified time for completion. Use this to collect results from long-running coding or image generation tasks.
Instructions
Get the result of a codex_run or codex_generate_image call that returned status: running. Waits up to wait_sec for the job to finish; if it is still running, call again. Results stay available for 60 minutes after the job finishes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"job_id": "<job_id>"
},
"name": "codex_job_result"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The job_id returned by codex_run or codex_generate_image. | |
| wait_sec | No | Seconds to wait for the result before returning a job_id instead. Default 45, maximum 50, which keeps the call under common 60-second client timeouts. |