← Commit history
Publish 0.1.32
6 files changed
+40−9
README.md+2@@ -116,6 +116,8 @@ Version 0.1.30 brings OpenAI's newest models to the held build. The good build b Version 0.1.31 fixes a hold that could not come back. When VS Code reinstalled the bad build over the held one, the guard tried to put the good build back every five seconds and failed each time: its watcher had been started from an editor terminal and still carried that window's `VSCODE_IPC_HOOK_CLI`, so after a reload every `code-server --install-extension` went to a dead socket. The guard now installs with the editor's `VSCODE_*` variables removed, so the good build is back within seconds. The "This Codex build is turned off" page also gained a Reload now button: it stays off while the good build is being put back and turns on once VS Code will load it, so one click replaces the Command Palette steps. +Version 0.1.32 fixes two ways a Codex conversation left waiting on an approval could lock Codex up. The guard now puts the good build back on disk at once, even mid-turn (a running backend keeps its own files), and only stops a bad build's backend once no turn is running; before, it waited for idle first, and a thread waiting on an approval for days meant it never swapped. And when only the engine differs (the newest-engine swap above, an optional upgrade), the runtime keeps using the running backend this extension already started and switches when it is idle, instead of refusing to start Codex at all.+ ### Skip the repeated IDE walkthrough Version 0.1.23 opens new Codex editor tabs directly at the prompt. The default ships through Hydrogen’s existing Codex package dependency; it preserves sign-in and permission prompts. See [diagnosis and verification](docs/CODEX-WALKTHROUGH.md). Already-open walkthrough tabs should be closed and reopened.
package.json+1−1@@ -4,7 +4,7 @@ "type": "app", "title": "Codex", "brief": "Codex in Adom Hydrogen: ecosystem setup, dock dashboard and live engineering demos.",- "version": "0.1.31",+ "version": "0.1.32", "description": "Codex in Adom Hydrogen with reusable CAD routing, electrical review, copper-ablation and narrated video skills, plus verified KiCad and Fusion demo progressions.", "org": "adom", "needs_sudo": false,
page.json+1−1@@ -4,7 +4,7 @@ "type": "app", "title": "Codex", "brief": "Codex in Adom Hydrogen: ecosystem setup, dock dashboard and live engineering demos.",- "version": "0.1.31",+ "version": "0.1.32", "hero": { "type": "image", "path": "screenshots/hero.png"
runtime/guard.py+13−3@@ -123,6 +123,12 @@ class Guard: try: return runtime.backend_idle(directory / 'server.sock'), metadata except Exception: return False, metadata + def retire_when_idle(self):+ """Stop a backend a bad build started, once no turn is running (else on a later pass)."""+ idle, backend = self.codex_idle()+ if not idle: return+ self.retire_backend(backend, self.state.pop('retire_from', []))+ def retire_backend(self, metadata, bad_versions): """A backend started by a bad build has that build's startup options; the good build's views could never attach to it. Stop it while it is idle."""@@ -141,6 +147,7 @@ class Guard: listing = self.bad_list() build = self.bad(listing, version) if not build:+ if self.state.get('retire_from'): self.retire_when_idle() self.state['last_good'] = version if self.state.get('held') == version: self.maybe_release(listing, metadata) if self.state.get('held') == version: self.newer_engine(version)@@ -149,8 +156,10 @@ class Guard: return good = self.state.get('last_good') or listing.get('fallback') if not good or self.bad(listing, good): return- idle, backend = self.codex_idle()- if not idle: return # a turn is running; try again on the next pass+ # Putting the good build back on disk never touches a running backend (it keeps running+ # from its own files), so do it now even mid-turn. Only stopping a backend the bad build+ # started waits for idle (retire_when_idle). ConfRoomROG 2026-10-31: one Codex thread sat+ # 'active, waitingOnApproval' for days, so 'wait for idle first' never swapped the build. code_server = shutil.which('code-server') or '/usr/lib/code-server/bin/code-server' # The watcher may have been started from an editor terminal and carry that window's # VSCODE_IPC_HOOK_CLI; after a reload the socket is dead and every install fails with@@ -165,7 +174,8 @@ class Guard: # Installing an exact version pins it, which is the hold we want until a fix ships. self.set_metadata(pinned=True, preRelease=False) self.state.pop('last_error', None)- self.retire_backend(backend, build.get('versions', []))+ self.state['retire_from'] = build.get('versions', [])+ self.retire_when_idle() self.state.update(held=good, held_since=time.time(), held_from=version, channel_pre_release=bool(metadata.get('preRelease')), release_checked=0) self.save()
runtime/runtime.py+18−2@@ -187,6 +187,16 @@ def compatible_backend(metadata, binary, directory): return False +def same_extension(metadata, binary):+ """Was the running backend started for the extension this editor runs now? Backends from+ before 0.1.32 carry no 'extension'; theirs is the bundled binary's own folder."""+ try: current = extension_version(bundled_binary())+ except Exception: return False+ recorded = metadata.get('extension')+ running = tuple(int(x) for x in recorded.split('.')) if recorded else extension_version(metadata.get('binary', ''))+ return bool(current) and running == tuple(current)++ def defer_upgrade(directory, metadata, binary, reason): record = {'state': 'deferred', 'reason': reason, 'protocolCompatible': True, 'runningBinary': metadata['binary'], 'requestedBinary': str(binary),@@ -262,7 +272,7 @@ def ensure_server(binary, args, client_guard=None): raise RuntimeError('Backend version differs; upgrade requires exclusive client ownership') try: fcntl.flock(client_guard, fcntl.LOCK_EX | fcntl.LOCK_NB) except BlockingIOError:- if compatible:+ if compatible or same_extension(metadata, binary): # Failed lock conversion may drop our shared lock on Linux. fcntl.flock(client_guard, fcntl.LOCK_SH) defer_upgrade(directory, metadata, binary, 'connected_views')@@ -275,7 +285,12 @@ def ensure_server(binary, args, client_guard=None): if not compatible: raise idle = False if not idle:- if compatible:+ # Same extension, only the engine choice differs (the newest-engine swap, an+ # optional upgrade): keep the running backend, the one this extension shipped or+ # already ran with, and switch when it is idle. ConfRoomROG 2026-10-31: a thread+ # waiting on an approval for a week kept the backend 'busy', and refusing here+ # left Codex dead, with no panel able to answer that approval.+ if compatible or same_extension(metadata, binary): fcntl.flock(client_guard, fcntl.LOCK_SH) defer_upgrade(directory, metadata, binary, 'backend_busy_or_unverified') return sock@@ -301,6 +316,7 @@ def ensure_server(binary, args, client_guard=None): start_new_session=True, close_fds=True, ) metadata = {'pid': process.pid, 'binary': str(binary), 'identity': identity(binary), 'args': args,+ 'extension': '.'.join(map(str, extension_version(bundled_binary()) or ())) or None, 'protocolFingerprint': protocol, 'socket': str(sock), 'started_at': time.time(), 'start_ticks': Path(f'/proc/{process.pid}/stat').read_text()
runtime/webview.cjs+5−2@@ -84,11 +84,14 @@ function showBlocked(webview, version, build, onDispose, guard) { const nonce = require('crypto').randomBytes(16).toString('base64'); webview.options = Object.assign({}, webview.options, { enableScripts: true }); webview.html = blockedPage(version, build, nonce);- const message = webview.onDidReceiveMessage((m) => { if (m && m.type === 'reload') reloadWindow(); });+ const message = typeof webview.onDidReceiveMessage === 'function'+ ? webview.onDidReceiveMessage((m) => { if (m && m.type === 'reload') reloadWindow(); })+ : { dispose() {} }; // Ready once VS Code will load another build on reload (the guard swaps it within seconds). const tick = () => { const next = registeredVersion();- if (next && next !== version && !badBuild(next)) webview.postMessage({ type: 'ready', version: next });+ if (next && next !== version && !badBuild(next) && typeof webview.postMessage === 'function')+ webview.postMessage({ type: 'ready', version: next }); }; const timer = setInterval(tick, 3000); setTimeout(tick, 300);