Skip to content

feat: inject git context into chat prompt#133

Open
owainlewis wants to merge 1 commit into
mainfrom
codex/neo-63-git-context-prompt
Open

feat: inject git context into chat prompt#133
owainlewis wants to merge 1 commit into
mainfrom
codex/neo-63-git-context-prompt

Conversation

@owainlewis

Copy link
Copy Markdown
Owner

Summary

  • add a dynamic git context system-prompt block at session start with branch, status, and recent commits
  • degrade silently when the session cwd is outside a git repo
  • cover repo and non-repo behavior in tests and update generated developer docs

Closes #63

@owainlewis owainlewis marked this pull request as ready for review June 12, 2026 09:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ed5f38a73

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

branch = "HEAD"
}

status, err := gitOutput(cwd, "status", "--short")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Disable repo-controlled hooks for git status

When Neo starts in a repo whose local config sets core.fsmonitor, this new git status --short call invokes that fsmonitor hook immediately, before the model/tool permission policy has a chance to gate command execution. That means simply opening chat in such a repository can run arbitrary local code from git configuration; please force unsafe repo-controlled integrations off for this automatic snapshot (for example by overriding fsmonitor for the command or avoiding status) before collecting git context.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git context injection into the chat system prompt

1 participant