Skip to content

fix(server): preserve reasoning effort after restart - #10939

Open
IgniparousTempest wants to merge 1 commit into
pingdotgg:mainfrom
IgniparousTempest:fix/preserve-restart-reasoning-effort
Open

fix(server): preserve reasoning effort after restart#10939
IgniparousTempest wants to merge 1 commit into
pingdotgg:mainfrom
IgniparousTempest:fix/preserve-restart-reasoning-effort

Conversation

@IgniparousTempest

@IgniparousTempest IgniparousTempest commented Sep 9, 2026

Copy link
Copy Markdown

Restart reconciliation resumed provider turns without the thread model selection. Codex therefore rebuilt collaboration settings with its medium-effort fallback, even when the interrupted turn used high or xhigh reasoning.

Forward the persisted thread model selection on automatic continuation. Extend the reconciliation and SQLite-backed startup tests to prove a high-effort selection survives restart, and cover the resulting Codex turn parameters and developer instructions.

Closes #10928.

Verification:

  • vp test run apps/server/src/serverRuntimeStartup.reconcile.test.ts apps/server/src/provider/Layers/CodexSessionRuntime.test.ts
  • vp test run apps/server/integration/orphanedProviderSessionStartup.integration.test.ts
  • vp test run apps/server/src/provider/Layers/CodexAdapter.test.ts
  • vp run --filter t3 typecheck
  • targeted lint and formatting checks

Model: GPT-5.6 via Codex.

Summary by CodeRabbit

  • Bug Fixes

    • Preserved model selection details, including reasoning effort, when continuing sessions after a server restart.
    • Ensured recovered and promptless continuations use the configured provider, model, and reasoning settings.
  • Tests

    • Added coverage confirming reasoning effort is retained in collaboration settings and provider instructions.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 9, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The PR is a focused restart-recovery fix, but it changes an existing automatic continuation path by applying persisted model and reasoning settings that were previously omitted. Because those settings alter downstream model processing behavior, human review is warranted despite the small, well-tested diff.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: f6b183cc-9dcc-4ea4-93c3-d49a22e0b2ad

📥 Commits

Reviewing files that changed from the base of the PR and between 6c58362 and 20967e2.

📒 Files selected for processing (4)
  • apps/server/integration/orphanedProviderSessionStartup.integration.test.ts
  • apps/server/src/provider/Layers/CodexSessionRuntime.test.ts
  • apps/server/src/serverRuntimeStartup.reconcile.test.ts
  • apps/server/src/serverRuntimeStartup.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The restart continuation path now passes the recovered thread’s modelSelection to the provider. Tests verify preservation of Codex reasoning effort through reconciliation, orphaned-session startup, and Codex parameter construction.

Changes

Restart continuation model selection

Layer / File(s) Summary
Propagate selection through restart reconciliation
apps/server/src/serverRuntimeStartup.ts, apps/server/src/serverRuntimeStartup.reconcile.test.ts
Restart continuations now send each recovered thread’s modelSelection. Reconciliation fixtures and expectations cover normal and recovered continuation paths.
Validate Codex reasoning effort preservation
apps/server/src/provider/Layers/CodexSessionRuntime.test.ts, apps/server/integration/orphanedProviderSessionStartup.integration.test.ts
Tests verify that "high" reasoning effort reaches Codex collaboration settings, developer instructions, and orphaned-session continuation input.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 20967

Interrupted Codex turns resumed after restart retain their saved model and reasoning-effort settings, preventing fallback to medium effort. The change is covered across reconciliation and startup continuation paths and is ready to merge.

Suggested reviewers: maria-rcks, t3dotgg, juliusmarminge

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: preserving reasoning effort after a server restart.
Description check ✅ Passed The description explains the problem, the implementation, and verification steps. It is focused and mostly complete, although it does not use the template headings or include the checklist explicitly.
Linked Issues check ✅ Passed The changes satisfy issue #10928 by forwarding the persisted model selection during restart reconciliation and adding tests for preserved reasoning effort and Codex parameters.
Out of Scope Changes check ✅ Passed All implementation and test changes directly support preserving model selection and reasoning effort during automatic continuation after restart. No unrelated changes are evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Continue threads after restarts does not preserve Codex reasoning effort

1 participant