Feature request: show local Codex CLI sessions in the desktop app
Feature request
I would like the Codex desktop app to show, search, and open local sessions created from the standalone Codex CLI/TUI.
Problem
I often use Codex from the CLI directly on my computer, not from the Codex macOS app. Those CLI sessions are real local Codex work sessions, but when I later open the Codex desktop app, I cannot see them there.
This means the desktop app is not a unified view of my Codex work. It only shows the sessions it knows about, while my CLI-created sessions are effectively invisible from the app.
I am not reporting this as a data-loss bug. I understand the app may currently use a different session/indexing path than the standalone CLI. The request is for first-class product support for viewing ordinary CLI-created sessions inside the Codex app.
Local context
- Platform: macOS 26.5, arm64
- Codex desktop app: 26.519.41501, bundle version 3044
- Codex CLI:
codex-cli 0.133.0 CODEX_HOME: default$HOME/.codex- Local CLI session storage includes canonical rollout JSONL files under
$HOME/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl - Local metadata exists in
$HOME/.codex/state_5.sqlite, includingthreads.rollout_path,threads.source,threads.cwd,threads.title,threads.model, and related fields - On this machine,
state_5.sqlitecurrently has hundreds of localsource='cli'thread rows, including hundreds of unarchived CLI sessions
The important bit: these sessions are not abstract or remote-only. They have local transcript files and local metadata, and the CLI can find/resume them. The desktop app just does not appear to expose them as part of its session/history UI.
Desired behavior
The Codex desktop app should provide a unified local session view that includes ordinary Codex CLI/TUI sessions created on the same machine/account.
At minimum, I would like to be able to:
- see CLI-created sessions in the desktop app history/sidebar
- search CLI-created sessions from the app
- open/read a CLI-created session from the app
- ideally resume or fork a CLI-created session from the app, if technically supported
Why this matters
For CLI-heavy users, Codex work is split across two surfaces:
- the CLI, where many real sessions are started and resumed
- the desktop app, which is useful for browsing, supervising, and managing work
Right now the desktop app has no visible connection to much of my CLI history. That makes the app less useful as a central workspace, because it cannot answer "what have I been doing in Codex?" unless the work started inside the app.
Possible implementation shapes
Any of these would solve the core problem:
- the app reads/indexes
$HOME/.codex/state_5.sqliteand the rollout files referenced bythreads.rollout_path - the app reads/indexes
$HOME/.codex/sessionsdirectly, using the same lookup behavior as the CLI - the CLI writes session metadata into a store the app already indexes
- the app offers an "Import local CLI sessions" or "Show local CLI sessions" option
- the app provides a read-only local session browser first, if full resume/fork support is not initially safe
The exact storage design is less important than having an official supported bridge between ordinary CLI-created sessions and the desktop app UI.
Related issues
- openai/codex#14722 asks for syncing between CLI and app-server sessions.
- openai/codex#18737 reported a similar user-visible gap but was closed as duplicate of a Windows bug.
- openai/codex#17540 is open and tracks local sessions present on disk but missing from desktop UI/search, though it is Windows-specific.
- openai/codex#16385 asked for a unified view for ACP-spawned sessions, but this request is about ordinary Codex CLI/TUI sessions, not ACP or a third-party orchestrator.
10 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I investigated this and have a candidate branch here:
https://github.com/coygeek/codex/tree/feat/local-cli-sessions-in-app
The branch changes app-server history listing so desktop-shaped
thread/listrequests with omitted or emptymodelProvidersinclude local interactive CLI sessions across providers, while explicit provider filters remain strict.What I tested:
CARGO_NET_GIT_FETCH_WITH_CLI=true GIT_CONFIG_GLOBAL=/dev/null just test -p codex-app-serverCARGO_NET_GIT_FETCH_WITH_CLI=true GIT_CONFIG_GLOBAL=/dev/null just fix -p codex-app-serverCARGO_NET_GIT_FETCH_WITH_CLI=true GIT_CONFIG_GLOBAL=/dev/null just fmtgit diff --checkmodelProviders, emptymodelProviders, strict explicit provider filtering, source filtering, andthread/readprovider fallback behavior.codexCLI sessions afterward and verified the already-running app could find those sessions in history/search.thread/listwithsourceKinds: ["cli"]and omittedmodelProviders, then calledthread/readfor each new CLI session and confirmed each unique session prompt/response was readable.codex-reviewpasses after validation; one post-filtered source-history edge case was found, fixed, and reverified.This should already work. I use this workflow all the time, and it seems to work fine for me. Let's see if we can figure out why it's not working for you. Are you using a custom model provider? Could you run
/feedbackand post the session ID here? That will also upload the output ofcodex doctor, which will likely be useful for diagnosing this problem. You can run it yourself to see if it provides any useful hints.I dug into this more carefully, and I think I found the source of the mismatch.
This does not appear to be a custom-provider problem on my machine.
codex doctorreports OpenAI as the active provider, ChatGPT auth is configured, the state DB is healthy, and the DB has many unarchivedsource=cli,model_provider=openairows. Directthread/listcalls also return recent CLI-created rows.I can also now confirm that the desktop left rail does show some CLI-created sessions when their cwd belongs to a project the desktop app already knows about. For example, after moving my Codex window back onto the visible display, I saw recent Terminal-created CLI test sessions under a known project in the left rail. That likely explains why this works in your workflow.
The remaining gap seems narrower:
$HOME/ projectless cwd or from a newly-created git repo unknown to the desktop app can be present in SQLite and returned by app-server, but still not appear in a fresh desktop profile's left rail.So I think the issue is not "CLI sessions are never visible." It is more like: the desktop sidebar is not a unified browser for arbitrary local CLI history; it appears to rely on desktop-maintained project/sidebar state when deciding what to project into the left rail.
That distinction reconciles the two observations: the workflow can work for known projects, while still failing for projectless or unknown-cwd CLI history.
Here is a concrete repro/verification path for the narrower bug.
What to test
Test whether the desktop left rail discovers CLI-created sessions when the desktop profile has no saved project/sidebar state for that cwd.
Suggested clean-profile repro
Use the same installed app bundle and its bundled CLI for both the desktop app and Terminal-created sessions.
No chats.$HOMEusing the same app bundle's CLI. Use an obvious unique prompt marker, for example:This should be a normal interactive CLI session, not
codex exec, so it persists assource=cli.Prompt marker:
Expected backend/storage result:
source = climodel_provider = openaiarchived = 0$HOMEfor the first row and the new git cwd for the second rowthread/listandthread/readagainst the isolatedCODEX_HOME. The important filter shapes are:modelProviders/sourceKindsmodelProviders: [],sourceKinds: []modelProviders: ["openai"],sourceKinds: ["cli"]In my run, both isolated CLI rows were returned by those app-server calls, and
thread/readopened each row, but the fresh desktop left rail still showedNo chatsafter relaunch.Control case
As a control, run a CLI session from a project that the desktop profile already knows about. On my normal profile, CLI-created sessions from a known project did appear in the left rail. That is the behavior that likely explains why this works for some workflows.
Evidence from my run
26.519.41501codex-cli 0.133.0-alpha.1codex doctorlater reported active provideropenai, ChatGPT auth configured, healthy state DBs, and no provider/connectivity failure.source=cli,model_provider=openairows.$HOMEor unknown-git-cwd CLI rows, despite SQLite and app-server proving both were present and readable.So the likely acceptance test is: seed or create unarchived
source=cli,modelProvider=openaisessions in a fresh desktop profile with no existing project records, then assert the left rail does not remainNo chatsif unified local CLI history is intended behavior.@etraut-openai
Please review
Yes, if you create a thread in the CLI that is not within a project that you've established in the app — or a project that you previously established but then removed removed in the app, then it will not appear in the app's left side panel. The same is true for threads in the app, so this isn't specific to the CLI. If you create a thread in the app under a project and then remove that project, that thread will no longer appear in the left side bar. If you then add that project back, all threads associated with that project will reappear.
@etraut-openai thanks, that clarification helps. I want to make sure I understand the intended model correctly.
My workflow is often:
If that is accurate, then I think this is the core UX problem I am trying to report:
From the user's perspective, the sessions already exist. They are stored locally, they can be resumed/read by Codex, and in some cases the backend/app-server can return them. But the macOS app makes them effectively invisible unless the user already knows which project folder to add to the app first.
That puts the burden on the user to remember or discover every folder where they have previously run Codex, manually add those folders as projects in the app, and only then see the associated session history. For a CLI-heavy workflow across dozens of repositories, that becomes painful very quickly.
I also confirmed that this is not just a CLI-specific issue. I see the same behavior with mobile-created sessions:
So the issue seems broader than "CLI sessions do not appear." It is more like the app is project-filtering local history in a way that makes existing sessions look missing.
That feels surprising because the app looks like a central session/history surface, but it is actually behaving like a project-filtered view with no obvious way to discover sessions from unregistered projects.
If this project-scoped behavior is intentional, I think the app needs some first-class way to surface these sessions, for example:
Otherwise, sessions can look missing even though they still exist and become visible later once the user manually adds the right folder.
Can you confirm whether this hidden-by-default behavior is intended product behavior, or a current implementation limitation?
Thanks for describing your workflow. The feature request makes sense given that context.
I think it's safe to say that the current implementation isn't optimized for the workflow that you've described. I don't know how common it is. I'm interested to hear from other Codex users on this point.
@etraut-openai
I've figured it out now, after playing around with it.
To solve my problem:
In the left-hand-side, click the three docs (...) and then switch from "organize sidebar by project" to "organize sidebar by chronological list".
<img width="395" height="350" alt="Image" src="https://github.com/user-attachments/assets/cd5b10c9-e9db-4a57-b780-7e87db316857" />
Now, repeat the same tests, where i start random sessions in random projects, using both codex cli and mobile.
Now, they instantly appear on top of the list on MacOS app.
This is exactly what i wanted, since that's the way to show all of my codex sessions on this computer, without me doing any manual work of adding each project/folder.
Cheers!