Resuming a named session repeatedly prints “Session renamed” although its name is unchanged
Open 💬 2 comments Opened Aug 11, 2026 by leesamuel1007
What version of Codex CLI is running?
0.147.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.6-sol
What platform is your computer?
Linux 7.0.0-28-generic x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
tmux in Terminator
Codex doctor report
{
"schemaVersion": 1,
"generatedAt": "1786444437s since unix epoch",
"overallStatus": "warning",
"codexVersion": "0.147.0",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is not running",
"details": {
"control socket": "/home/<username>/.codex/app-server-control/app-server-control.sock",
"daemon state dir": "/home/<username>/.codex/app-server-daemon",
"mode": "ephemeral",
"pid file": "/home/<username>/.codex/app-server-daemon/app-server.pid (missing)",
"settings": "/home/<username>/.codex/app-server-daemon/settings.json (missing)",
"status": "not running",
"update-loop pid file": "/home/<username>/.codex/app-server-daemon/app-server-updater.pid (missing)"
},
"remediation": null,
"durationMs": 0
},
"auth.credentials": {
"id": "auth.credentials",
"category": "auth",
"status": "ok",
"summary": "auth is configured",
"details": {
"auth file": "/home/<username>/.codex/auth.json",
"auth storage mode": "File",
"stored API key": "false",
"stored ChatGPT tokens": "true",
"stored agent identity": "false",
"stored auth mode": "chatgpt"
},
"remediation": null,
"durationMs": 0
},
"config.load": {
"id": "config.load",
"category": "config",
"status": "ok",
"summary": "config loaded",
"details": {
"CODEX_HOME": "/home/<username>/.codex",
"config.toml": "/home/<username>/.codex/config.toml",
"config.toml parse": "ok",
"cwd": "/home/<username>/vscode",
"enabled feature flags": "shell_tool, view_image, unified_exec, shell_snapshot, code_mode_host, terminal_resize_reflow, sqlite, memories, hooks, enable_request_compression, multi_agent, apps, tool_search_always_defer_mcp_tools, tool_suggest, plugins, in_app_browser, in_app_updates, browser_use, browser_use_full_cdp_access, browser_use_external, computer_use, remote_plugin, plugin_sharing, image_generation, resize_all_images, item_ids, skill_mcp_dependency_install, skill_search, mentions_v2, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, auth_elicitation, personality, fast_mode, tui_app_server, remote_compaction_v2, workspace_dependencies",
"feature flag overrides": "memories=true",
"feature flags enabled": "40",
"log dir": "/home/<username>/.codex/log",
"mcp servers": "0",
"model": "gpt-5.6-sol",
"model provider": "openai",
"sqlite home": "/home/<username>/.codex"
},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git version 2.54.0",
"details": {
"PATH git #1": "/usr/bin/git",
"PATH git #2": "/bin/git",
"PATH git entries": "2",
"git build options": "git version 2.54.0; cpu: x86_64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; rust: disabled; gettext: enabled; libcurl: 8.5.0; zlib: 1.3; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
"git exec path": "/usr/lib/git-core",
"git version": "git version 2.54.0",
"repo detected": "false",
"selected git": "/usr/bin/git"
},
"remediation": null,
"durationMs": 21
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "/home/<username>/.nvm/versions/node/v24.15.0/bin/codex",
"current executable": "/home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
"install context": "npm (package /home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)",
"managed by bun": "false",
"managed by npm": "true",
"managed by pnpm": "false",
"managed package root": "/home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex",
"npm update target": "/home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex"
},
"remediation": null,
"durationMs": 75
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "ok",
"summary": "no MCP servers configured",
"details": {},
"remediation": null,
"durationMs": 0
},
"network.env": {
"id": "network.env",
"category": "network",
"status": "ok",
"summary": "network-related environment looks readable",
"details": {
"proxy env vars": "none"
},
"remediation": null,
"durationMs": 0
},
"network.provider_reachability": {
"id": "network.provider_reachability",
"category": "reachability",
"status": "ok",
"summary": "active provider endpoints are reachable over HTTP",
"details": {
"ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 403)",
"reachability mode": "ChatGPT auth"
},
"remediation": null,
"durationMs": 42
},
"network.websocket_reachability": {
"id": "network.websocket_reachability",
"category": "websocket",
"status": "ok",
"summary": "Responses WebSocket handshake succeeded",
"details": {
"DNS": "2 IPv4, 2 IPv6, first IPv4",
"auth mode": "chatgpt",
"connect timeout": "15000 ms",
"endpoint": "wss://chatgpt.com/backend-api/<redacted>",
"handshake result": "HTTP 101 Switching Protocols",
"model provider": "openai",
"models etag present": "true",
"provider name": "OpenAI",
"proxy env vars": "none",
"reasoning header": "false",
"server model present": "false",
"supports websockets": "true",
"wire API": "responses"
},
"remediation": null,
"durationMs": 586
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running npm on linux-x86_64",
"details": {
"commit": "unknown",
"current executable": "/home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
"install method": "npm (package /home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)",
"platform": "linux-x86_64",
"version": "0.147.0"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search is OK (bundled)",
"details": {
"search command": "/home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path/rg",
"search command readiness": "file exists",
"search provider": "bundled"
},
"remediation": null,
"durationMs": 0
},
"sandbox.helpers": {
"id": "sandbox.helpers",
"category": "sandbox",
"status": "ok",
"summary": "sandbox configuration is readable",
"details": {
"approval policy": "OnRequest",
"codex-linux-sandbox helper": "/home/<username>/.codex/tmp/arg0/codex-arg0ZH3mtq/codex-linux-sandbox",
"execve wrapper helper": "/home/<username>/.codex/tmp/arg0/codex-arg0ZH3mtq/codex-execve-wrapper",
"filesystem sandbox": "restricted",
"network sandbox": "restricted"
},
"remediation": null,
"durationMs": 0
},
"state.paths": {
"id": "state.paths",
"category": "state",
"status": "ok",
"summary": "state paths and databases are inspectable",
"details": {
"CODEX_HOME": "/home/<username>/.codex (dir)",
"active rollout files": "21 files, 427242422 total bytes, 20344877 average bytes",
"archived rollout files": "1 files, 92675 total bytes, 92675 average bytes",
"goals DB": "/home/<username>/.codex/goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "/home/<username>/.codex/logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "/home/<username>/.codex/log (dir)",
"memories DB": "/home/<username>/.codex/memories_1.sqlite (file)",
"memories DB integrity": "ok",
"queue DB": "/home/<username>/.codex/queue_1.sqlite (file)",
"queue DB integrity": "ok",
"sqlite home": "/home/<username>/.codex (dir)",
"state DB": "/home/<username>/.codex/state_5.sqlite (file)",
"state DB integrity": "ok",
"thread history DB": "/home/<username>/.codex/thread_history_1.sqlite (missing)",
"thread history DB integrity": "skipped (missing)"
},
"remediation": null,
"durationMs": 608
},
"state.rollout_db_parity": {
"id": "state.rollout_db_parity",
"category": "threads",
"status": "warning",
"summary": "rollout files and state DB thread inventory differ",
"details": {
"default model provider": "openai",
"rollout DB active files": "21",
"rollout DB active rows": "22",
"rollout DB archive mismatches": "0",
"rollout DB archived files": "1",
"rollout DB archived rows": "13",
"rollout DB duplicate DB paths": "0",
"rollout DB duplicate rollout thread ids": "0",
"rollout DB malformed file names": "0",
"rollout DB missing active rows": "0",
"rollout DB missing archived rows": "0",
"rollout DB model providers": "openai=35",
"rollout DB rows": "35",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "cli=17, subagent:other=13, subagent:thread_spawn=3, unknown=1, vscode=1",
"rollout DB stale row sample": [
"/home/<username>/.codex/archived_sessions/rollout-2026-03-27T13-44-18-019d2d9b-8015-7fa1-9d1a-eda0242e9ad3.jsonl",
"/home/<username>/.codex/archived_sessions/rollout-2026-05-22T18-34-26-019e4f09-3fb4-73c2-aad8-2bbe386e78e9.jsonl",
"/home/<username>/.codex/archived_sessions/rollout-2026-05-28T16-35-27-019e6d82-767a-7911-bcd0-603c5ca4369a.jsonl",
"/home/<username>/.codex/archived_sessions/rollout-2026-05-28T16-40-49-019e6d87-61ae-7622-b6f1-3e62b7321400.jsonl",
"/home/<username>/.codex/archived_sessions/rollout-2026-05-28T16-40-52-019e6d87-6e9d-7080-a459-5a2810b2581a.jsonl"
],
"rollout DB stale rows": "13"
},
"issues": [
{
"severity": "warning",
"cause": "state DB rows point at missing or unusable rollout files",
"measured": "13 stale rows",
"expected": "every state DB rollout path is a file on disk",
"remedy": null,
"fields": []
}
],
"remediation": null,
"durationMs": 25
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language en-US",
"details": {
"EDITOR": "set",
"LANG": "en_US.UTF-8",
"LC_ALL": "en_US.UTF-8",
"VISUAL": "not set",
"os": "Ubuntu 24.4.0 (noble) [64-bit]",
"os language": "en-US",
"os type": "Ubuntu",
"os version": "24.4.0"
},
"remediation": null,
"durationMs": 5
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"COLORTERM": "truecolor",
"DISPLAY": "present",
"color output": "enabled",
"effective locale": "en_US.UTF-8",
"stderr is terminal": "true",
"stdin is terminal": "true",
"stdout is terminal": "true",
"terminal": "VTE",
"terminal size": "80x24",
"terminal version": "7600"
},
"remediation": null,
"durationMs": 0
},
"terminal.title": {
"id": "terminal.title",
"category": "title",
"status": "ok",
"summary": "terminal title configured",
"details": {
"terminal title activity": "true",
"terminal title items": "activity, current-dir, run-state, thread-title",
"terminal title source": "configured"
},
"remediation": null,
"durationMs": 0
},
"updates.status": {
"id": "updates.status",
"category": "updates",
"status": "ok",
"summary": "update configuration is locally consistent",
"details": {
"cached latest version": "0.147.0",
"check for update on startup": "true",
"last checked at": "2026-08-11T10:21:03.032890978Z",
"latest version": "0.147.0",
"latest version status": "current version is not older",
"npm update target": "/home/<username>/.nvm/versions/node/v24.15.0/lib/node_modules/@openai/codex",
"update action": "npm install -g @openai/codex",
"version cache": "/home/<username>/.codex/version.json"
},
"remediation": null,
"durationMs": 116
}
}
}
What issue are you seeing?
Every restart prints Session renamed to {NL rename of session}
The UUID does not change.
What steps can reproduce the bug?
Restart codex session.
What is the expected behavior?
resume silently because the name did not change
Additional information
session_index.jsonl appends another identical UUID/name entry on each resume
2 Comments
I reproduced this independently on current
main(8cabf5a6) on macOS 15.5 arm64.I added a temporary focused regression test that:
session_index.jsonlentry are bothsaved-session;lookup_legacy_index_target;The test failed twice. Each run appended a second entry with the same thread UUID and
thread_name; onlyupdated_atdiffered.The source path also explains the visible message:
lookup_legacy_index_targetaccepts both a missing legacy name and an already-equal legacy name throughcurrent_name_is_compatible;thread_set_name;ThreadNameUpdated;The smallest fix appears to be to call
thread_set_nameonly for the missing-name legacy repair case. Ifthread/readalready returns the requested name, lookup should return the target without rewriting metadata. I would add focusedcodex-tuiregression coverage for the unchanged-name case.I removed the temporary diagnostic test afterward, so my checkout is clean.
I have not opened a PR because
CONTRIBUTING.mdsays external code contributions require an explicit invitation. If this diagnosis and scope align with the maintainers’ intent, would you be willing to invite me to implement the fix?Found the mechanism:
on_thread_name_updatedprints the "Session renamed to …" cell for any name notification carryingSome(name)— there's no comparison with the name the widget already holds (https://github.com/openai/codex/blob/1f41cc5d92/codex-rs/tui/src/chatwidget/session_flow.rs#L246-L260). On resume, the app-server replays the thread's stored name as part of state sync, and the TUI can't distinguish that replay from an actual rename, so every restart of a named session prints the banner.Two-line fix: guard with
if thread_name != self.thread_namebefore emitting the cell (still updatingself.thread_nameand the status surfaces unconditionally). A more principled variant is distinguishing "initial state sync" from "changed" in the notification itself, but the local comparison already covers the resume case and the no-op-rename case for free.