Codex Desktop task is permanently bricked when historical tool-call arguments exceed 1 MiB
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Summary
A Codex Desktop task becomes permanently unrecoverable after a historical tool call contains an arguments string larger than the backend's 1 MiB validation limit.
The error is:
[StringParam] [input[986].arguments] [string_above_max_length]
Invalid 'input[986].arguments': string too long.
Expected a string with maximum length 1048576,
but got a string with length 1542679 instead.
Because the oversized tool-call item is already part of completed task history, every subsequent request resends the same invalid item and fails before the model can run.
Environment
- Codex Desktop on macOS
- macOS 26.6 (25G72)
- Local project task
- Long-running task with substantial tool-call history
Steps to reproduce
- Run a long Codex Desktop task that eventually produces a tool call whose serialized
argumentsexceed 1,048,576 characters. - The next request is rejected with the error above.
- Send any short follow-up message, such as
?orstop. - Observe that the same
input[986].argumentsvalidation error is returned. - Allow automatic context compaction to run.
- Observe that compaction also fails with the same validation error.
- Fork the task using a same-directory fork.
- Observe that the fork copies the offending completed-history item and immediately fails with the same error.
Actual behavior
- Every new user message fails with the same HTTP 400 validation error.
- Automatic compact cannot recover the task.
- Stop/steer messages cannot execute because validation fails before a model turn starts.
- A fork is also unusable because completed history includes the oversized item.
- The Desktop UI may continue to appear as if the task is running or stuck even though the backend task status is a system error.
- The only successful workaround is creating an entirely new clean task and manually transferring a sanitized summary.
Expected behavior
At least one recovery path should remain available:
- Codex should prevent a tool call with oversized
argumentsfrom being committed to reusable task history. - Large patches, commands, DOM snapshots, or file contents should be chunked or stored as artifacts, with only a reference retained in task history.
- Compact should sanitize, truncate, or replace invalid historical tool-call arguments before submitting the compact request.
- Fork should either omit invalid tool-call payloads or replace them with a bounded summary.
- The UI should display a terminal system-error state instead of an indefinitely running state.
Impact
A single oversized tool call permanently bricks the task and also contaminates forks, making all accumulated conversational state unusable. This is especially disruptive for long-running tasks because the user cannot recover through stop, steer, compact, or fork.
Workaround
Create a brand-new task without importing or forking the old history, then manually supply a bounded handoff summary.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are identified. Start by tracing the task-history validation path, then inspect the compaction and fork handling described in the reproduction. Done means an oversized historical argument cannot permanently brick the task or its forks, at least one recovery path works, and the UI reports a terminal system-error state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, desktop
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100