Skip to content

fix: Preserve cloud reasoning level after initial prompt#2272

Merged
charlesvien merged 3 commits into
graphite-base/2272from
05-20-preserve_cloud_reasoning_level_after_initial_prompt
May 21, 2026
Merged

fix: Preserve cloud reasoning level after initial prompt#2272
charlesvien merged 3 commits into
graphite-base/2272from
05-20-preserve_cloud_reasoning_level_after_initial_prompt

Conversation

@charlesvien
Copy link
Copy Markdown
Member

@charlesvien charlesvien commented May 21, 2026

Problem

Cloud task reasoning level dropdown resets from the user's chosen value (e.g. "max") to "high" after the initial prompt, so follow-up resumed runs use the wrong effort.

Closes #2167

Changes

  1. Read task.latest_run.reasoning_effort in useSessionConnection and thread it into watchCloudTask
  2. Add initialReasoningEffort param to watchCloudTask and fetchAndApplyCloudPreviewOptions
  3. Override the server's hardcoded "high" default with the run's actual value when merging preview config into the session, mirroring the existing initialModel pattern
  4. Extend the preview-options merge test to assert the effort override is honored

How did you test this?

Manually

Publish to changelog?

no

@charlesvien charlesvien changed the title Preserve cloud reasoning level after initial prompt fix: Preserve cloud reasoning level after initial prompt May 21, 2026
@charlesvien charlesvien force-pushed the 05-20-unblock_cloud_branch_picker_during_slow_remote_load branch from 286cab6 to a9452b8 Compare May 21, 2026 00:43
@charlesvien charlesvien force-pushed the 05-20-preserve_cloud_reasoning_level_after_initial_prompt branch 2 times, most recently from a8d5547 to 53893d0 Compare May 21, 2026 00:52
@charlesvien charlesvien force-pushed the 05-20-unblock_cloud_branch_picker_during_slow_remote_load branch from a9452b8 to 22da025 Compare May 21, 2026 00:52
@charlesvien charlesvien force-pushed the 05-20-preserve_cloud_reasoning_level_after_initial_prompt branch from 53893d0 to a0fd88e Compare May 21, 2026 01:13
@charlesvien charlesvien marked this pull request as ready for review May 21, 2026 01:41
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 21, 2026

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/code/src/renderer/features/sessions/service/service.test.ts:3482
**Prefer parameterised tests for the two `sendPrompt` effort cases**

The two new tests ("preserves prior reasoning effort…" and "uses newRun.reasoning_effort over prior effort…") are structurally identical — they share all mock setup and only differ in `priorEffort`, `newRun.reasoning_effort`, and the expected `initialReasoningEffort`. The team rule is to prefer parameterised tests; an `it.each` table over `[priorEffort, newRunEffort, expected]` rows would express both cases with no duplication and make future variants (e.g. `undefined` vs `null` inputs) trivial to add.

Reviews (1): Last reviewed commit: "refactor watchCloudTask to options bag" | Re-trigger Greptile

Comment thread apps/code/src/renderer/features/sessions/service/service.test.ts
@charlesvien charlesvien force-pushed the 05-20-preserve_cloud_reasoning_level_after_initial_prompt branch from f6f4589 to ca5dc22 Compare May 21, 2026 02:10
@charlesvien charlesvien force-pushed the 05-20-unblock_cloud_branch_picker_during_slow_remote_load branch from e5384e1 to 942f2bf Compare May 21, 2026 02:10
@charlesvien charlesvien force-pushed the 05-20-preserve_cloud_reasoning_level_after_initial_prompt branch from ca5dc22 to a19b8e0 Compare May 21, 2026 03:44
@charlesvien charlesvien force-pushed the 05-20-unblock_cloud_branch_picker_during_slow_remote_load branch from 942f2bf to 2011089 Compare May 21, 2026 03:44
@charlesvien charlesvien added the Create Release This will trigger a new release label May 21, 2026 — with Graphite App
@graphite-app graphite-app Bot changed the base branch from 05-20-unblock_cloud_branch_picker_during_slow_remote_load to graphite-base/2272 May 21, 2026 18:37
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 21, 2026

Merge activity

  • May 21, 7:16 PM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • May 21, 7:16 PM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..

@charlesvien charlesvien merged commit 7bf1fad into graphite-base/2272 May 21, 2026
16 of 21 checks passed
@charlesvien charlesvien deleted the 05-20-preserve_cloud_reasoning_level_after_initial_prompt branch May 21, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Create Release This will trigger a new release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants