You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Session resume can fail: invalid function_call.name like 'functions.exec_command' #10563
Codex CLI sometimes stores tool/function calls with name values that include a dot, e.g. functions.exec_command. When resuming/continuing a session, OpenAI rejects these names because tool/function name must match ^[a-zA-Z0-9_-]+$, causing:
Invalid 'input[N].name': string does not match pattern '^[a-zA-Z0-9_-]+$'
Impact
Session resume/continuation fails; users have to manually repair ~/.codex/sessions/**/*.jsonl to unblock.
Observed examples
In ~/.codex/sessions/**.jsonl (JSONL session logs), payload.type == "function_call" and:
If the session log contains function_call.name values like functions.<tool>, resume fails with the validation error above.
Expected behavior
Codex should serialize tool/function call names using a valid name that matches the regex. If the internal tool is identified as functions.exec_command, the stored/transmitted name should be exec_command (or another regex-compliant identifier), not include a dot.
Suggested fix
When persisting tool calls and/or constructing the OpenAI request payload, sanitize name:
If it starts with functions., strip the prefix.
More generally, enforce ^[A-Za-z0-9_-]+$ before sending.
Workaround
I added a small local fixer script (idempotent) that scans ~/.codex/sessions and strips the functions. prefix for function_call entries where name is invalid. This unblocks resume, but it would be better fixed upstream in Codex.
Related current Windows case, with a different invalid character than the original dot-separated example.
On October 23, 2026 at 00:40:31 UTC+8, resuming an existing chat with gpt-6.1-sol (medium) failed with HTTP 400:
Invalid response.create payload: Invalid 'input[394].name': string does not match pattern. Expected a string that matches the pattern '^[a-zA-Z0-9_.-]+\\z'.
Desktop logs identify client version 26.1016.51333; the model manager reports 0.163.0.
A read-only inspection of the 721 stored response items finds exactly one function-call name outside the character set allowed by this error: mcp__codex_app::list_projects. The colon characters are rejected by this character set; a dot is permitted in this particular error, unlike the older regex in the original issue. The historical call was inspected as data only; it was not executed.
Important limitation: this stored call is at zero-based response-item index 392, whereas the server reports wire input index 394. Stored response-item 394 is a reasoning item. The complete outbound request was not captured, so I cannot prove that wire input 394 is the stored call at index 392 or account for the two-item offset. This is a candidate replay/namespace normalization problem, not a confirmed source-level diagnosis.
The history also contains foreign reasoning items, but the observed rejection in this chat is specifically the name validation error. No transcript/database/configuration was modified and no recovery was tested. Please advise on a supported migration or normalization path for historical namespaced tool calls.
Disclosure: AI assistance was used to prepare this comment; the reported metadata was checked against local files and logs.
Activity
etraut-openai commentedon Feb 3, 2026
If you're able to repro this, please use the
/feedbackslash command to upload your logs and session details, then post the thread ID here.CieveMe commentedon Oct 22, 2026
Related current Windows case, with a different invalid character than the original dot-separated example.
On October 23, 2026 at 00:40:31 UTC+8, resuming an existing chat with
gpt-6.1-sol(medium) failed with HTTP 400:Desktop logs identify client version
26.1016.51333; the model manager reports0.163.0.A read-only inspection of the 721 stored response items finds exactly one function-call name outside the character set allowed by this error:
mcp__codex_app::list_projects. The colon characters are rejected by this character set; a dot is permitted in this particular error, unlike the older regex in the original issue. The historical call was inspected as data only; it was not executed.Important limitation: this stored call is at zero-based response-item index 392, whereas the server reports wire input index 394. Stored response-item 394 is a reasoning item. The complete outbound request was not captured, so I cannot prove that wire input 394 is the stored call at index 392 or account for the two-item offset. This is a candidate replay/namespace normalization problem, not a confirmed source-level diagnosis.
The history also contains foreign reasoning items, but the observed rejection in this chat is specifically the name validation error. No transcript/database/configuration was modified and no recovery was tested. Please advise on a supported migration or normalization path for historical namespaced tool calls.
Disclosure: AI assistance was used to prepare this comment; the reported metadata was checked against local files and logs.