Repository navigation
feat(codex): per-account Codex TUI identity, device-default fingerprint, hyphen session headers - #179
Merged
Merged
Conversation
added 3 commits
September 18, 2026 03:39
… TUI identity - derive a per-account Codex TUI identity (OS, version, arch, terminal, sandbox) from the system fingerprint seed, persist it in accounts.extra, and use it for every outbound request of that account (HTTP, passthrough, WS handshake, probes, token refresh) - default codex_fingerprint_mode to device for OpenAI OAuth-like accounts; explicit off is still honored; migration 243 backfills stored accounts and seeds - forward the hyphenated session-id / thread-id / x-client-request-id headers, stop sending the legacy underscore session_id/conversation_id outside compact, never emit x-codex-installation-id as a header, and keep UUIDv7 time bits when scoping identifiers - turn-metadata sandbox follows the effective outbound User-Agent
…ng and native WS - share the ForceCodexCLI override policy between inference and token refresh via a process snapshot; staging derives sandbox from the same effective User-Agent the final builder emits (shadow-account parent source, enforcement-off pairing) - backfill persisted identities for OpenAI accounts of every status - Anthropic-bridge, chat-completions and alpha-search fallback paths now emit the hyphen session headers for Codex accounts instead of underscore session_id/conversation_id - WS handshake fallback uses the frame's final prompt_cache_key without a second scope - native WebSocket ingress and passthrough frames stage and apply fingerprint convergence
…der-owned session headers - account test probe, usage probe, models manifest and upstream model listing use the shared ForceCodexCLI-aware override policy instead of the raw custom User-Agent - staging predicts the bridge contract: compat Messages bridge requests keep the builder's User-Agent, so sandbox follows that value - Messages/Chat/alpha-search fallbacks only fill missing hyphen session headers and drop the underscore ones; an inbound session-id is never overwritten by the cache-key fallback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Second PR of the Codex identity series (after #178 removed the quota overdraft).
accounts.extra.codex_client_identity. All outbound requests of that account (HTTP, passthrough, WS handshake, probes, models, token refresh) present the samecodex-tui/<ver> (<os> <ver>; <arch>) <terminal> (codex-tui; <ver>)User-Agent with matchingoriginatorandversion. A startup backfill persists identities for existing accounts.codex_fingerprint_modenow defaults todevicefor OpenAI OAuth-like accounts; an explicitoffis still honored. Migration 243 writesdevicefor accounts that never chose a mode and ensures every such account has a seed. The admin UI always writes the literal mode, includingoff.session-id/thread-id/x-client-request-id; stop sending the legacy underscoresession_id/conversation_idoutside the compact path; never emitx-codex-installation-idas a header; scoping of client identifiers keeps UUIDv7 time bits and maps the same raw UUID identically across fields.sandboxfollows the effective outbound User-Agent.Verification
go build ./...,go vet -tags=unit(service, repository, cmd/server) pass.TestOllamaProbeCallback_StaleLongDoesNotOverrideNewShortfailure (fails on main as well); repository, cmd/server and handler packages pass.vue-tsc --noEmitand the Makefile critical vitest list pass.🤖 Generated with Claude Code