Codex extension 0.4.69 doesn't work with code-server (persisted-atom sync failure)

Resolved 💬 14 comments Opened Feb 2, 2026 by sanchomuzax Closed Feb 12, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

Environment

  • code-server version: 4.107.1 (VSCode 1.107.1)
  • Codex extension version: 0.4.69 (broken), 0.4.68 (works)
  • OS: Debian 13 / Raspberry Pi 5 (ARM64)
  • Node.js: v20.19.6

Problem

Codex extension 0.4.69 fails to load in code-server with this error in logs:
[error] [persisted-atom] host did not respond to sync request; continuing with legacy state only

The sidebar shows a loading spinner indefinitely.

Workaround

Downgrading to version 0.4.68 resolves the issue:

code-server --install-extension openai.chatgpt@0.4.68
Additional context
The extension activates successfully
Login works (verified via CLI)
The issue is specific to code-server, desktop VSCode works fine

---
Sources:

View original on GitHub ↗

14 Comments

etraut-openai contributor · 5 months ago

Thanks for the bug report. I'm kind of surprised this ever worked. We don't test for this use case. I'll see if it's easy to fix.

not-Boris · 5 months ago

+1; just getting this today after updating to 0.4.69 using code-server

aformusatii · 5 months ago

I’m experiencing the same issue on v0.4.71. I’ve downgraded to v0.4.68 and will stay on that version until a fix is released.
Thanks a lot for your work on this!

VTSTG233 · 5 months ago

+1 I just discovered there's a related issue, which caused me to accidentally create a new topic, as I couldn't find any other posts with the same problem. I searched again and found that it already exists. Hope this issue is resolved soon, thank you.

noskillahh · 5 months ago

Unfortunate timing for this to break, with gpt-5.3-codex now being available. Code-server is my primary IDE.

Same issue for me, window doesnt load in any version after v0.4.68.

BattermanZ · 5 months ago

Same issue as well for me!

huyleict · 5 months ago

code-server: v4.108.2
Code: 1.108.2
Codex extension version: 0.4.69, v0.4.71
Same issue for me.

guagua0 · 5 months ago

Only Code-server is not working; VS Code works normally.

WhammyLeaf contributor · 5 months ago

Having the same problem. Sorry for raising a duplicate issue 😄

seo-rii · 5 months ago

The problem occurs because of the enhanced verification of webview message. Since 0.4.69, codex backend(node) verifies webview message with origin, which is incompatible with code-server.
I made a simple patch script with codex to replace getTrustedMessageForView with non-verification function. This works well with 0.4.69-0.4.73, but maybe this can be vulnerable, so use with caution. You should install nodejs to run this script.

bash <(curl -sL https://gist.githubusercontent.com/seo-rii/99efd0cb50e74cad4ce2ca6978919b6b/raw/codex-patch.sh)

The raw content is here :

#!/usr/bin/env bash
set -euo pipefail

EXT_ROOT="${HOME}/.local/share/code-server/extensions"
VERSION="${1:-}"

if [ -z "$VERSION" ]; then
  candidates=()
  for dir in "${EXT_ROOT}"/openai.chatgpt-*-universal; do
    [ -d "$dir" ] || continue
    base="${dir##*/}"
    ver="${base#openai.chatgpt-}"
    ver="${ver%-universal}"
    [ -n "$ver" ] && candidates+=("$ver")
  done
  if [ ${#candidates[@]} -eq 0 ]; then
    echo "No openai.chatgpt-* extension found under $EXT_ROOT" >&2
    exit 1
  fi
  VERSION="$(printf '%s\n' "${candidates[@]}" | sort -V | tail -n1)"
fi

# Only patch versions newer than 0.4.68
if [ "$(printf '%s\n' "0.4.68" "$VERSION" | sort -V | tail -n1)" = "0.4.68" ]; then
  echo "Version $VERSION is <= 0.4.68; patch not required."
  exit 0
fi

EXT_DIR="${EXT_ROOT}/openai.chatgpt-${VERSION}-universal"
ASSET_DIR="${EXT_DIR}/webview/assets"

if [ ! -d "$EXT_DIR" ]; then
  echo "Extension dir not found: $EXT_DIR" >&2
  exit 1
fi

if [ ! -d "$ASSET_DIR" ]; then
  echo "Assets dir not found: $ASSET_DIR" >&2
  exit 1
fi

shopt -s nullglob
JS_FILES=("$ASSET_DIR"/index-*.js)
if [ ${#JS_FILES[@]} -eq 0 ]; then
  echo "No index-*.js found in $ASSET_DIR" >&2
  exit 1
fi

for f in "${JS_FILES[@]}"; do

  # Create a backup once.
  if [ ! -f "$f.bak" ]; then
    cp "$f" "$f.bak"
  fi

  node - "$f" <<'NODE'
const fs = require('fs');
const path = process.argv[2];
if (!path || path === '-') {
  console.error('Missing target JS file path');
  process.exit(2);
}
const text = fs.readFileSync(path, 'utf8');

function replaceByName(src) {
  const fnName = 'function getTrustedMessageForView';
  const start = src.indexOf(fnName);
  if (start === -1) return null;
  const braceStart = src.indexOf('{', start);
  if (braceStart === -1) return null;
  let i = braceStart + 1;
  let depth = 1;
  while (i < src.length && depth > 0) {
    const ch = src[i];
    if (ch === '{') depth++;
    else if (ch === '}') depth--;
    i++;
  }
  if (depth !== 0) return null;
  const end = i;
  const replacement =
    'function getTrustedMessageForView(rt){const ut=rt.data;return ut==null||typeof ut!="object"||!hasStringType(ut)?null:ut}';
  return src.slice(0, start) + replacement + src.slice(end);
}

function replaceByPattern(src) {
  const marker = 'origin.startsWith';
  let from = 0;
  while (true) {
    const idx = src.indexOf(marker, from);
    if (idx === -1) return null;
    from = idx + marker.length;

    // Find nearest function start before marker.
    let fnStart = src.lastIndexOf('function', idx);
    while (fnStart !== -1) {
      const before = fnStart === 0 ? '' : src[fnStart - 1];
      if (!/[A-Za-z0-9_$]/.test(before)) break;
      fnStart = src.lastIndexOf('function', fnStart - 1);
    }
    if (fnStart === -1) continue;

    const braceStart = src.indexOf('{', fnStart);
    if (braceStart === -1) continue;
    let i = braceStart + 1;
    let depth = 1;
    while (i < src.length && depth > 0) {
      const ch = src[i];
      if (ch === '{') depth++;
      else if (ch === '}') depth--;
      i++;
    }
    if (depth !== 0) continue;
    const fnEnd = i;
    const fnText = src.slice(fnStart, fnEnd);
    if (!fnText.includes(marker) || !fnText.includes('.data')) continue;

    const nameMatch = fnText.match(/function\s+([A-Za-z0-9_$]+)\s*\(/);
    const paramMatch = fnText.match(/function\s+[A-Za-z0-9_$]+\s*\(([^)]*)\)/);
    if (!nameMatch || !paramMatch) continue;
    const fnName = nameMatch[1];
    const param = (paramMatch[1] || 't').split(',')[0].trim() || 't';

    const helperMatch = fnText.match(/\|\|!([A-Za-z0-9_$]+)\(/);
    const helper = helperMatch ? helperMatch[1] : null;
    const helperExpr = helper
      ? `!${helper}(i)`
      : '!(i.type&&typeof i.type=="string")';
    const replacement = `function ${fnName}(${param}){const i=${param}.data;return i==null||typeof i!="object"||${helperExpr}?null:i}`;

    return src.slice(0, fnStart) + replacement + src.slice(fnEnd);
  }
}

let updated = replaceByName(text);
if (updated == null) updated = replaceByPattern(text);

if (updated == null) {
  console.log('skip (no origin filter found):', path);
  process.exit(0);
}

if (updated === text) {
  console.log('already patched:', path);
  process.exit(0);
}

fs.writeFileSync(path, updated, 'utf8');
console.log('patched', path);
NODE

done

echo "Done. Reload the Code-Server window (or restart) to apply."
shijie-oai contributor · 5 months ago

Hi all! We have just released version 0.4.74 which should contain fix for code server. Please let us know if you are still seeing the issue. Thanks!

DeviaVir · 5 months ago
Hi all! We have just released version 0.4.74 which should contain fix for code server. Please let us know if you are still seeing the issue. Thanks!

Confirmed the "spinner" problem is solved, however, did 5.3-codex disappear in 0.4.74?

edit: 5.3-codex just reappeared, thanks!

sanchomuzax · 5 months ago

Its wotking fine, thanks!

<img width="1261" height="860" alt="Image" src="https://github.com/user-attachments/assets/182ee7a5-e90b-4531-abe5-e87c005ac0f8" />

noskillahh · 5 months ago

Works for me too, great :)