Skip to content

feat: New agent harness selector - #3821

Merged
charlesvien merged 47 commits into
mainfrom
feat/shared-reasoning-selector
Jul 30, 2026
Merged

feat: New agent harness selector#3821
charlesvien merged 47 commits into
mainfrom
feat/shared-reasoning-selector

Conversation

@charlesvien

@charlesvien charlesvien commented Jul 26, 2026

Copy link
Copy Markdown
Member

Problem

Model and reasoning selection was split across per-surface dropdowns with drifting labels, five duplicated effort-type unions and no way to set context window or fast mode.

https://screen.studio/share/tvIw08EP

Changes

One merged control. Model and reasoning are a single pill ("Claude Opus 5 High") on the new-task composer, channel composer and session view. It opens on a Faster ($) / Smarter ($$$) slider with five preset notches that set model plus effort together (Claude: Sonnet 5 medium/high, Opus 5 medium/xhigh, Fable 5 max; GPT: 5.6 Terra low, then 5.6 Sol low/medium/high/xhigh). The drag is continuous, updates the pill live and snaps on release. A lightning toggle flips fast mode, with a themed hover tooltip showing "Fast Mode (ON/OFF)" and an adapter-specific "Learn more" docs link; the pill gets a yellow inset ring and lightning icon while it's on.

Advanced view. The menu morphs into per-setting submenus: Harness, Model (picker-ordered, restricted models gated), Reasoning (Default badge, "?" docs link on Ultracode), Context Window (200k/1M) and "Reset to default" (middle notch, default context, fast off). A custom off-preset combo opens straight on Advanced until reset.

Behavior.

  • ultracode effort ships on extended Claude models; context window live-toggles the 1M beta; fast mode includes Opus 5 and sits behind posthog-desktop-fast-mode (default off).
  • Selections persist across restarts and restore on the composers; switching harness resets to that harness's middle notch. Existing installs get their saved selections busted once via a store version bump.
  • Cloud runs send the raw effort plus context_window/fast_mode (env-forwarded to the sandbox). Needs feat(tasks): Accept context window and fast mode on runs posthog#73803 deployed first.

Consolidation. EffortLevel, labels and docs URLs live once in @posthog/shared; loops, analytics, settings stores, mobile and the agent package alias them. Loops, settings default effort, autoresearch stage pickers and agent-application config all render the same shared dropdown in list form.

Slider (default view, shown with the fast-mode flag enabled):

Advanced (Reasoning submenu open):

How did you test this?

pnpm typecheck across all 24 packages; full agent/core/ui/workspace-server suites (three consecutive green UI runs after de-flaking the menu tests); drove the real app over CDP to verify the pill, slider, fast toggle, advanced submenus, model ordering and the post-migration defaults (screenshots above).

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

@trunk-io

trunk-io Bot commented Jul 26, 2026

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown

React Doctor found 3 issues in 2 files · 3 warnings.

3 warnings

src/features/sessions/components/ReasoningLevelDropdown.tsx

src/features/sessions/components/ReasoningLevelSelector.tsx

Reviewed by React Doctor for commit 1d83ffb.

@posthog

posthog Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Visual changes approved by @charlesvien — baseline updated in 1d83ffb.

View this run in PostHog

6 changed, 2 removed.

@charlesvien
charlesvien marked this pull request as ready for review July 27, 2026 06:03
@charlesvien charlesvien changed the title feat(sessions): Share reasoning dropdown with ultra tiers feat: New agent harness selector Jul 27, 2026
@charlesvien
charlesvien requested a review from a team July 27, 2026 06:44
@charlesvien
charlesvien force-pushed the feat/shared-reasoning-selector branch from a9daa86 to dabdf26 Compare July 27, 2026 07:03

@tatoalo tatoalo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

noice

@k11kirky k11kirky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

love it

@charlesvien
charlesvien force-pushed the feat/shared-reasoning-selector branch 2 times, most recently from 56da163 to 8033e36 Compare July 28, 2026 23:58
@charlesvien
charlesvien force-pushed the feat/shared-reasoning-selector branch from 8033e36 to 1a06d38 Compare July 30, 2026 05:07
charlesvien and others added 4 commits July 29, 2026 23:20
6 updated, 2 removed
Run: 91fcb151-8635-4f2d-9c3d-a1823d89c17c

Co-authored-by: charlesvien <5378415+charlesvien@users.noreply.github.com>
@charlesvien
charlesvien merged commit 9ad6664 into main Jul 30, 2026
32 checks passed
@charlesvien
charlesvien deleted the feat/shared-reasoning-selector branch July 30, 2026 07:04
Gilbert09 added a commit that referenced this pull request Jul 30, 2026
… (port #3821)

Ports the desktop "new agent harness selector" (#3821) to apps/mobile.

Replaces the separate model and reasoning pills with a single merged pill that
opens a bottom sheet: a Faster→Smarter preset scale (model + effort together),
a fast-mode toggle (flag-gated), a 200k/1M context-window control, and an
Advanced section for picking harness/model/reasoning individually with reset.

Sends context_window and fast_mode on cloud task creation and sandbox warming,
persists the selection, and bumps the preferences store version once so stale
installs land on valid defaults.

Generated-By: PostHog Code
Task-Id: 2af7b99c-c87f-415b-81ef-95a656535821
trunk-io Bot pushed a commit that referenced this pull request Jul 30, 2026
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.

3 participants