4b85a6a
Codex thread names in Adom
Codex owns the conversation name. Adom displays it through VS Code's native
WebviewPanel.title, so the tab strip, Ctrl+Tab and Open Editors use the same
editor model. No DOM title replacement is required for managed Codex panels.
Automatic and explicit names
Codex generates a short title after the first prompt. Depending on the engine,
that title lives in threads.title, while an explicit rename may be stored in
threads.name. Explicit names take precedence. The integration never substitutes
a huge raw first prompt while automatic naming is pending.
When the user asks to name this thread, execute:
adom-codex thread rename "Load tests"
The command targets CODEX_THREAD_ID; --id <UUID> explicitly targets another
conversation. It writes through thread/name/set, verifies thread/read, and
synchronizes Hydrogen's display label when available. It never writes SQLite.
It uses an existing Adom backend when available; otherwise a short-lived native
metadata process performs only the rename/readback and exits, without starting
a model turn or leaving a daemon running. The user's engine choice stays intact.
--native-only is the internal nonrecursive path used by Hydrogen. Output clearly
separates native persistence from visible-tab verification.
adom-codex thread list is read-only and supports current and older native stores.
Panel identity and restore
New panels begin without a conversation UUID. A CSP-preserving bootstrap observes the current composer's actual UUID and binds only that panel. A fresh nonce grants only the injected bootstrap permission; the existing script sources and all other security-policy directives remain intact.
Adom-created tabs have unique nonce resources. Their UUID bindings persist in the
extension's own global state and an atomic per-resource identity record. Restored nonce tabs use the saved /local/<UUID>
route so they reopen the actual conversation, not an empty chat carrying an old
name. A reusable bare /new never inherits an old conversation's identity.
For an existing nonce tab opened before this integration was loaded, bind its verified resource and native conversation before the first activation reload:
adom-codex thread bind --id <UUID> --resource '<exact openai-codex nonce URI>'
This preserves the old panel's actual conversation without needing a live patched renderer to seed its state. The command validates the native conversation and supports the URI encoding used by VS Code. Never guess another tab's binding.
The native name is read on open and updated by native name notifications. A single shared, event-driven metadata watcher handles renames from a different app-server or a user-selected native engine. It reads only names for open panels, at most once per second during native-store changes; it never reads transcripts or calls a model. Confirmed cross-process changes are mirrored to that panel's Codex UI.
Late reads and vendor preview assignments cannot overwrite a newer confirmed name. Subscriptions and watchers are removed when panels close. If an unknown upstream startup shape cannot be identified safely, the original renderer is retained. Both older method-based and current function-based Codex HTML builders are supported.
Related owners
The paired adom-vscode change consumes the native-name list in its Codex Sessions
view and /codex/sessions, retaining the legacy fallback for older/absent packages.
The paired Hydrogen change forwards rename to the native command, requires readback
before success, clears its competing alias only on success, and reads native names
in History. Those components have separate release/deployment states.
Existing Hydrogen-only aliases are preserved until the user explicitly renames through the native path. They are not silently migrated over a potentially newer native name. In the updated Hydrogen path, a confirmed rename clears the alias.
Validation and activation
On 2026-11-15 the integration was tested in an isolated code-server 4.137.0 / VS Code 1.137.0 editor with Codex 26.1111.21308 and a real headless Chromium renderer:
- Native
window.tabGroupslabels and the actual Ctrl+Tab picker showed the saved conversation names, without a DOM/CSS override. - A first prompt received Codex's automatic short title on the native editor tab.
- A rename made by an independent backend updated the open panel's native label.
- An editor reload preserved names and reopened the nonce panel's actual UUID.
- Existing managed fragments upgraded and uninstalled without replacing user edits.
Focused tests cover current/legacy schemas, identity isolation, numeric DB versions, archive handling, native readback, generated titles, cross-process store changes, CSP handling, stale replies, late previews, nonce restoration and disposal.
The existing backend reconnection fixture fails identically on unmodified 0.1.38
and this source (expected turn is running, received sent 1000 (OK); no close frame received). runtime.py is unchanged. A full Hydrogen Rust build was not
available in the test workspace; that companion PR remains separately validated.
Installing stages renderer changes for the next extension-host load. Existing panels require an editor reload. Do not interrupt active conversations just to activate it. Preserve a custom CLI and the user's selected engine. Already-running AI conversations do not automatically reload their instruction catalogs.
# Codex thread names in Adom
Codex owns the conversation name. Adom displays it through VS Code's native
`WebviewPanel.title`, so the tab strip, Ctrl+Tab and Open Editors use the same
editor model. No DOM title replacement is required for managed Codex panels.
## Automatic and explicit names
Codex generates a short title after the first prompt. Depending on the engine,
that title lives in `threads.title`, while an explicit rename may be stored in
`threads.name`. Explicit names take precedence. The integration never substitutes
a huge raw first prompt while automatic naming is pending.
When the user asks to name this thread, execute:
```bash
adom-codex thread rename "Load tests"
```
The command targets `CODEX_THREAD_ID`; `--id <UUID>` explicitly targets another
conversation. It writes through `thread/name/set`, verifies `thread/read`, and
synchronizes Hydrogen's display label when available. It never writes SQLite.
It uses an existing Adom backend when available; otherwise a short-lived native
metadata process performs only the rename/readback and exits, without starting
a model turn or leaving a daemon running. The user's engine choice stays intact.
`--native-only` is the internal nonrecursive path used by Hydrogen. Output clearly
separates native persistence from visible-tab verification.
`adom-codex thread list` is read-only and supports current and older native stores.
## Panel identity and restore
New panels begin without a conversation UUID. A CSP-preserving bootstrap observes
the current composer's actual UUID and binds only that panel. A fresh nonce grants
only the injected bootstrap permission; the existing script sources and all other
security-policy directives remain intact.
Adom-created tabs have unique nonce resources. Their UUID bindings persist in the
extension's own global state and an atomic per-resource identity record. Restored nonce tabs use the saved `/local/<UUID>`
route so they reopen the actual conversation, not an empty chat carrying an old
name. A reusable bare `/new` never inherits an old conversation's identity.
For an existing nonce tab opened before this integration was loaded, bind its
verified resource and native conversation before the first activation reload:
```bash
adom-codex thread bind --id <UUID> --resource '<exact openai-codex nonce URI>'
```
This preserves the old panel's actual conversation without needing a live patched
renderer to seed its state. The command validates the native conversation and
supports the URI encoding used by VS Code. Never guess another tab's binding.
The native name is read on open and updated by native name notifications. A single
shared, event-driven metadata watcher handles renames from a different app-server
or a user-selected native engine. It reads only names for open panels, at most once
per second during native-store changes; it never reads transcripts or calls a
model. Confirmed cross-process changes are mirrored to that panel's Codex UI.
Late reads and vendor preview assignments cannot overwrite a newer confirmed name.
Subscriptions and watchers are removed when panels close. If an unknown upstream
startup shape cannot be identified safely, the original renderer is retained.
Both older method-based and current function-based Codex HTML builders are supported.
## Related owners
The paired adom-vscode change consumes the native-name list in its Codex Sessions
view and `/codex/sessions`, retaining the legacy fallback for older/absent packages.
The paired Hydrogen change forwards rename to the native command, requires readback
before success, clears its competing alias only on success, and reads native names
in History. Those components have separate release/deployment states.
Existing Hydrogen-only aliases are preserved until the user explicitly renames
through the native path. They are not silently migrated over a potentially newer
native name. In the updated Hydrogen path, a confirmed rename clears the alias.
## Validation and activation
On 2026-11-15 the integration was tested in an isolated code-server 4.137.0 / VS Code
1.137.0 editor with Codex 26.1111.21308 and a real headless Chromium renderer:
- Native `window.tabGroups` labels and the actual Ctrl+Tab picker showed the saved
conversation names, without a DOM/CSS override.
- A first prompt received Codex's automatic short title on the native editor tab.
- A rename made by an independent backend updated the open panel's native label.
- An editor reload preserved names and reopened the nonce panel's actual UUID.
- Existing managed fragments upgraded and uninstalled without replacing user edits.
Focused tests cover current/legacy schemas, identity isolation, numeric DB versions,
archive handling, native readback, generated titles, cross-process store changes,
CSP handling, stale replies, late previews, nonce restoration and disposal.
The existing backend reconnection fixture fails identically on unmodified 0.1.38
and this source (expected `turn is running`, received `sent 1000 (OK); no close
frame received`). `runtime.py` is unchanged. A full Hydrogen Rust build was not
available in the test workspace; that companion PR remains separately validated.
Installing stages renderer changes for the next extension-host load. Existing
panels require an editor reload. Do not interrupt active conversations just to
activate it. Preserve a custom CLI and the user's selected engine. Already-running
AI conversations do not automatically reload their instruction catalogs.