Repository navigation
Description
Summary
On macOS, Codex Desktop cron automations using an Azure/OpenAI-compatible Responses provider and gpt-5.6-sol fail before the saved prompt reaches the model.
The app-server starts the automation turn by injecting a standalone function_call_output for codex_app/automation_update with both id: None and call_id: None. Azure rejects the Responses request with HTTP 400:
Invalid Value: 'input.call_id'. Function call output requires call_id.
This is related to #41690, but this reproduction is on macOS with Azure and affects multiple unrelated production automations, not only the reported Windows/DeepSeek configuration.
Environment
- Codex Desktop:
26.825.51511(build7377) - Bundled Codex CLI/app-server:
0.151.0-alpha.7.2 - OS: macOS
26.6.2, Apple Silicon - Model:
gpt-5.6-sol - Provider: Azure OpenAI-compatible endpoint (hostname redacted)
- Provider auth: environment-variable API key
wire_api = "responses"- Automation kind: standalone local
cron
The Azure API key, endpoint hostname, local username, project names, and production prompt contents are intentionally omitted.
Minimal reproduction
Create an active local automation with:
kind = "cron"
prompt = "say hi to me"
rrule = "RRULE:FREQ=MINUTELY;INTERVAL=1"
model = "gpt-5.6-sol"
execution_environment = "local"Use a custom provider configured as:
model_provider = "azure"
[model_providers.azure]
name = "Azure"
base_url = "https://<redacted>.services.ai.azure.com/openai/v1"
env_key = "<redacted>"
wire_api = "responses"Wait for the scheduled occurrence.
Actual result
The scheduler creates a run and thread, but the first turn fails in about two seconds. The automation prompt never reaches the model.
The local log shows the exact invalid item:
Submission ... TurnInputRequest {
input: ResponseItem(FunctionCallOutput {
id: None,
call_id: None,
name: Some("automation_update"),
namespace: Some("codex_app"),
output: ...
})
}
It is immediately followed by:
Turn error: {
"error": {
"message": "Invalid Value: 'input.call_id'. Function call output requires call_id.",
"type": "invalid_request_error",
"param": "input"
}
}
Local state after each occurrence:
- automation remains
ACTIVE last_run_atandnext_run_atadvance- an
automation_runsrow is created - the run is left as
PENDING_REVIEW - the created thread has
systemError - no assistant response or automation work occurs
The same error occurs for multiple unrelated cron automations with different prompts, projects, and reasoning levels. Normal interactive gpt-5.6-sol turns through the same Azure provider succeed.
Regression evidence
- Last known successful scheduled automation before the desktop update:
2026-08-30 14:46:55 +04 - Codex Desktop application updated:
2026-08-30 21:32:46 +04 - Repeated failed scheduled runs observed after the update, including from
2026-08-31 01:00:39 +04onward
Changing the RRULE, prompt, workspace, or reasoning effort does not affect the failure.
Verified local workaround
A localhost reverse proxy was placed between Codex and the same Azure endpoint. It performs one narrowly scoped transformation:
- find a
function_call_outputwherename == "automation_update",namespace == "codex_app", andcall_idis absent; - convert that orphan item into a developer message containing the same text;
- forward all other request fields and all responses unchanged.
Results:
- A synthetic request containing the exact malformed bootstrap shape completed through Azure with
gpt-5.6-sol. - A real one-minute Codex Desktop cron automation then completed successfully and replied
Hi! 👋.
This isolates the failure to the automation bootstrap serialization rather than the scheduler, model deployment, credentials, network, or automation prompt.
Expected behavior
Codex should not send a standalone function_call_output without a valid matching call_id to a strict Responses provider.
Possible fixes:
- Represent the automation bootstrap as a normal user/developer message.
- Preserve a real preceding function call and matching
call_id. - Add provider capability normalization before serializing
TurnToolOutputinto a Responses request.
At minimum, a failed automation run should be marked failed with the provider error instead of remaining PENDING_REVIEW.
Activity
github-actions commentedon Aug 31, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
weltonrodrigo commentedon Aug 31, 2026
Such bug. Much breakage. Very impactful to my workflow. Wow. Please fix. 🐕
Ahmet-Dedeler commentedon Aug 31, 2026
Confirming this on the same build, with two things I think are new to the thread: a
more severe failure mode than a skipped automation run, and a working proxy-level
workaround.
Same build, different host
26.825.51511(build7377)0.151.0-alpha.7.227.0, Apple Silicongpt-5.6-sol, provider Azure OpenAI-compatible,wire_api = "responses"az account get-access-tokenBearer (not an env-var key), so thedefect is independent of the auth mode
Identical error text:
Invalid Value: 'input.call_id'. Function call output requires call_id.The part that is worse than a skipped run
Both this issue and #41690 describe an automation whose own first turn dies, leaving a
fresh thread with
systemError. That understates the blast radius when the automation has atarget_thread_idpointing at an existing thread.My automation is a
kind = "heartbeat"targeting a long-running thread. The orphan item ispersisted into that thread's rollout, and because Codex replays full history on every
request, the thread is permanently bricked from the first bad tick onward — including for
the human. My own typed message hit the same 400 forty minutes later. The thread cannot
recover on its own, and each subsequent tick appends another orphan.
Forensics from the rollout (
54,172lines, 379 MB):Everything before line 54152 in that thread is healthy, so this is a clean regression boundary.
Model-initiated calls are fine; only the injection path is broken
Classifying every
automation_updateitem in the same rollout:When the model calls
automation_update, the pairing is correct. Only the app-server'sunsolicited heartbeat/bootstrap injection omits
call_id. The persisted orphan also carriesan
internal_chat_message_metadata_passthroughkey alongsideid/name/namespace/output.Schema-normalizing proxies do not help
#41690 links this to the root-
oneOftool-schema issues (#30132, #37786, #30523). Worthseparating: I already run a local proxy that normalizes the
automation_updatetool schemafor Azure, and it makes no difference here. That fix rewrites
body.tools[]; this defect is inbody.input[]. They are independent bugs that happen to involve the same tool.Workaround
Two layers, in case they help others stuck on Azure:
1. Un-brick an existing thread — drop the orphans from the rollout offline (app quit):
2. Keep automations running — repair
inputin-flight at the proxy, rewriting an orphaninto an equivalent user message rather than dropping it, so the heartbeat prompt still reaches
the model:
Only items with no
call_idare touched — one that carries acall_idis left alone, sinceits
function_callmay legitimately sit behindprevious_response_id.Because the rewrite happens on every request, this also repairs the already-persisted orphans on
replay, which recovers a bricked thread without editing the rollout at all.
That second layer is arguably what the app-server should do natively: #41820 asks for exactly
this shape — automation updates delivered as attributable messages rather than as a synthetic
tool result with no call.
Rafik-Belkadi-Reccap commentedon Sep 1, 2026
Same here, i feel like on every update they break azure everytime
amirsalaar commentedon Sep 7, 2026
Independent confirmation of the existing issue from another macOS Codex Desktop installation, as of 2026-09-07.
gpt-5.6-lunaandgpt-5.6-terraon bundled CLI0.151.0-alpha.7.2; the defect remains on0.153.4.function_call_outputforcodex_app/automation_updatewith nocall_idand no matching precedingfunction_call.Invalid Value: 'input.call_id'. Function call output requires call_id.0.149.0-alpha.4.3and0.150.0-alpha.12.2contain matchingcall_idvalues and complete successfully.guoqunabc commentedon Sep 9, 2026
Additional reproduction on September 9, 2026: this still affects native scheduled automations on bundled CLI 0.153.4.
Environment:
The first turn failed after 4,543 ms, before any maintenance command or assistant response. The persisted bootstrap response item has this shape (production prompt omitted):
{ "type": "function_call_output", "name": "automation_update", "namespace": "codex_app", "output": "<automation context and prompt omitted>" }There is no
call_idkey, and no preceding matchingfunction_call. The returned error is:Read-only inspection of this installed Desktop bundle also found the automation input helper selects
toolOutputwhen the app-server version supportsturnToolOutput; its existing fallback supplies ordinary text input. The capability threshold is0.151.0-alpha.4. This appears to explain why current app-server versions take the problematic path. This is a local code observation, not a verified upstream fix.Please consider provider-aware normalization or using the existing text-input path for unsolicited automation bootstrap content, so it does not become an orphaned function output.
No application patch, proxy, scheduler replacement, or history modification was applied. A native fix is needed. Local usernames, paths, task IDs, endpoint details, credentials, and the production automation prompt have been omitted.