Skip to content

Conversation

@bolinfest
Copy link
Collaborator

@bolinfest bolinfest commented Nov 18, 2025

This adds the following fields to ThreadStartResponse and ThreadResumeResponse:

    pub model: String,
    pub model_provider: String,
    pub cwd: PathBuf,
    pub approval_policy: AskForApproval,
    pub sandbox: SandboxPolicy,
    pub reasoning_effort: Option<ReasoningEffort>,

This is important because these fields are optional in ThreadStartParams and ThreadResumeParams, so the caller needs to be able to determine what values were ultimately used to start/resume the conversation. (Though note that any of these could be changed later between turns in the conversation.)

Though to get this information reliably, it must be read from the internal SessionConfiguredEvent that is created in response to the start of a conversation. Because SessionConfiguredEvent (as defined in codex-rs/protocol/src/protocol.rs) did not have all of these fields, a number of them had to be added as part of this PR.

Because SessionConfiguredEvent is referenced in many tests, test instances of SessionConfiguredEvent had to be updated, as well, which is why this PR touches so many files.

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 1568 to 1579
let thread = summary_to_thread(&summary);
let response = ThreadResumeResponse {
thread,
model: session_configured.model,
model_provider: summary.model_provider,
cwd: summary.cwd,
approval_policy: approval_policy.into(),
Copy link
Contributor

Choose a reason for hiding this comment

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

P1 Badge ThreadResumeResponse uses stale provider/cwd values

When resuming a thread, the response populates model_provider and cwd from the pre‑existing rollout summary rather than from the configuration used to spawn the resumed session. If the caller passes overrides in ThreadResumeParams (e.g. switching providers or changing working directory), the new session will run with the overridden values but the API will still return the old values stored in the rollout, so clients cannot reliably determine the effective configuration after a resume. Consider sourcing these fields from session_configured or the derived config instead of summary so the response reflects the actual session settings.

Useful? React with 👍 / 👎.

@bolinfest bolinfest force-pushed the pr6847 branch 9 times, most recently from b2db629 to 933cd79 Compare November 19, 2025 01:48
@bolinfest bolinfest merged commit a75321a into main Nov 19, 2025
48 of 50 checks passed
@bolinfest bolinfest deleted the pr6847 branch November 19, 2025 05:18
@github-actions github-actions bot locked and limited conversation to collaborators Nov 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.

3 participants