Skip to content

Conversation

pakrym-oai
Copy link
Collaborator

@pakrym-oai pakrym-oai commented Oct 18, 2025

The goal of this change:

  1. Unify user input and user turn implementation.
  2. Have a single place where turn/session setting overrides are applied.
  3. Have a single place where turn context is created.
  4. Create TurnContext only for actual turn and have a separate structure for current session settings (reuse ConfigureSession)

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.

ℹ️ 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 on lines 2894 to 2899
let services = SessionServices {
mcp_connection_manager: McpConnectionManager::default(),
session_manager: ExecSessionManager::default(),
unified_exec_manager: UnifiedExecSessionManager::default(),
notifier: UserNotifier::default(),
notifier: session_configuration.notify.clone(),
rollout: Mutex::new(None),
Copy link
Contributor

Choose a reason for hiding this comment

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

P0 Badge Remove reference to nonexistent SessionConfiguration.notify

The new SessionConfiguration no longer defines a notify field, yet the test helper still tries to read session_configuration.notify.clone() when constructing SessionServices. This code will not compile because the field does not exist on the struct anymore, so any cargo test or build fails immediately. The notifier should be created directly from Config (as done in Session::new) or the field reintroduced.

Useful? React with 👍 / 👎.

- Pass OtelEventManager by reference in make_turn_context to avoid unnecessary clones
- Replace turn_context variable in submission_loop with previous_context to accurately track state
- Unify handling of Op::UserInput and Op::UserTurn; simplify code by reducing duplication
- Update build_environment_update_item to accept Option<&Arc<TurnContext>>
- Ensure environment updates and new turn contexts are handled correctly
- Adjust related tests for
…ic to EnvironmentContext for TurnContext changes
# Conflicts:
#	codex-rs/core/src/codex.rs
@pakrym-oai pakrym-oai merged commit 2287d2a into main Oct 19, 2025
20 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/create-independent-turncontexts branch October 19, 2025 00:43
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2025
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