Skip to content

feat: show the effort level Claude works at, next to its model - #131

Merged
kalaspuff merged 2 commits into
mainfrom
fctl/73-is-it-possible-to-read-from-a-session-wh
Oct 20, 2026
Merged

kalaspuff merged 2 commits into
mainfrom
fctl/73-is-it-possible-to-read-from-a-session-wh

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

The session page's sidebar showed the model a session runs on, but not its effort level, so nobody following a session could tell how hard Claude was working. fctl passes --effort only when a project or session sets one; otherwise Claude Code picks its own default (2.1.304 runs Opus 5.5 at medium). Organization limits, Claude's settings and its environment can change that level, and it can change during a session: /effort high in a message, or the Claude apps over Remote Control. Claude's system/init message, where the model comes from, has no effort level in -p mode.

What changed

  • fctl-agent asks Claude which effort level it works at with the get_settings control request, once Claude has started and again after each turn. It reports the answer's applied.effort in the session state (SessionState.effort: low … max, or empty when the model takes none). Claude answers get_settings from its own state, without a model call, and applied is what it sends the API after the session's --effort, settings, environment, organization limits and the model's default. The request doesn't block the supervisor: Claude::ask returns a future that another task waits on, and the answer comes back as Work::Effort. A Claude Code without get_settings answers with an error, and the session reports nothing.
  • Protocol: SessionState.effort and Session.effort are both optional. Older agents leave them out, and older control planes ignore them.
  • Control plane: SessionDO validates the level, keeps it in the session summary (so viewers get it live), and writes it through to a new D1 column, claude_effort (migration 0015_session_claude_effort.sql). sessions.effort stays the level the session asked for, which its runs pass to Claude. Overwriting it with the reported level, as happens with model, would make a resumed session keep that level instead of following its project's setting. The account export includes the new column.
  • Web: the sidebar's Session section shows Effort under Model.
  • CLI: fctl show prints effort:, and --json has effort.
  • fake-claude answers get_settings (--effort, else medium) and changes its level on effort <level> or /effort <level>. The smoke test now also checks that its session reports medium.
  • Docs: a "Model and effort" section in the architecture doc, fake-claude's new words in the development doc, fctl show in the CLI doc, and the self-hosting doc's log line now says 16 migrations.
$ fctl show playground#2
playground#2 write notes.md
status:   ○ idle — Waiting for a message
by:       Dev Owner
branch:   fctl/2-write-notes-md (from main)
runner:   dev-host
model:    claude-fake-1
effort:   high
follow:   yes
work:     1 turn · 3 tool calls · 0 files (+0 −0)

Verification

  • The real Claude Code 2.1.304 in this sandbox, over stream-json, with no message sent: get_settings answers applied: {"model": "claude-opus-5-5", "effort": "medium", …} without --effort, and claude-sonnet-5-5 / low with --model sonnet --effort low. Sending /effort high as a message set the level with no model call (total_cost_usd: 0, a <synthetic> reply), and get_settings said high afterwards.
  • Unit tests: claude::applied_effort (on 2.1.304's answer, null, and answers without applied); the supervisor asking at the end of a turn and reporting a change once, with a stub Claude Code that answers as 2.1.304 does; SessionState with and without effort; fake-claude's get_settings before and after effort turns.
  • cargo xtask check passes, and so does cargo xtask dev --smoke, which now checks the effort level through the API.
  • cargo xtask dev: after fctl run --effort high "write notes.md", fctl show prints effort: high. With the session page open, fctl send playground#2 "/effort max" changed the row to max without a reload, and effort none removed it (the API followed after SessionDO's 5-second write-through). Stopping and resuming brought back high, the level the session asked for.
  • Standalone: FCTL_SETUP_TOKEN=dev-setup-token cargo xtask serve on a new data directory logs Applied 16 database migrations, and cargo xtask dev --smoke --server http://localhost:8787 passes through it.

Screenshots

At 1936fdd: the Session section of the sidebar, for a session started with --effort high, 1440 px wide. The sidebar is hidden on narrower screens, so phones look the same as before.

Before After
Light Before, light: Started by, Created, From, Model, Runner, Billing After, light: Effort high under Model claude-fake-1
Dark Before, dark: no Effort row After, dark: Effort high under Model claude-fake-1

The privacy policy in hyperstructure/fctl-site needs no change: it describes sessions by their task, status, branch, pull requests and transcript, not their settings, and the effort level is kept as long as the session, like its model.

Made in the fctl session https://app.fctl.sh/s/ses_01M5CJW6J3ADQ4E3190AC5952E.

fctl-sh Bot added 2 commits October 20, 2026 12:25
fctl-agent asks Claude with the get_settings control request once Claude
has started and after each turn, and reports applied.effort in the
session state. SessionDO keeps it in the session summary and writes it
to D1's new claude_effort column; sessions.effort stays the level the
session asked for. The session page's sidebar shows it under Model, and
fctl show prints it. fake-claude answers get_settings and changes its
effort level on `effort <level>`.
@fctl-sh
fctl-sh Bot requested a review from kalaspuff as a code owner October 20, 2026 12:31
@kalaspuff
kalaspuff merged commit b63ed75 into main Oct 20, 2026
5 checks passed
@kalaspuff
kalaspuff deleted the fctl/73-is-it-possible-to-read-from-a-session-wh branch October 20, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant