Bug: BadRequestError after Computer Use failure breaks entire session

Open 💬 0 comments Opened Jun 18, 2026 by 785773272-collab

Steps to Reproduce

  1. Start a new Codex Desktop session (version 0.140.0-alpha.19)
  2. Ask the agent to use the Computer Use plugin
  3. The Computer Use plugin fails due to a permissions issue
  4. Agent switches to in-app browser and tries to continue
  5. After this point, every subsequent user message triggers a BadRequestError:

BadRequestError: OpenAIException - {"error":{"message":"Expecting property name enclosed in double quotes: line 1 column 2 (char 1)","type":"BadRequestError","param":null,"code":"400"}}

  1. The entire session is broken and must be abandoned - no user message can be processed

Expected Behavior

  • The session should recover gracefully after a plugin failure
  • Subsequent user messages should be handled normally

Actual Behavior

  • After the Computer Use failure, all subsequent requests return a 400 BadRequestError
  • The error message suggests malformed JSON being sent to the OpenAI API
  • This is not a permissions issue (which would be 403/401) - it is a JSON serialization bug

Root Cause Hypothesis

  • The agent serialization of conversation context into JSON payload appears to be corrupted after the Computer Use failure
  • The line 1 column 2 error indicates the entire request body structure is broken from the start
  • Possible cause: JSON.stringify is not being used to serialize messages

Environment

  • Codex Desktop version: 0.140.0-alpha.19
  • Model: agnes-2.0-flash
  • OS: Windows

View original on GitHub ↗