AI coding · fixes ·

Codex desktop “Cannot serialize value” error on new worktree chats: how to fix it

As of 24 October 2026. This is a fast-moving bug. OpenAI may ship further changes at any time, so check the linked issues before you follow any step.

If you want the next step, read Codex credits explained: what they cost, earned limit resets and how to cap auto reload.

If the Codex desktop app shows Error starting chat and Cannot serialize value: (couldn't stringify value) the moment you send the first message in a new chat, you're not alone. Dozens of people reported it on GitHub after the 21 October 2026 update. This guide collects what the reports say, step by step, with a link to the exact comment behind each step.

Short version

  1. Update the app first. Several users report that version 26.1016.61520 fixed it on macOS and Windows, and one Windows user reports 26.1016.62342 fixed it. The main issue was closed as completed on 22 October 2026.
  2. Still stuck on 26.1016.51333? Turn off New worktree in the new-chat settings and send again. Your chat runs in your current checkout instead.
  3. Need a separate worktree today? Create one with git yourself, or use the Local then Hand off to Worktree route below.

Symptoms

  • You start a new chat with Worktree (shown as New worktree) selected, type any prompt, even hello, and send it. The chat fails with:
    Error starting chat
    Cannot serialize value: (couldn't stringify value)
  • The same prompt in Local mode starts normally, and existing conversations keep working (#55827, opened 21 Oct 2026).
  • Restarting, reinstalling, or removing and re-adding the project didn't help for the people who tried (comment, 21 Oct; comment, 21 Oct).
  • Reports in the issues name desktop app 26.1016.51333 (build 21161) on macOS (#55744, #55818), Windows package 26.1016.6573.0 (#55827), and Linux (EndeavourOS comment, 21 Oct).
  • Desktop logs show [Composer] submit failed with errorName=TypeError and mode=worktree (#55827). Users traced it to a value in the opening prompt that the app's internal serializer rejects (comment, 21 Oct). That diagnosis comes from users, not from OpenAI.

Step 1: check your version and update

Open About Codex to see your version. Then check for updates.

  • "Update: this Worktree issue is now resolved for me in Codex desktop version 26.1016.61520." (comment, 22 Oct). Others confirmed the same on macOS (22 Oct, 22 Oct).
  • The reporter closed #55744 as completed after updating to 26.1016.61520 (comment, 22 Oct).
  • On Windows, the update reached at least one user later on 22 October and fixed it for them (comment, 22 Oct). Another Windows user reports 26.1016.62342 fixed it (comment, 23 Oct).
  • Some Windows users said the updater still reported "up to date" on 26.1016.51333 for a while (comment, 22 Oct). If that's you, the workarounds below are designed to keep you working until the update arrives. #55827 was still open when we checked.

Step 2: the workaround, turn off New worktree

From a macOS user on 26.1016.51333: "In the new-chat settings (gear icon), turn off New worktree... then submit again. I confirmed that the message sends successfully and the chat starts normally in the current project directory. No app restart was needed." (comment, 21 Oct)

How confirmed is it? Many separate commenters report that Local mode works while Worktree fails, on macOS and Windows (for example a macOS report that turning off Worktree lets new chats start (21 Oct), a GitHub comment confirming the New worktree setting (21 Oct), and a Windows report on issue #55827 confirming the same fix (21 Oct)). These are user reports, not an official OpenAI statement, and the original commenter notes they hadn't tested every project. It may not work for every setup.

The catch: your chat now works directly in your current checkout, so its edits land on your working branch. Commit or stash first if you want a clean starting point.

Step 3: keep worktree isolation without the broken button

Option A: Local, then Hand off to Worktree

A Windows user reported these steps worked on the affected build (comment, 21 Oct):

  1. Start a Local chat in the same project with a harmless prompt such as "Reply only Ready; do not read or change files."
  2. Wait for the reply to finish.
  3. Use Hand off → Worktree in the chat header.
  4. When the handoff finishes, send your real task.

Option B: create the worktree yourself with git

User reports suggest the failure is in how the app starts the chat, not in git itself. One user on an SSH-connected Linux host reports that git worktree add --detach worked fine by hand (comment, 22 Oct). You can create a worktree on a new branch, then open that folder in Codex and chat in Local mode:

cd your-repo
git worktree add -b fix-task ../your-repo-fix-task main
git worktree list

We ran these commands in a scratch repo with git 2.47.3. Real output:

$ git worktree add -b fix-task ../wtdemo-fix-task main
Preparing worktree (new branch 'fix-task')
HEAD is now at c50458b init
$ git worktree list
/tmp/wtdemo           c50458b [main]
/tmp/wtdemo-fix-task  c50458b [fix-task]

When you're done and the branch is merged, clean up:

$ git worktree remove ../wtdemo-fix-task
$ git branch -d fix-task
Deleted branch fix-task (was c50458b).
$ git worktree list
/tmp/wtdemo  c50458b [main]

git worktree remove refuses to delete a worktree that has modified or untracked files. Adding --force deletes it anyway, and any uncommitted changes and untracked files in that worktree are permanently lost. Commit, push or copy out anything you want to keep first.

Rolling back or pinning a version

The issues don't document a working rollback or pinning method for the desktop app. One macOS user said they planned to roll back to 26.1013.40934 but wrote that "the downgrade has not been performed or validated yet" (comment, 21 Oct). One Windows user notes the beta channel offered an older build than production on 23 October, so it wasn't a fix path for them (comment, 23 Oct). Since users report that the newer build fixed it for them, updating is the route the issues support.

Related notes: install script and bundled Node

install.sh returning 404

#56254 (22 Oct) reports that curl -fsSL https://chatgpt.com/codex/install.sh | sh failed with curl: (22) The requested URL returned error: 404. The reporter closed it the same day as "working again" (comment, 22 Oct), but another user reported the 404 again on 23 October (comment, 23 Oct). When we requested that URL on 24 October 2026, it also returned HTTP 404. The issues don't document an alternative install route, so check the Codex README for the current install options before you script anything.

Bundled Node.js and the 21 October security release

#56076 (22 Oct, still open when we checked) asks whether the Node.js runtimes bundled with the desktop app include Node's 21 October 2026 security release, v24.22.1. The reporter says plainly that it is "not claiming that the published Node.js vulnerabilities are necessarily reachable or exploitable through Codex."

  • On Windows 26.1016.61520, one user found the primary runtime is stock Node 24.19.0, and a separate computer-use runtime labelled 24.21.0-cua.2 whose patch coverage they couldn't verify (comment, 22 Oct).
  • On 23 October, on Windows 26.1016.62342, another user reports the computer-use runtime still reports OpenSSL 3.5.8, not the 3.5.9 in Node 24.22.1. They also note its setup script checks for an exact Node version, so dropping in stock Node yourself would fail that check, and they advise leaving the runtime as shipped (comment, 23 Oct).

In short: don't swap bundled binaries by hand. Watch #56076 for an answer from OpenAI.

Guard what your agent can run

Bugs like this one are a reminder that AI coding tools change under you. If you also use the Codex CLI, Claude Code, or Cursor, our Guardrails Pack ($24 plus VAT where applicable) adds hooks, permission presets, and git pre-commit and pre-push guards designed to deny risky commands such as force pushes, production deploys, and .env reads, and to reject commits that contain live keys. Its Codex hooks are for the Codex CLI (tested on 0.164.0), not the desktop app, and the rules are pattern-based, so rephrased commands can get past them. The page lists every limit.

Disclosure: this is our own paid product.

Sources

Checked 24 Oct 2026: github.com/openai/codex issues #55744, #55827, #55818, #56254, and #56076, including every comment on them at the time of checking. Git commands run on git 2.47.3.

OpenAI and Codex are trademarks of OpenAI. GitHub is a trademark of GitHub, Inc. Git is a trademark of Software Freedom Conservancy. Claude Code is a trademark of Anthropic. Cursor is a trademark of Anysphere, Inc. They are used here only to identify those products. We aren't affiliated with, sponsored by, or endorsed by any of them.