Skip to content

macOS app 26.1016.51333: new chats fail on first message with Cannot serialize value (couldn't stringify value) #55744

Closed

Description

@ZhangLiangchen

Summary

In the Codex desktop app on macOS, sending the first message in a new chat fails with:

启动聊天时出错
Cannot serialize value: (couldn't stringify value)

The Chinese heading means "Error starting chat".

Version and environment

  • Codex desktop app: 26.1016.51333
  • OS: macOS (exact OS version not yet collected)
  • Observed: October 21, 2026

Steps to reproduce

  1. Open a project in the Codex desktop app.
  2. Create a new chat.
  3. Manually type a minimal plain-text message, such as 你好, without attachments or file references.
  4. Send the first message.

Actual behavior

The chat fails to start with the error above. This reproduces both in a newly added project and in a new chat within an existing project. The error appears after sending the first message, rather than when clicking to create the chat.

Expected behavior

The new chat starts and processes the message.

Scope and diagnostics

  • A minimal plain-text message reproduces the issue; attachments are not required.
  • Whether an already-existing conversation can continue sending messages has not yet been confirmed.
  • Restart results and logs have not yet been collected.
  • A recent-version regression is suspected, but has not been established by testing an earlier version.

No project source code, credentials, or private logs are included in this report.

Activity

  1. added
    bug
    app
    session
    on Oct 21, 2026
  2. chgross89 commented on Oct 21, 2026

    @chgross89

    Additional Windows reproduction on the same desktop app version, 26.1016.51333. In this case, starting a new chat with Worktree enabled consistently fails before worktree creation is requested. A separately started Local chat can create and attach a managed worktree successfully.

    Environment

    • OS: Windows x64.
    • App version: 26.1016.51333, internal build 21161, release channel prod.
    • Current Windows package: OpenAI.Codex_26.1016.6573.0_x64.
    • Previous Windows package visible in the logs: 26.1013.4894.0.
    • Observed on October 21, 2026; the app updater reports up to date.

    Reproduction

    1. Open an existing local Git project.
    2. Start a new chat and enable Worktree.
    3. Select the existing master branch and submit a message.
    4. The chat fails with Error starting chat and Cannot serialize value: (couldn't stringify value).

    The user reports that this is independent of the message text. Explicitly reselecting master and restarting the app did not resolve it. The primary checkout and git worktree list --porcelain are readable.

    Confirmed diagnostics

    Desktop main-process logs repeatedly record:

    [electron-message-handler] [Composer] submit failed
    errorName=TypeError
    errorMessage="Cannot serialize value: (couldn't stringify value)"
    mode=worktree
    

    Relevant stack frames, with local installation paths removed:

    TypeError: Cannot serialize value: (couldn't stringify value)
      at e.devaluateImpl (app-shared-9cc135f1bdc1.js:323:30469)
      at e.devaluateImpl (app-shared-9cc135f1bdc1.js:323:30678)
      at e.devaluateImpl (app-shared-9cc135f1bdc1.js:323:30678)
      at e.devaluateImpl (app-shared-9cc135f1bdc1.js:323:30678)
      at e.devaluateImpl (app-shared-9cc135f1bdc1.js:323:30786)
      at e.devaluate (app-shared-9cc135f1bdc1.js:323:30106)
      at Tft.sendCall (app-shared-9cc135f1bdc1.js:323:49310)
      at SXi (app-initial-2b6b8063022d.js:2519:8330)
      at yXi (app-initial-2b6b8063022d.js:2519:6601)
    

    Inspection of these installed bundles traces the failing call to managedWorktrees.pending.create(...): serialization fails before the call can be sent.

    Suspected serialization trigger — not yet confirmed in the live payload

    The Worktree start request includes openingPromptForHistory.document, produced by the editor's toJSON(). The bundled ProseMirror implementation can retain null-prototype attribute objects in this output, while the bundled RPC serializer rejects null-prototype objects. Formatting such an object for its error message also throws, resulting in the exact fallback message above.

    An isolated reproduction using the actual serializer extracted from the installed app and a synthetic document containing null-prototype attributes produces the exact error. JSON-normalizing that document makes the same serialization test pass while preserving the prompt. The actual failing property in the live request was not inspected, so this is a code-backed hypothesis rather than a confirmed field-level root cause.

    Suggested investigation: normalize the editor document to ordinary JSON records before this RPC boundary, or explicitly support null-prototype records in the serializer. Avoid JSON-normalizing the entire request if other fields intentionally carry special RPC values.

    Update timeline

    • October 20 main-process logs reference the previous Windows package and contain successful Worktree chat creation, including a ready event at 18:30:43Z. No instance of this exact serialization error was found in those logs.
    • On October 21, the first of 15 matching errors appears at 05:01:58Z, in a main-process log for the new Windows package.
    • The user reports the feature worked before installing the update that morning. An earlier-version comparison run was not possible because the old installation is no longer available.

    This strongly suggests a regression, but the timing alone does not establish causality.

    Verified workaround

    Create a new chat in the local Git project with Local first. Then ask that chat to create a managed worktree of master using the app's worktree tool and use its returned workspace path for all subsequent project operations.

    This was tested end to end: exactly one managed worktree was created and attached successfully, no setup error was reported, HEAD matched local master, and git status --short was clean. The source checkout and existing worktrees were not changed.

  3. Jonatanmdez commented on Oct 21, 2026

    @Jonatanmdez

    Also reproduced on Linux (EndeavourOS, x86_64), Codex Desktop 26.1016.51333, on 21 October 2026.

    Starting a new chat in Worktree mode fails with:

    Error starting chat
    Cannot serialize value: (couldn't stringify value)
    

    Local mode works. I regularly used Worktree mode before the latest update. The failure occurs in two existing Git projects.

    The local desktop logs confirm repeated [Composer] submit failed errors with errorName=TypeError and mode=worktree. Example failure times are 2026-10-21T06:07:11.765Z and 2026-10-21T06:07:21.408Z.

    Relevant stack frames, with local paths removed:

    at e.devaluateImpl (app-shared-82319158cc03.js:323:30467)
    at e.devaluate (app-shared-82319158cc03.js:323:30104)
    at Eft.sendCall (app-shared-82319158cc03.js:323:49308)
    at BYi (app-initial-cee63c8dd6e9.js:2519:8331)
    at LYi (app-initial-cee63c8dd6e9.js:2519:6602)
    

    Inspection of the installed app bundle traces BYi to managedWorktrees.pending.create(...). The serializer fails before that call can be sent. The exact failing field in the live request has not been identified.

    This adds a Linux case with the same error and worktree creation call as the Windows case above. An update regression is suspected; I have not tested an older app version for comparison.

  4. seye11 commented on Oct 21, 2026

    @seye11

    Adding an independent macOS reproduction and client-side diagnostic findings. Local paths and session identifiers have been removed.

    Environment and persistence across restarts

    • Desktop app version: 26.1016.51333, internal build 21161.
    • Six matching Composer submission failures were found between 2026-10-21T06:37:42Z and 06:38:55Z, across two desktop app processes before and after a restart. Restarting did not resolve the issue.
    • All matching records have errorName=TypeError, mode=worktree, and followUp=none.

    Confirmed failure location

    Relevant stack frames, with local installation paths removed:

    TypeError: Cannot serialize value: (couldn't stringify value)
      at e.devaluateImpl (app-shared-60f4bb85435f.js:323:30469)
      at e.devaluateImpl (app-shared-60f4bb85435f.js:323:30678)
      at e.devaluateImpl (app-shared-60f4bb85435f.js:323:30786)
      at e.devaluate (app-shared-60f4bb85435f.js:323:30106)
      at Tft.sendCall (app-shared-60f4bb85435f.js:323:49310)
      at SXi (app-initial-f3e281fb9a71.js:2519:8330)
      at yXi (app-initial-f3e281fb9a71.js:2519:6601)
    

    Read-only inspection of the installed bundle maps SXi to managedWorktrees.pending.create(...). The failure occurs while serializing the client-side RPC arguments, before this worktree creation call can be sent.

    Offline validation and limits of the diagnosis

    An isolated test using the original QJ type classifier extracted from the installed bundle and its corresponding error-construction logic produced these results:

    • An ordinary object {} is classified as object.
    • Object.create(null) is classified as unsupported; string conversion also throws, producing the exact error: Cannot serialize value: (couldn't stringify value).
    • An ordinary custom class instance is classified as unsupported, but produces a different message: Cannot serialize value: [object Object].

    These findings are consistent with the null-prototype-object hypothesis in the Windows report above. The actual failing field in the live request was not captured. This investigation therefore does not establish the actual object's prototype or field path, and does not confirm that openingPromptForHistory.document is the live trigger on this Mac.

    Suggested investigation: report the field path and type of the unsupported value at the pending.create DTO boundary, without logging business content. Once identified, normalize only the relevant data records and add a regression test for nested null-prototype objects. Avoid blindly JSON-normalizing the entire request, since other fields may intentionally contain special RPC values.

    The Local-mode workaround has not been tested end to end on this machine, and no earlier-version comparison was performed. This comment contains only a sanitized diagnostic summary; no raw logs, project source code, credentials, or business prompts have been uploaded.

  5. wongsean commented on Oct 21, 2026

    @wongsean

    Additional macOS evidence: rich document attributes at the Worktree IPC boundary

    This reproduces on macOS with Codex desktop 26.1016.51333, build 21161, release channel prod, observed on October 21, 2026. The configured updater reports up_to_date.

    Observed behavior: start a new chat in an existing Git project, select Worktree, type a short ordinary text message without attachments or references, and send it. The chat fails with:

    Error starting chat
    Cannot serialize value: (couldn't stringify value)
    

    The expected result is a new Worktree chat that accepts the prompt. The failure was observed in two independent repositories, with ten matching failures across two app processes. The user verified that creating a new Local chat works.

    Additional diagnostic evidence

    Read-only inspection of the installed build corroborates the Windows report above and narrows the mechanism:

    1. Prompt history receives openingPromptForHistory.document = editorDocument.toJSON().
    2. The main composer enables the rich-text schema. This schema adds start and end attributes, with undefined defaults, to non-text nodes including the root doc node.
    3. The bundled ProseMirror attribute constructors use Object.create(null). Its Node.toJSON() retains the attribute dictionary instead of normalizing its prototype. The default keys are enumerable, so the root document includes attrs even for ordinary text.
    4. The Worktree start path passes this history through managedWorktrees.pending.create(...). The RPC serializer accepts ordinary record objects with Object.prototype, but rejects null-prototype records. Attempting to format that unsupported value also throws, producing the (couldn't stringify value) fallback.

    Using the installed serializer and installed attribute/JSON functions in an offline reproduction yields the exact error at:

    args[0].openingPromptForHistory.document.attrs
    

    The recursive stack pattern is also consistent: three object-recursion frames and one array-recursion frame. This is a field-level reproduction in an offline harness, not a capture of the failed live request. The live trigger therefore remains a strongly supported diagnosis rather than directly observed payload evidence.

    One detail that can hide the problem during investigation: JSON.stringify(attrs) produces {} because both enumerable values are undefined; JSON logs therefore conceal the original prototype and attribute keys.

    Candidate fix and offline validation

    Normalizing only the document with structuredClone(document) before the Worktree IPC boundary makes the same installed serializer accept the reproduced payload. Compared with a JSON stringify/parse round trip, this also preserves enumerable undefined attributes.

    This small independent example illustrates the relevant object behavior; it is not a replacement for the app's serializer:

    const attrs = Object.assign(Object.create(null), {
      start: undefined,
      end: undefined,
    });
    const document = { type: "doc", attrs };
    const normalized = structuredClone(document);
    
    console.assert(Object.getPrototypeOf(document.attrs) === null);
    console.assert(Object.getPrototypeOf(normalized.attrs) === Object.prototype);
    console.assert(Object.hasOwn(normalized.attrs, "start"));
    console.assert(normalized.attrs.start === undefined);
    console.assert(JSON.stringify(document) === JSON.stringify(normalized));

    Ten offline checks passed for a candidate that clones only openingPromptForHistory.document, covering the original failure, successful serialization after normalization, unchanged document JSON, retained enumerable undefined keys, nested record normalization, unchanged original objects, preserved non-document history fields, absent/plain history cases, and nested JSON attribute values. A temporary copy of the complete modified JavaScript asset also passed a syntax check.

    Suggested maintainer action: normalize document records at this IPC boundary, or explicitly support null-prototype records in the serializer, and add a regression test using the rich schema's default root-document attributes.

    Validation boundary: no patch was applied to the installed/running application. A successful real Worktree chat after a fix remains unverified, and this investigation does not establish which release introduced the behavior.

  6. yuquan2co-maker commented on Oct 21, 2026

    @yuquan2co-maker

    Also reproduced on macOS with Codex desktop 26.1016.51333 (build 21161).

    In-app feedback ID: 01a15d21-638a-7262-a8d9-64c677ec94db

    For the affected local Git project, starting a new chat with New worktree enabled repeatedly fails with:

    Cannot serialize value: (couldn't stringify value)
    

    The same error persisted after restarting the app. Local diagnostics show a client-side TypeError during RPC serialization in the worktree startup path (managedWorktrees.pending.create). The specific unsupported field has not been identified.

    Confirmed workaround: In the new-chat settings (gear icon), turn off New worktree (Chinese UI: “新建工作树”), 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 for this setting change.

    This confirms the workaround for my affected project; I have not tested whether all projects are affected.

  7. ZhangLiangchen commented on Oct 21, 2026

    @ZhangLiangchen
    Author

    Confirmed on macOS with Codex desktop app 26.1016.51333: the failing new chats were started with Worktree enabled. Disabling Worktree allows a new chat to start successfully.

    This reproduces the Worktree-versus-Local distinction reported above on another platform. The original failure occurred on the first message, including a minimal plain-text message, in new chats in both new and existing projects.

    Local mode is a confirmed workaround on my Mac; the Worktree startup defect itself remains unresolved. This does not establish the underlying serialization cause.

  8. jtatum commented on Oct 21, 2026

    @jtatum

    +1 on macOS 26.6.2, Codex 26.1016.51333. New Worktree chats fail every time, even with plain English text: 11 failures, all mode=worktree. Local works. I traced it independently and reached the same conclusion as @wongsean: the failing value is the null-prototype openingPromptForHistory.document.attrs, which comes from the rich-text schema's start/end attrs.

    One extra detail for the fix: the serializer throws synchronously inside sendCall, so managedWorktrees.pending.create(...) throws before its .catch(...) is attached. The TypeError therefore skips the pending-worktree failure handler and escapes into the Worktree submit handler (Object.z [as submit] in the stack). That's why it surfaces as "Error starting chat" instead of a logged pending-worktree failure. Normalizing the document fixes this instance. But nothing at that call site guards against a serialization throw, so any other non-serializable field added to the payload later would fail the same way.

  9. remhentiebra commented on Oct 21, 2026

    @remhentiebra

    Same Issue:

    Summary

    In the Codex desktop app on macOS, sending the first message in a new chat fails with:

    Error starting chat
    Cannot serialize value: (couldn't stringify value)
    
    Image

    Version and environment

    • Codex desktop app: 26.1016.51333
    • OS: macOS Golden Cate 27.0.1
    • Observed: October 21, 2026

    Steps to reproduce

    Same as above

    Actual behavior

    same as above

    Expected behavior

    same as above

    Scope and diagnostics

    • same as above
    • codex-cli still works though

    No project source code, credentials, or private logs are included in this report.

  10. ZhangLiangchen commented on Oct 21, 2026

    @ZhangLiangchen
    Author

    Independent macOS investigation: isolated reproduction and regression results

    Following my Worktree/Local confirmation above, I completed a read-only investigation of my installed Codex desktop 26.1016.51333 (build 21161). Relevant logs contain 8 Worktree serialization errors. No installed application files, settings, project files, or existing sessions were changed.

    Reproduction and candidate fix

    Pure functions extracted from the installed application independently reproduce the same error. The editor-generated document contains null-prototype attrs records at both the root and nested paragraph nodes, which the actual serializer rejects.

    Normalizing only the root attrs is insufficient: serialization then fails at a nested paragraph. A candidate that normalizes only openingPromptForHistory.document recursively using structuredClone passes the isolated tests while preserving enumerable undefined attributes and leaving other RPC/history fields untouched. This corroborates the earlier community analysis; it is not an end-to-end application fix.

    Error-handling boundary

    A separate isolated check using the extracted call method confirms that serialization can throw synchronously before .catch(TXi) is attached to the return value of managedWorktrees.pending.create(...). In that case the local send count remains zero and that particular failure handler is not reached. A Promise-rejection control does reach the handler. This should be considered separately from document normalization; changing error handling alone would not make an unsupported document serializable.

    Validation results

    • node offline/repro.cjs: reproduces the original serialization failure using extracted functions and synthetic document input.
    • node --test offline/*.test.cjs: 27/27 passed.
    • python3 offline/verify-extraction.py: 189/189 extraction and static-evidence checks passed. These are provenance/static checks, not 189 end-to-end tests.

    Coverage includes nested attributes, retained undefined keys, ordinary documents, original-object nonmutation, preservation of non-document RPC fields, frozen inputs, explicit attributes, shared references, and synchronous-throw versus Promise-rejection behavior.

    Limits and suggested next step

    This evidence consists of installed-build static inspection and isolated execution. I did not capture the live failing request, patch the installed/running app, or verify successful Worktree startup after a fix. It does not establish which release introduced the behavior.

    Please consider document-only normalization at the RPC boundary and regression coverage for both root and nested null-prototype attributes, alongside handling synchronous serialization failures appropriately. Raw logs, private filesystem paths, identifiers, project contents, and extracted application assets are intentionally omitted.

  11. rolandkakonyi commented on Oct 21, 2026

    @rolandkakonyi

    Also reproduced on macOS 26.7.1 with ChatGPT desktop 26.1016.51333, build 21161, across three Git projects and multiple app restarts.

    Enabling New worktree causes the same serialization error. Disabling it allows the failed prompt to send successfully; verified in two projects.

    Submitted in-app feedback with ChatGPT diagnostic logs:
    no-active-thread-01a15d5e-f686-7973-a55a-63970482f6ab

  12. costleya commented on Oct 21, 2026

    @costleya

    no-active-thread-01a15d70-1f5c-7b52-a770-ea28aa51ef71

  13. Rand-Hsu commented on Oct 21, 2026

    @Rand-Hsu

    Adding another macOS report on desktop version 26.1016.51333 (build 21161).

    In a Git project on a connected remote host:

    • Starting a new chat with New worktree enabled fails with Cannot serialize value: (couldn't stringify value).
    • A chat using the existing checkout works. This comparison was confirmed by the user.
    • Worktree-mode submission continues to fail after direct chat succeeds.

    Read-only inspection and an isolated reproduction using functions from the installed build support the document-attribute serialization diagnosis discussed above: the editor's JSON document retains null-prototype attribute records, which the RPC serializer rejects. Normalizing the history document makes the isolated serialization test pass.

    Verification limits: the failing live payload was not captured, the installed app was not patched, and successful Worktree-mode chat creation after a fix has not been verified. Creating a managed worktree from an existing chat has not yet been tested on this machine.

    Please provide a signed desktop fix and regression coverage for ordinary text prompts and nested editor attributes at the worktree RPC boundary.

    This report intentionally omits hostnames, project names, filesystem paths, account/session identifiers, screenshots, raw logs, credentials, and project contents.

  14. 59 remaining items

  15. cscrippen commented on Oct 22, 2026

    @cscrippen

    29. Update: this Worktree issue is now resolved for me in Codex desktop version 26.1016.61520. If you’re still affected, please update to that version.

    Confirmed, updating to Version 26.1016.61520 has resolved the this for me as well, thank you so much for the update!

  16. luworks commented on Oct 22, 2026

    @luworks

    Confirming I’m affected as well. On Codex desktop 26.1016.51333, submitting a new chat with Worktree enabled fails with Cannot serialize value: (couldn't stringify value). The offending value is openingPromptForHistory.document.attrs, a null-prototype object with start and end keys.

  17. aduca98 commented on Oct 22, 2026

    @aduca98

    +1

  18. SavageBoyz commented on Oct 22, 2026

    @SavageBoyz

    +1

  19. ZhangLiangchen commented on Oct 22, 2026

    @ZhangLiangchen
    Author

    Update from the reporter: after updating to Codex 26.1016.61520, Worktree startup now works normally. Closing this issue as completed based on that confirmation.

  20. fivbak commented on Oct 22, 2026

    @fivbak

    +1

  21. DengYiping commented on Oct 22, 2026

    @DengYiping

    Additional macOS reproduction on Codex desktop 26.1016.51333 (build 21161), observed October 22, 2026.

    Starting a new chat in Worktree mode against an existing local branch fails with:

    [Composer] submit failed
    errorName=TypeError
    errorMessage="Cannot serialize value: (couldn't stringify value)"
    mode=worktree followUp=none
    

    Local desktop logs show five matching failures across two repositories and two app process launches on October 22. The latest was at 12:45:34.085Z. The intended branch exists locally and remotely, the source checkout is clean, and the branch is not checked out in another registered worktree. No Git worktree creation error was identified for this failed submission.

    Sanitized relevant stack frames:

    at e.devaluateImpl (app-shared-60f4bb85435f.js:323:30469)
    at e.devaluateImpl (app-shared-60f4bb85435f.js:323:30678) [three object recursion frames]
    at e.devaluateImpl (app-shared-60f4bb85435f.js:323:30786)
    at e.devaluate (app-shared-60f4bb85435f.js:323:30106)
    at Tft.sendCall (app-shared-60f4bb85435f.js:323:49310)
    at SXi (app-initial-f3e281fb9a71.js:2519:8330)
    at yXi (app-initial-f3e281fb9a71.js:2519:6601)
    

    Read-only inspection of the installed bundles and an isolated reproduction independently corroborate the earlier diagnosis here: the worktree composer passes openingPromptForHistory.document from the editor's toJSON() into managedWorktrees.pending.create(...); ProseMirror retains null-prototype attribute records, while the RPC serializer rejects them. Using the installed attribute constructor and serializer against a synthetic request reproduces the exact error and recursion depth. JSON-normalizing the document makes that isolated test pass. The original live rejected field was not captured, so this is corroborating source/reproduction evidence rather than an independent live-payload confirmation.

    I see this issue was closed after users confirmed a fix in 26.1016.61520. This report is explicitly for the older 26.1016.51333 build; I have not tested the newer build and am not requesting a reopen or claiming a regression in it.

    No private project/branch names, local paths, prompt contents, credentials, or raw logs are included. No installed app files or worktrees were modified during this investigation.

  22. redfox05 commented on Oct 22, 2026

    @redfox05

    I can confirm under Version 26.1016.61520 this does appear fixed for me on macOS. Let's see what others find for them.

  23. mgscox commented on Oct 22, 2026

    @mgscox

    +1

    I asked Claude to investigate;

    This is a bug in the Codex desktop app, not your setup. The app updated itself yesterday at 17:39 (ChatGPT.app 26.1016.51333). Since then, every new chat you start in worktree mode fails the moment you send it.
    
    **What the logs show**  (`~/Library/Logs/com.openai.codex/2026/10/22/):
    
    - There were 4 failures today: 2 at 07:13 and 2 at 13:43. All were in sporades and all had mode=worktree.
    - The failure happens before anything reaches the Codex backend. When you press send, the app passes a “pending worktree” record - from the window to its own background process (managedWorktrees.pending.create). The app’s serializer hits a nested value it can’t handle and throws Cannot serialize value.
    - Nothing in your ~/.codex/config.toml or other state is involved. The value comes from the app’s own code.
    

    Do we get 2x resets if OpenAI updates have a negative impact, rather than a positive one, during October? :)

  24. brianlaughlin commented on Oct 22, 2026

    @brianlaughlin

    Follow-up to my Windows report above (#issuecomment-6319712685): today's local desktop logs now confirm the previously uncertain mode.

    • Observed October 22, 2026 on Windows 11 Home x64, build 26300.
    • Running app: 26.1016.51333, internal build 21161, channel prod; installed Windows package remains OpenAI.Codex_26.1016.6573.0_x64.
    • Two matching [Composer] submit failed records at 2026-10-22T16:28:56.691Z and 2026-10-22T16:29:13.797Z, both for the same existing Git project.
    • Both explicitly record errorName=TypeError, mode=worktree, followUp=none, and Cannot serialize value: (couldn't stringify value).
    • Sanitized stack excerpt:
    at e.devaluateImpl (app-shared-9cc135f1bdc1.js:323:30469)
    at e.devaluateImpl (app-shared-9cc135f1bdc1.js:323:30678)
    at e.devaluateImpl (app-shared-9cc135f1bdc1.js:323:30786)
    at e.devaluate (app-shared-9cc135f1bdc1.js:323:30106)
    at Tft.sendCall (app-shared-9cc135f1bdc1.js:323:49310)
    at SXi (app-initial-2b6b8063022d.js:2519:8330)
    at yXi (app-initial-2b6b8063022d.js:2519:6601)
    at Object.z [as submit] (app-primary-98d23d806dbd.js:16:230978)
    

    The app's supported update-check tool, invoked during this investigation, returns status=up_to_date for this installed version/channel. I see the reporter and others confirmed resolution in 26.1016.61520; this is evidence that the older affected Windows installation still has no eligible update through its configured updater, not a regression report against the fixed version or a request to reopen.

    I have recommended disabling New worktree as the documented community workaround, but have not performed a controlled Local-mode submission on this installation. No installed app files, project files, caches, or saved chats were changed. No raw logs, private paths, project names/content, prompts, credentials, or session identifiers are included.

  25. bruce-moneylane commented on Oct 22, 2026

    @bruce-moneylane

    Additional sanitized reproduction and workaround verification for macOS desktop 26.1016.51333, build 21161.

    I see the reporter confirmed resolution in 26.1016.61520. This concerns the older affected build only, not a regression claim against the newer release or a request to reopen.

    Observed behavior

    • New-worktree chat submission fails with Cannot serialize value: (couldn't stringify value), including with plain text and after restarting.
    • The same prompt starts successfully with new-worktree creation disabled.
    • The supported create_thread tool with an explicit worktree target bypassed the composer failure and created a separate checkout. After skipping an unrelated dependency-setup failure, the new chat completed its first turn and four read-only Git checks successfully. The temporary chat was then archived.
    • Existing running tasks were not restarted or modified.

    Source tracing and isolated reproduction

    Inspection of the installed JavaScript shows the composer supplies openingPromptForHistory.document from the editor's toJSON() to managedWorktrees.pending.create(...). The editor schema adds start/end attributes to non-text nodes. ProseMirror constructs attribute maps with a null prototype and retains those maps in toJSON(). The installed RPC serializer rejects null-prototype objects; interpolating that rejected value into the error message also throws, explaining the fallback text.

    An isolated replay of the relevant installed attribute-map, node-serialization, and RPC-serialization functions reproduced the exact error and matching recursion pattern. JSON-normalizing prompt history made the replay pass. The original live rejected field was not instrumented/captured; this is static tracing plus isolated reproduction evidence.

    Generic demonstration of the problematic value shape (not the full application serializer):

    const attrs = Object.assign(Object.create(null), {
      start: undefined,
      end: undefined,
    });
    const history = {
      plain: "hello",
      document: { type: "doc", attrs },
    };
    
    console.assert(Object.getPrototypeOf(history.document.attrs) === null);
    try {
      String(history.document.attrs);
    } catch (error) {
      console.assert(error instanceof TypeError);
    }
    
    const normalized = JSON.parse(JSON.stringify(history));
    console.assert(
      Object.getPrototypeOf(normalized.document.attrs) === Object.prototype
    );

    Proposed boundary fix / regression coverage

    Normalize the JSON-shaped prompt-history document before sending it across the pending-worktree RPC boundary, e.g.:

    openingPromptForHistory: history == null
      ? history
      : JSON.parse(JSON.stringify(history))

    This normalization passed the isolated replay; it was not applied to installed application files. A dedicated plain-object conversion is another option. Suggested regression cases: plain text, multiline text, formatted text, and mention nodes in new-worktree submission.

    No private project names, repository identifiers, paths, user prompts, credentials, session IDs, screenshots, or raw logs are included.

  26. brittanyellich commented on Oct 22, 2026

    @brittanyellich

    Additional macOS reproduction, observed October 22, 2026:

    • OS: macOS 27.0.1 (build 26A434).
    • Desktop app version: not collected.
    • In an existing Git project, starting a new chat in Worktree mode fails, even with the plain-text prompt test.
    • Switching from Worktree to Local allows the chat to start (confirmed by the user).
    • The exact value that cannot be serialized and the root cause remain unknown. Other repositories have not been tested in this investigation.

    Steps to reproduce

    1. Select the affected Git project in the desktop app.
    2. Start a new chat with Worktree selected.
    3. Submit test.
    4. Observe Error starting chat — Cannot serialize value: (couldn't stringify value).
    5. Switch to Local and retry: the chat starts successfully.

    Expected: Worktree mode creates the worktree and starts the chat.

    Sanitized diagnostics

    Local desktop logs contained four matching [Composer] submit failed entries. The screenshot occurrence was at 2026-10-22T18:40:18.575Z (11:40:18 AM PDT). All four recorded mode=worktree, followUp=none, and errorName=TypeError.

    TypeError: Cannot serialize value: (couldn't stringify value)
        at e.devaluateImpl (app://-/assets/app-shared-60f4bb85435f.js:323:30469)
        at e.devaluateImpl (app://-/assets/app-shared-60f4bb85435f.js:323:30678)
        at e.devaluateImpl (app://-/assets/app-shared-60f4bb85435f.js:323:30678)
        at e.devaluateImpl (app://-/assets/app-shared-60f4bb85435f.js:323:30678)
        at e.devaluateImpl (app://-/assets/app-shared-60f4bb85435f.js:323:30786)
        at e.devaluate (app://-/assets/app-shared-60f4bb85435f.js:323:30106)
        at Tft.sendCall (app://-/assets/app-shared-60f4bb85435f.js:323:49310)
        at e.call (app://-/assets/app-shared-60f4bb85435f.js:323:44320)
        at SXi (app://-/assets/app-initial-f3e281fb9a71.js:2519:8330)
    

    Related reports #55823 (Linux) and #55827 (Windows) describe the same Worktree failure and Local workaround. A shared root cause has not been confirmed.

    No source code, personal filesystem paths, credentials, or full logs are included.

  27. wookingwoo commented on Oct 23, 2026

    @wookingwoo

    Confirmed fixed on Windows with Codex 26.1016.62342 (released October 22, 2026).

    After updating, I can now start a new chat directly in a worktree without encountering the Cannot serialize value: (couldn't stringify value) error.

    Thanks for the fix!

  28. jorgedcb commented on Oct 30, 2026

    @jorgedcb

    Additional macOS occurrence on October 30, 2026, on the older affected desktop version 26.1016.51333, internal build 21161.

    Starting a new project chat in Worktree mode fails with:

    Error starting chat
    Cannot serialize value: (couldn't stringify value)
    

    Local desktop diagnostics show seven matching [Composer] submit failed entries across two app processes, including attempts after a restart. All seven have errorName=TypeError, mode=worktree, and followUp=none.

    Relevant sanitized stack frames:

    at e.devaluateImpl (app-shared-60f4bb85435f.js:323:30469)
    at e.devaluate (app-shared-60f4bb85435f.js:323:30106)
    at Tft.sendCall (app-shared-60f4bb85435f.js:323:49310)
    at SXi (app-initial-f3e281fb9a71.js:2519:8330)
    

    Inspection of the installed bundle maps SXi to managedWorktrees.pending.create(...). The exact rejected field in the live request has not been captured.

    This adds an occurrence on the older affected build. A newer release has not been tested on this machine, and this is not a regression claim against the reported fixed releases or a request to reopen. Local/current-checkout mode has not yet been verified on this machine.

    No email address, project name, repository identifier, personal filesystem path, prompt contents, session identifier, screenshot, or full logs are included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugsession

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions