invalid_request_error: Invalid 'input[15].arguments': string too long
Open 💬 11 comments Opened Mar 2, 2026 by Gusarich
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
ERROR: {
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "[StringParam] [input[15].arguments] [string_above_max_length] Invalid 'input[15].arguments': string too long. Expected a string with maximum length 1048576, but got a string with length 1524940 instead."
},
"status": 400
}
thread id: 019cafcd-90a8-7d31-8c01-007fe4a00a8a
happened with gpt-5.3-codex-spark, codex-cli 0.107.0-alpha.3, using exec
11 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
have the same issue with latest 0.107.0 cli mode (not exec), I see "Invalid 'input[119].arguments': string too long. Expected a string with maximum length 1048576, but got a string with length
2261315 instead.
happened with spark but changing models doesnt fix the session
{ "error": { "message": "Invalid 'input[531].arguments': string too long. Expected a string with maximum length 1048576, but got a string with length 1508785 instead.", "type": "invalid_request_error", "param": "input[531].arguments", "code": "string_above_max_length" } }
Codex Spark. But swapping back to another model with the existing session doesn't resolve the problem.
same issue for me
Any updates on this?
Definitely the same issue. Any solution?
I am also seeing this issue, tried changing the reasoning level since changing the model doesn't seem to work either but the issue is still present.
Additional reproduction from Codex Desktop on macOS:
After the UI displayed “Context automatically compacted”, the session failed with:
This occurred in the same thread after automatic context compaction. The error prevents the turn from continuing.
Already restarted my app nothing change and im up to date with the latest version:
Version 26.707.72221
Proposed fix (not submitted as a PR because external code contributions are invitation-only; see contributing guidelines).
This report is a concrete
input[*].argumentsreproduction of the older oversized replay payload family reported in #10506, while #13270 captures the function-call-arguments variant.Patch outline
At the request-history formatting boundary in
codex-rs/core/src/client_common.rs:FunctionCallitems whoseargumentsstring is above a conservative 1,000,000-character limit.call_idand matchingFunctionCallOutput.The proposed patch is implemented and locally validated on branch
agent/oversized-tool-arguments-pr, commit9a00d3c00c.Validation:
cargo test -p codex-core client_common::tests: 7 passedgit diff --check: passedclippy::large_enum_varianterror incore-plugins/src/manifest.rs.This avoids blindly truncating active tool calls and prevents a completed historical call from making the next Responses API request invalid.