Git commit instructions are omitted for nested repositories in aggregate workspaces

Open 💬 0 comments Opened Jul 17, 2026 by ReyYang

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

26.715.21425 (build 5488)

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

The global Git commit instructions configured in Settings > Git are silently omitted from the agent's developer context when the selected workspace root is not itself a Git repository, even if the agent works inside nested Git repositories.

My workspace is an aggregate directory:

  • The workspace root is not a Git repository.
  • Nested directories are valid Git repositories.
  • The agent edits and commits inside those nested repositories.

The setting is persisted correctly in ~/.codex/config.toml under [desktop].git-commit-instructions. However, when I ask the agent to commit changes in a nested repository, it creates commit messages that ignore the configured language and formatting rules.

For example, the configured instructions require Simplified Chinese and Conventional Commits, but the agent created:

feat: support manual product status updates
feat: add manual product status controls

I inspected the installed app bundle and found that the developer-instruction builder excludes the entire Git section when isNonGitWorkspace is true:

isNonGitWorkspace ? null : buildGitInstructions(gitSettings)

As a result, Git settings are not delivered to the agent in aggregate or multi-repository workspaces, even though the agent can still execute Git commands inside nested repositories.

What steps can reproduce the bug?

  1. Configure a custom commit instruction in Codex App under Settings > Git > Commit instructions. For example, require Simplified Chinese and Conventional Commits.
  2. Open a task whose workspace root is a regular directory that is not a Git repository.
  3. Ensure that the workspace root contains one or more nested Git repositories.
  4. Ask Codex to modify files inside a nested repository.
  5. Ask Codex to commit the changes.
  6. Inspect the generated commit message.

Actual result:
The commit instruction is absent from the task's developer context, and the generated commit message ignores it.

Control case:
When a task is opened directly at a Git repository root, the same commit instruction is present in the developer context and can be followed.

A focused search for existing issues using "commit instructions" nested repository returned no results.

What is the expected behavior?

Global Git commit instructions should apply whenever Codex performs Git operations in a repository, including repositories nested below a non-Git aggregate workspace root.

The app could resolve this by detecting the repository associated with the actual Git operation, or by always including global commit instructions in the agent context. At minimum, the app should not silently omit the setting while still allowing the agent to commit inside nested repositories.

Additional information

The saved configuration itself is correct; this is not a persistence failure.

The failure is in prompt propagation/workspace Git detection:

  • Aggregate workspace root: not a Git repository
  • Nested working directories: valid Git repositories
  • Current aggregate task: no Commit instructions block in developer context
  • Git-root control task: Commit instructions block is present

The original commits were amended after the issue was noticed, so no incorrect commit messages remain in the repositories.

Session ID can be provided privately if maintainers need it for diagnostics.

View original on GitHub ↗