Skip to content

Move installation ID resolution out of core startup#21182

Merged
jif-oai merged 9 commits intomainfrom
jif/rework-session-id-2
May 6, 2026
Merged

Move installation ID resolution out of core startup#21182
jif-oai merged 9 commits intomainfrom
jif/rework-session-id-2

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented May 5, 2026

Summary

  • resolve or inject the installation ID before core startup and pass it through ThreadManager, CodexSpawnArgs, and Session as a plain String
  • keep child sessions on the parent installation ID instead of rediscovering it inside core
  • propagate installation ID startup failures in mcp-server instead of panicking

Why

Core was still touching the filesystem on the session startup path to discover installation_id. This moves that work to the outer host boundary so core no longer depends on codex_home reads during session construction.

Resolve or inject installation IDs at the host boundary and pass them into ThreadManager and Session as plain Strings.

This removes filesystem access from the core session startup path, keeps spawned children on the same installation ID, and propagates startup failures without panicking in mcp-server.

Validation:
- just fix -p codex-core -p codex-core-api -p codex-app-server -p codex-mcp-server -p codex-thread-manager-sample
- just fmt
- cargo test -p codex-mcp-server
- cargo test -p codex-core --test all includes_conversation_id_and_model_headers_in_request
- cargo test -p codex-core --test all chatgpt_auth_sends_correct_request
- cargo test -p codex-core --test all prefers_apikey_when_config_prefers_apikey_even_with_chatgpt_tokens
- cargo test -p codex-core --test all list_skills_skips_cwd_roots_when_environment_disabled
- cargo test -p codex-core --test all with_additional_permissions_requires_approval_under_on_request
- cargo test -p codex-core thread_manager::tests::explicit_installation_id_skips_codex_home_file

Co-authored-by: Codex <noreply@openai.com>
@jif-oai jif-oai requested a review from a team as a code owner May 5, 2026 11:48
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented May 5, 2026

@codex review

Copy link
Copy Markdown
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: 540a678365

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

Comment thread codex-rs/core/src/thread_manager.rs
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented May 5, 2026

@codex review

Copy link
Copy Markdown
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: 8cb15b37eb

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

Comment thread codex-rs/app-server/src/lib.rs Outdated
jif-oai and others added 4 commits May 5, 2026 13:36
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented May 6, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Keep it up!

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

Comment thread codex-rs/core/src/thread_manager.rs Outdated
jif-oai and others added 2 commits May 6, 2026 10:55
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented May 6, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Can't wait for the next one!

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

@jif-oai jif-oai enabled auto-merge (squash) May 6, 2026 10:33
@jif-oai jif-oai merged commit 8f3bb35 into main May 6, 2026
26 checks passed
@jif-oai jif-oai deleted the jif/rework-session-id-2 branch May 6, 2026 10:48
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants