Skip to content

Codex App fails to detect sub-repositories in a workspace folder and orphans conversation context #14218

Closed as duplicate

Description

@T-1234567890

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.305.950 (863)

What subscription do you have?

Plus

What platform is your computer?

No response

What issue are you seeing?

Codex App does not correctly handle a workspace folder that contains multiple Git repositories.

In my setup, I have a workspace directory that contains two independent repositories:

workspace/
repository_a/.git
repository_b/.git

The workspace folder itself is NOT a Git repository.

When I move two repositories:

  1. The Codex app does not detect the repositories inside subfolders.
  2. The previous conversation context is lost after removing the folder from the Codex app (the folder isn't deleted).
  3. There is no warning that removing the repository will delete the conversation context.

This caused a loss of several hours of debugging context.

What steps can reproduce the bug?

  1. Open a Git repository in Codex App.
  2. Work with Codex for a while so the conversation builds context.
  3. Remove the repository from Codex.
  4. Add a workspace folder that contains multiple Git repositories (including the first Git repository that has the context).

Original structure:

projects/
repository_a/.git
repository_b/.git

The folder repository_a/ and repository_b/ is moved to another folder in this case.

Structure that loses context and not detecting the Git repositories in sub folders:
projects/
workspace/
repository_a/.git
repository_b/.git

  1. Codex does not detect the sub-repositories and suggests creating a Git repository in the workspace root.
  2. The previous conversation context is lost.

What is the expected behavior?

Expected behavior:

  1. Codex should detect Git repositories inside subfolders.
  2. Codex should not suggest creating a Git repository if sub-repositories already exist.
  3. Codex app should warn the user that removing a repository will delete the conversation and context.
  4. Ideally, Codex should support multi-repository workspaces so related projects can share context.

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    on Mar 10, 2026
  2. github-actions commented on Mar 10, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. miraclebakelaser commented on Mar 10, 2026

    @miraclebakelaser
    Contributor

    To aid on the recovery side: these conversations are never really lost, and can be recovered with some finagling to the session jsonl files. See my comment here on how to recover a thread: #12166 (comment). You may have to adjust your remedy depending on the specifics of your situation.

  4. T-1234567890 commented on Mar 11, 2026

    @T-1234567890
    Author

    To aid on the recovery side: these conversations are never really lost, and can be recovered with some finagling to the session jsonl files. See my comment here on how to recover a thread: #12166 (comment). You may have to adjust your remedy depending on the specifics of your situation.

    Thanks for the suggestion on recovering the session jsonl files.

    That helps with recovering, but the issue here is slightly different.

    The main problem is that Codex currently fails to detect valid Git repositories located inside a folder (sub-repositories).

    In my case, the structure is:

    workspace/
    repository_a/.git
    repository_b/.git

    The workspace itself is not a Git repository, but the subfolders are.

    Codex does not detect these repositories automatically and instead recommends creating a new repository at the workspace root.

    Additionally, removing a repository from Codex removes the conversation context in the UI without warning, which makes it very easy to accidentally orphan active threads.

    The jsonl helps recovery, but the expected behavior would be proper sub-repo detection (similar to JetBrains IDE) and preserving context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions