Files
ai-agent/backend/conversations.py
Gabriel Vidal 6ae5290453 feat(ai-agent): effort select for claude runs, thinking toggle for pi
The composer's third toolbar chip is now harness-aware: claude models get an
`--effort` select (low|medium|high|xhigh|max) — the CLI's own scale — while pi,
which has no such flag, keeps the binary thinking toggle. The two are one knob
shown per harness, so only the active one is ever sent.

Effort is also a read-side tag: the claude CLI stamps an `effort` field on each
assistant record, so conversations.py mines it into `efforts` (busiest first,
like `models`) and EffortTags renders it on conversation rows and in the detail
header, behind a new "Effort tags" visibility switch.

- sidecar: `_effort_args` (claude-only, allow-list validated) on spawn + resume
- backend: effort on Spawn/ResumeBody, threaded through _send_message and
  stamped into the meta sidecar; resume reuses the level it last ran with
- parser: PARSER_VERSION 23 -> 24 to back-fill `efforts` on past transcripts
- mock: seed cycles every level (+ the untagged case); spawn/resume honour it

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-01 15:53:17 +02:00

65 KiB