Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (claude): disable codex update check on the image-gen exec path too

[._.]/ Adam Eivy71dcb1b297bc
diff --git a/server/services/imageGen/codex.js b/server/services/imageGen/codex.js
index b506fe7e11..e6a40d9ec4 100644
--- a/server/services/imageGen/codex.js
+++ b/server/services/imageGen/codex.js
@@ -32,6 +32,7 @@ import { autoCleanGeneratedImage } from '../../lib/imageClean.js';
import { imageGenEvents } from '../imageGenEvents.js';
import { broadcastSse, attachSseClient as attachSse, closeJobAfterDelay } from '../../lib/sseUtils.js';
import { killWithEscalation } from '../../lib/killWithEscalation.js';
+import { buildCodexStartupArgs } from '../../lib/providerModels.js';
import { IMAGE_GEN_MODE } from './modes.js';
// 20 minutes — built-in `image_gen` typically returns in 30–90s, but with the
@@ -187,6 +188,11 @@ export async function generateImage({
'exec',
'--skip-git-repo-check',
'--sandbox', 'workspace-write',
+ // Disable codex's startup update check (see buildCodexStartupArgs) so an
+ // image-gen call never spends startup time on the update-check round-trip
+ // or an unattended `brew upgrade`. Placed before the variadic `-i` so it
+ // can't be swallowed as an image path.
+ ...buildCodexStartupArgs(),
...(validInitImagePath ? ['-i', validInitImagePath] : []),
...(model ? ['-m', String(model)] : []),
...(validInitImagePath ? ['--'] : []),
diff --git a/server/services/imageGen/codex.test.js b/server/services/imageGen/codex.test.js
index 81b85a2b0a..9f471c3c52 100644
--- a/server/services/imageGen/codex.test.js
+++ b/server/services/imageGen/codex.test.js
@@ -90,6 +90,8 @@ describe('codex provider — generateImage', () => {
expect(args).toContain('--skip-git-repo-check');
expect(args).toContain('--sandbox');
expect(args).toContain('workspace-write');
+ // Codex's startup update check is disabled so image-gen never stalls on it.
+ expect(args).toEqual(expect.arrayContaining(['-c', 'check_for_update_on_startup=false']));
expect(args).toContain('-m');
expect(args).toContain('gpt-5.4');
// The prompt must be prefixed with `$imagegen ` so codex's bundled