Skip to content

fix: prefer Opus 4.6 1M for workers, don't switch desktop session from mobile#487

Closed
PureWeen wants to merge 4 commits intomainfrom
fix/sdk-update-worker-model-mobile
Closed

fix: prefer Opus 4.6 1M for workers, don't switch desktop session from mobile#487
PureWeen wants to merge 4 commits intomainfrom
fix/sdk-update-worker-model-mobile

Conversation

@PureWeen
Copy link
Copy Markdown
Owner

@PureWeen PureWeen commented Apr 4, 2026

Changes

1. Worker models prefer Claude Opus 4.6 1M

  • All 3 built-in presets (PR Review Squad, Implement & Challenge, Skill Validator) now use claude-opus-4.6-1m for orchestrators
  • Added ModelHelper.ResolvePreferredModel() — resolves preferred model against available models at runtime, falling back to claude-opus-4.6 if 1M isn't available
  • Fallback is applied in CreateGroupFromPresetAsync for both orchestrator and worker sessions

2. Mobile session switching no longer changes desktop view

  • Removed SetActiveSession() call from WsBridgeServer.SwitchSession handler
  • Mobile can browse and send to any session without disrupting the desktop user's active view
  • History is still sent to the requesting mobile client as before

Tests

  • 3,118 tests passing, 0 failures
  • Updated GroupPresetTests and MultiAgentScenarioTests for new model defaults
  • Updated SwitchSession_BroadcastsUpdatedActiveSession to verify desktop session is NOT changed

@PureWeen
Copy link
Copy Markdown
Owner Author

PureWeen commented Apr 4, 2026

🤖 Multi-Model Code Review — R1 (PR #487)

Reviewers: Claude Opus 4.6, Claude Sonnet 4.6, GPT-5.3-Codex
CI Status: ℹ️ No CI checks configured
Prior comments: None (fresh review)


Summary

Two changes: (1) Built-in presets now prefer claude-opus-4.6-1m with runtime fallback via ModelHelper.ResolvePreferredModel(), (2) Mobile session switching no longer changes the desktop's active session.


Consensus Findings

No consensus findings. Four observations were each flagged by only 1/3 models:

Observation Model Notes
Worker prompts lost model names → workers can't dispatch specific models Opus (1/3) Sonnet/Codex: Workers use the task tool with model parameter; model assignment happens at session creation via preset.WorkerModels[i], not from prompt text. The prompt change to generic descriptions ("deep reasoning", "fast pattern matching") doesn't affect task tool dispatch.
Test assertion ?? "switch-b" makes NotEqual brittle on null Sonnet (1/3) Opus/Codex: In the test setup, CreateSessionAsync("switch-a") sets active session first, so GetActiveSession() is never null. The assertion correctly verifies NotEqual("switch-b", "switch-a").
Remote mode sends unresolved model to server Opus (1/3) The remote path sends preset metadata to the server, which does its own model resolution. Not a desktop-side bug.
SetSessionPreferredModel stores unresolved model after fallback Codex (1/3) Opus/Sonnet: The preferred model metadata is intentional — it records user intent. EnsureSessionModelAsync re-resolves at runtime.

Architecture Assessment (3/3 agree)

  • ResolvePreferredModel fallback logic: Correct. Null/empty availableModels → returns preferred (safe, SDK handles). Match found → returns it. No match → tries fallbacks → last resort returns preferred. ✅
  • Mobile switch isolation: Clean removal of SetActiveSession(). BroadcastSessionsList() correctly sends unchanged desktop state. SendSessionHistoryToClient sends history to requesting client only. ✅
  • Test updates: Tests properly verify the new behavior — desktop active session stays unchanged after mobile switch. ✅
  • Prompt text changes: Model name references removed from worker prompts, replaced with generic role descriptions. Workers still receive model assignment via WorkerModels[i] at session creation. ✅

Test Coverage

  • SessionOrganizationTests updated for new model defaults (claude-opus-4.6-1m)
  • WsBridgeIntegrationTests updated to verify desktop session NOT changed on mobile switch
  • 🟢 ResolvePreferredModel has no dedicated unit test — logic is simple (3 branches) and tested indirectly via preset creation. Non-blocking.

Verdict: ✅ Approve

Clean PR. Model fallback logic is correct, mobile switch isolation is properly implemented, tests are updated. No consensus issues found across 3 models.

PureWeen and others added 3 commits April 4, 2026 08:54
…m mobile

- Update all built-in presets (PR Review Squad, Implement & Challenge, Skill Validator)
  to prefer claude-opus-4.6-1m for orchestrators
- Add ModelHelper.ResolvePreferredModel() for runtime fallback to claude-opus-4.6
  when 1M context isn't available
- Remove SetActiveSession call from WsBridgeServer SwitchSession handler —
  mobile session switching should not change the desktop's active view
- Update tests to match new model defaults and bridge behavior

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Workers now refer to reviewers generically ("a model", "reviewer 1/2/3")
instead of exposing specific model names in review output. Updated tests
to assert model names are NOT present in prompts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Convert Chat/Plan/Autopilot buttons to a dropdown on mobile (640px)
- Hide log count, skills, agents from status bar on mobile
- Reduce textarea min-height to 2.2rem on mobile
- Remove double nav-bar-height padding from input-row

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen PureWeen force-pushed the fix/sdk-update-worker-model-mobile branch 3 times, most recently from 7bfaf9a to d28fd9e Compare April 4, 2026 14:33
Add padding-top to mobile-flyout-sidebar session-list when status-filter-bar
is present, matching the desktop pattern. The Attention/All/Idle filter bar
is position:absolute and was covering the first sessions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen
Copy link
Copy Markdown
Owner Author

PureWeen commented Apr 4, 2026

Split into separate PRs: #498 (mobile UI fixes) and #499 (model preferences + prompt changes)

@PureWeen PureWeen closed this Apr 4, 2026
PureWeen added a commit that referenced this pull request Apr 4, 2026
…#499)

Split from #487 — model/prompt changes only.

### Changes
- All built-in presets prefer `claude-opus-4.6-1m` with runtime fallback
to `claude-opus-4.6`
- `ModelHelper.ResolvePreferredModel()` checks availability before using
preferred model
- PR Review worker prompts no longer mention specific model names —
refer to "a reviewer" generically

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 4, 2026
…ndence (#498)

Purely mobile fixes, split from #487.

### Changes
- **Bridge session switch independence** — mobile SwitchSession no
longer changes desktop's active session
- **Compact input layout** — mode switcher (Chat/Plan/Autopilot)
condensed to dropdown on mobile, smaller textarea, status bar extras
hidden
- **Sidebar filter bar overlap fixed** — Attention/All/Idle bar no
longer floats over session list in mobile flyout

Desktop is untouched — all CSS changes are inside `@media (max-width:
640px)` or scoped to `.mobile-flyout-sidebar`.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant