Skip to content

make codex better at git#10145

Merged
pash-openai merged 16 commits intomainfrom
codex/pash/session-workspace-git-context
Feb 3, 2026
Merged

make codex better at git#10145
pash-openai merged 16 commits intomainfrom
codex/pash/session-workspace-git-context

Conversation

@pash-openai
Copy link
Contributor

adds basic git context to the session prefix so the model can anchor git actions and be a bit more version-aware. structured it in a multiroot-friendly shape even though we only have one root today

@pash-openai pash-openai changed the title make codex better at git feat: make codex better at git Jan 29, 2026
@pash-openai pash-openai changed the title feat: make codex better at git make codex better at git Jan 29, 2026
Copy link
Contributor

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

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: 884de2d53b

ℹ️ 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".

Copy link
Contributor

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

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: 6057f2d49a

ℹ️ 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".

@pash-openai pash-openai force-pushed the codex/pash/session-workspace-git-context branch from 9326378 to 05e0857 Compare January 29, 2026 09:26
Copy link
Contributor

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

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: 30781cde87

ℹ️ 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".

@pash-openai pash-openai force-pushed the codex/pash/session-workspace-git-context branch from 30781cd to b705c11 Compare January 30, 2026 02:19
Copy link
Contributor

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

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: 3c43909332

ℹ️ 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".

@pash-openai pash-openai force-pushed the codex/pash/session-workspace-git-context branch from 3c43909 to efbfa4b Compare January 30, 2026 16:40
Copy link
Contributor

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

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: 413d8435f9

ℹ️ 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".

@pash-openai pash-openai marked this pull request as draft January 30, 2026 17:42
@pash-openai pash-openai force-pushed the codex/pash/session-workspace-git-context branch from 413d843 to 121f081 Compare January 30, 2026 19:31
@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Jan 30, 2026
@pash-openai pash-openai force-pushed the codex/pash/session-workspace-git-context branch 2 times, most recently from a77b812 to 3a47181 Compare January 30, 2026 22:02
@pash-openai pash-openai marked this pull request as ready for review January 30, 2026 22:23
) -> Option<std::process::Output> {
let mut command = Command::new("git");
command.args(args).current_dir(cwd);
command.kill_on_drop(true);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added kill_on_drop as a general safeguard - it doesn’t look like any callers rely on git continuing after the future is dropped

@pash-openai pash-openai force-pushed the codex/pash/session-workspace-git-context branch from b290663 to 2bc0f86 Compare February 2, 2026 06:01
websocket_last_items: Vec::new(),
transport_manager: self.state.transport_manager.clone(),
turn_state: Arc::new(OnceLock::new()),
turn_metadata_header,
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can build the header on demand instead of storing it on the session

Copy link
Collaborator

@aibrahim-oai aibrahim-oai left a comment

Choose a reason for hiding this comment

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

Let's add an integration test to test the flow e2e

@pash-openai pash-openai force-pushed the codex/pash/session-workspace-git-context branch from 800cfc9 to c73c582 Compare February 2, 2026 19:02
@pash-openai pash-openai force-pushed the codex/pash/session-workspace-git-context branch from da20ff0 to f1052e0 Compare February 2, 2026 22:36
.unwrap_or_else(|_| cwd.to_path_buf())
.to_string_lossy()
.into_owned();
for _attempt in 0..10 {
Copy link
Contributor Author

@pash-openai pash-openai Feb 2, 2026

Choose a reason for hiding this comment

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

this test is a bit involved (~200 lines) because i have to make multiple requests to verify that headers are eventually sent (because of the async prewarm)

Copy link
Collaborator

@aibrahim-oai aibrahim-oai left a comment

Choose a reason for hiding this comment

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

LGTM, we have a lot of helper tests for integration tests that you can use to make the test shorter

@pash-openai
Copy link
Contributor Author

/merge

@pash-openai pash-openai merged commit 019d89f into main Feb 3, 2026
32 checks passed
@pash-openai pash-openai deleted the codex/pash/session-workspace-git-context branch February 3, 2026 00:57
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2026
@pash-openai
Copy link
Contributor Author

LGTM, we have a lot of helper tests for integration tests that you can use to make the test shorter

For posterity, I tried using helper tests to make this test shorter, but in this case they obscured the runtime behavior and made the teest less reliable around the async prewarm timing. So I kept the test explicit on purpose so the behavior is clear and stable - i'll keep an eye on it for follow-ups

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

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants