Skip to content

Codex Desktop injects stale Non-Git Workspace citation instructions inside a Git repo #17939

Open

Description

@viljar

Summary

Codex Desktop is injecting a ### Non-Git Workspace developer instruction that says the current workspace is not a Git workspace and requires 【F:/absolute/path†Lx】 citation chips in final responses, even when the active cwd is inside a valid Git repository.

This causes the model to add unwanted file citation chips and conflicts with project/user instructions that prefer normal Markdown absolute-path links.

Environment

  • App: Codex Desktop
  • macOS app bundle: /Applications/Codex.app
  • CFBundleShortVersionString: 26.409.20454
  • CFBundleVersion: 1462
  • Local Codex version cache: 0.115.0
  • Active cwd: a local Git repository path (redacted)

Evidence

The active cwd is a Git workspace:

$ git rev-parse --is-inside-work-tree
true
$ git rev-parse --show-toplevel
/path/to/git/repo

But the session developer context includes:

### Non-Git Workspace
- You are currently not in a git workspace and therefore you MUST cite all changed local files in your final response so the app can track them.
- Always use the file citation syntax `【F:/absolute/path/to/file†Lstart-Lend】` or `【F:/absolute/path/to/file†Lstart】` when referring to changed files.

The same prompt text is present in the shipped app bundle:

$ rg -a -n "Non-Git Workspace|currently not in a git workspace|file citation syntax" /Applications/Codex.app/Contents/Resources/app.asar
519:`)}`}function oE(){return`### Non-Git Workspace
520:- You are currently not in a git workspace and therefore you MUST cite all changed local files in your final response so the app can track them.
521:- Always use the file citation syntax ...

Expected behavior

  • Codex Desktop should verify the active workspace with Git before injecting Non-Git Workspace instructions.
  • If git rev-parse --is-inside-work-tree returns true, it should not inject the Non-Git Workspace block.
  • Ideally, users should be able to disable forced 【F:/...†Lx】 citation chips entirely. Normal Markdown links with absolute paths are easier to read and work in both Git and non-Git contexts.

Actual behavior

The Non-Git Workspace block is injected despite a valid Git repo, and because it is a developer instruction with MUST language it overrides user/project formatting preferences.

Impact

Final answers become cluttered with forced file citation chips, and the model treats a Git repo as non-Git despite local Git verification. This appears to have started after a recent Codex Desktop update.

Activity

  1. added
    bug
    app
    on Apr 15, 2026
  2. viljar commented on Apr 15, 2026

    @viljar
    Author

    Additional exact bundle location found locally:

    • App bundle: /Applications/Codex.app/Contents/Resources/app.asar
    • Internal asar path: .vite/build/product-name-CKRilA27.js
    • Function: oE() returns the ### Non-Git Workspace prompt block
    • Offset inside internal file: 626439
    • Byte offset inside app.asar: 1637786

    Read-only search output:

    internal path: .vite/build/product-name-CKRilA27.js
    file offset: 626439
    asar byte offset: 1637786
    ... function oE(){return`### Non-Git Workspace
    - You are currently not in a git workspace and therefore you MUST cite all changed local files ...
    
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

    appbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions