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

fix: clarify codex uses gpt-image-2 and surface session-id in lightbox

Adam Eivy344812c57a7d
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index f89f1cd254..9eac0d7507 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -2,9 +2,10 @@
## Added
-- Codex image gen: hi-res resolution presets (1024×1536, 1536×1024, 1536×1536) — gpt-image-1's native hi-res tier. Picking any ≥1536 size automatically appends a `(high quality)` hint to the codex prompt so the model renders at full fidelity instead of its 1024 default.
+- Codex image gen: hi-res resolution presets (1024×1536, 1536×1024, 1536×1536) — gpt-image-2's native hi-res tier. Picking any ≥1536 size automatically appends a `(high quality)` hint to the codex prompt so the model renders at full fidelity instead of its 1024 default.
- Image Gen batch mode: a `× N` count input next to the Generate button (async modes only — local + codex) queues N renders of the same prompt+resolution in a single submit. The first job streams its progress live; the remaining N-1 land in the server queue and surface as `+N queued`. Each job gets a fresh random seed by default so the batch produces variations, not duplicates.
- Media Lightbox full-screen mode (`F` key or top-right toggle): drops the modal's rounding and padding and lets the image fill the viewport. Swipe left/right (or arrow keys) navigates between gallery items; tap reveals the settings as a slide-in drawer. Layered Escape closes drawer → exits full-screen → closes the lightbox. The Seed row in the settings pane is now copyable for easy reuse in a remix.
+- Media Lightbox surfaces a `Codex session` row for gpt-image-2 renders (the session-id from the codex CLI banner, written to the image's sidecar metadata). Closest analogue to a seed for codex output — copyable for traceability. The Seed row now reads `n/a (gpt-image-2)` for codex images instead of hiding, so it's clear why no seed is present.
## Changed
diff --git a/client/src/components/media/MediaLightbox.jsx b/client/src/components/media/MediaLightbox.jsx
index 7aa4f8701e..c2dda40a2f 100644
--- a/client/src/components/media/MediaLightbox.jsx
+++ b/client/src/components/media/MediaLightbox.jsx
@@ -82,6 +82,7 @@ export default function MediaLightbox({
);
};
+ const isCodex = item.mode === 'codex';
const meta = [
['Model', item.modelId],
['Resolution', item.width && item.height ? `${item.width}×${item.height}` : null],
@@ -89,7 +90,11 @@ export default function MediaLightbox({
['Guidance', item.guidance],
['CFG', item.raw?.cfgScale ?? item.raw?.cfg_scale],
['Quantize', item.quantize],
- ['Seed', item.seed],
+ // Codex doesn't expose a seed; show "n/a" rather than hiding the row so
+ // it's clear why — and surface the codex session-id below as the closest
+ // unique-run identifier.
+ ['Seed', item.seed ?? (isCodex ? 'n/a (gpt-image-2)' : null)],
+ ['Codex session', item.codexSessionId],
['Frames', item.numFrames],
['FPS', item.fps],
['Created', item.createdAt && new Date(item.createdAt).toLocaleString()],
@@ -270,24 +275,27 @@ function SettingsPane({
{meta.length > 0 && (
<dl className="grid grid-cols-[auto,1fr] gap-x-3 gap-y-1">
- {meta.map(([k, v]) => (
- <div key={k} className="contents">
- <dt className="text-gray-500">{k}</dt>
- <dd className="text-gray-200 break-all flex items-center gap-1.5">
- <span>{String(v)}</span>
- {k === 'Seed' && (
- <button
- type="button"
- onClick={() => copy(String(v), 'Seed')}
- className="p-0.5 rounded text-gray-400 hover:text-white hover:bg-port-border/50"
- title="Copy seed"
- >
- <Copy className="w-3 h-3" />
- </button>
- )}
- </dd>
- </div>
- ))}
+ {meta.map(([k, v]) => {
+ const copyable = (k === 'Seed' && item.seed != null) || k === 'Codex session';
+ return (
+ <div key={k} className="contents">
+ <dt className="text-gray-500">{k}</dt>
+ <dd className="text-gray-200 break-all flex items-center gap-1.5">
+ <span>{String(v)}</span>
+ {copyable && (
+ <button
+ type="button"
+ onClick={() => copy(String(v), k)}
+ className="p-0.5 rounded text-gray-400 hover:text-white hover:bg-port-border/50"
+ title={`Copy ${k.toLowerCase()}`}
+ >
+ <Copy className="w-3 h-3" />
+ </button>
+ )}
+ </dd>
+ </div>
+ );
+ })}
</dl>
)}
</div>
diff --git a/client/src/components/media/normalize.js b/client/src/components/media/normalize.js
index f50ce169de..ef79bb7051 100644
--- a/client/src/components/media/normalize.js
+++ b/client/src/components/media/normalize.js
@@ -45,6 +45,11 @@ export function normalizeImage(i) {
guidance: i.guidance,
quantize: i.quantize,
seed: i.seed,
+ // Codex (gpt-image-2) doesn't expose a seed — `codexSessionId` is the
+ // run-identifier from the codex CLI banner, surfaced in the lightbox so
+ // each codex image has a unique trace even though it isn't reproducible.
+ codexSessionId: i.codexSessionId,
+ mode: i.mode,
loraNames,
createdAt: i.createdAt,
hidden: !!i.hidden,
diff --git a/client/src/lib/imageGenResolutions.js b/client/src/lib/imageGenResolutions.js
index b572c20ae0..dc318033a5 100644
--- a/client/src/lib/imageGenResolutions.js
+++ b/client/src/lib/imageGenResolutions.js
@@ -4,7 +4,7 @@
//
// Entries without a `compatible` field are universal. The non-universal
// ones reflect real model constraints, not just style — Z-Image-Turbo and
-// ERNIE were trained at 1024² and degrade past ~1280, and gpt-image-1's
+// ERNIE were trained at 1024² and degrade past ~1280, and gpt-image-2's
// native sizes are 1024² / 1024×1536 / 1536×1024.
export const RESOLUTIONS = [
{ label: '512×512', w: 512, h: 512 },
diff --git a/client/src/pages/ImageClean.jsx b/client/src/pages/ImageClean.jsx
index ac5309d656..90b6a2d2ec 100644
--- a/client/src/pages/ImageClean.jsx
+++ b/client/src/pages/ImageClean.jsx
@@ -183,7 +183,7 @@ export default function ImageClean() {
Image Cleaner
</h2>
<p className="text-gray-500 text-sm">
- Strip C2PA provenance + median-filter pixel noise from gpt-image-1 / Codex output.
+ Strip C2PA provenance + median-filter pixel noise from gpt-image / Codex output.
</p>
</div>
</div>
diff --git a/server/routes/imageClean.js b/server/routes/imageClean.js
index 8cae59817c..a33edca53f 100644
--- a/server/routes/imageClean.js
+++ b/server/routes/imageClean.js
@@ -1,5 +1,5 @@
// Mirrors void-private's CodexImagegenService.cleanImage — strips C2PA
-// provenance + median-filters pixel-level noise from gpt-image-1 output.
+// provenance + median-filters pixel-level noise from gpt-image (Codex) output.
import { Router } from 'express';
import { z } from 'zod';
@@ -63,7 +63,7 @@ function isPngChunkType(buf, offset) {
// force millions of iterations at the 40MiB input limit.
const MAX_PNG_CHUNKS = 10000;
-// Walks PNG chunks once for the `caBX` provenance chunk emitted by gpt-image-1.
+// Walks PNG chunks once for the `caBX` provenance chunk emitted by gpt-image.
// Sharp's default re-encode drops it; we detect it explicitly so the response
// can flag what was stripped. Bails on invalid chunk type, truncated chunk, or
// chunk-count overrun — a buffer that only matches the PNG signature but is
diff --git a/server/services/imageGen/codex.js b/server/services/imageGen/codex.js
index ae4c8d75b1..af0ff78f9b 100644
--- a/server/services/imageGen/codex.js
+++ b/server/services/imageGen/codex.js
@@ -105,7 +105,7 @@ export async function generateImage({ codexPath, model, prompt, width, height, n
// Width/height/negative aren't first-class args for Codex's built-in
// image_gen tool — pass them as natural-language hints inside the prompt.
// Codex's imagegen skill is prompt-driven; the model decides resolution.
- // gpt-image-1 honors a quality hint to escape its 1024 default and render
+ // gpt-image-2 honors a quality hint to escape its 1024 default and render
// at native hi-res (1024×1536 / 1536×1024 / 1536×1536).
const sizeHint = (width && height) ? ` (${width}x${height})` : '';
const qualityHint = (width >= 1536 || height >= 1536) ? ' (high quality)' : '';
@@ -233,9 +233,12 @@ async function runCodex(job, jobId, bin, args, outputPath, filename, meta) {
);
}
await copyFile(harvested, outputPath);
- // Sidecar metadata so the gallery can recover prompt/seed/etc.
+ // Sidecar metadata so the gallery can recover prompt/seed/etc. The
+ // codex sessionId is the closest analogue to a seed for gpt-image-2
+ // (which doesn't expose one) — uniquely identifies the run and is
+ // useful for traceability even though it doesn't reproduce the output.
const sidecar = join(PATHS.images, `${jobId}.metadata.json`);
- await writeFile(sidecar, JSON.stringify(meta, null, 2)).catch(() => {});
+ await writeFile(sidecar, JSON.stringify({ ...meta, codexSessionId: sessionId }, null, 2)).catch(() => {});
job.status = 'complete';
// Only clear if still ours — a userland cancel that started a
// newer job could have replaced these references while our