You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Claude Code provider: show which model an alias actually ran (e.g. opus → claude-opus-5-5)
#717
The Claude Code provider offers the CLI aliases opus, sonnet and haiku (CLAUDE_CODE_MODELS in src/agent/claude-code/provider.ts). The CLI resolves each alias to a concrete model, and that resolution changes when Anthropic ships a new model or the CLI updates. LearnHarness shows and stores only the alias:
The composer's model picker shows opus.
Saved assistant messages record "provider": "claude-code", "model": "opus", and turns[].model records claude-code:opus.
So a learner can't tell from the app which model taught a given turn. After a CLI update, two turns both labelled opus may have run different models. The only way I found to check is outside the app, for example claude -p "hi" --model opus --output-format json and reading modelUsage.
docs/claude-code.md already says these are "CLI aliases, not pinned underlying versions", so the current behavior is documented. This proposal is about making the resolved model visible, not about pinning.
Observed
LearnHarness 0.6.1, Windows 11, Claude Code CLI 2.1.323, Strong slot = claude-code:opus, effort high.
A saved session (chats/*.json) contains no concrete model ID anywhere for Claude Code turns, only opus.
Proposed behavior (working prototype in a PR)
The CLI's initialize control response (no message, no quota) already lists each alias with its canonical ID and its own label, e.g. {"value":"opus","resolvedModel":"claude-opus-5-5","displayName":"Opus 5.5"} on CLI 2.1.323. The prototype queries it when the model list loads (cached 10 min) and shows Opus 5.5 / Sonnet 5.5 / Haiku 5.5 on the composer chip, in the model menu and in Settings, with the canonical ID in the tooltip. The alias stays the stored selection key; if the CLI doesn't answer, labels stay as today.
Prototype: #716
Questions for maintainers
Is this worth having in core?
Is querying initialize at catalog load acceptable, or should it be opt-in? Should the per-response model also be persisted on each message (a storage addition)?
Where should it appear: Session stats, the model chip tooltip, the per-turn usage row, or somewhere else?
Field name and placement, if persisted (for example resolvedModel on the assistant message, next to cliContextWindow).
Related: #377 (offer fable as an alias), #474 (mentions opus = claude-opus-5-5 from CLI output).
I'm happy to implement it once the shape is agreed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
The Claude Code provider offers the CLI aliases
opus,sonnetandhaiku(CLAUDE_CODE_MODELSinsrc/agent/claude-code/provider.ts). The CLI resolves each alias to a concrete model, and that resolution changes when Anthropic ships a new model or the CLI updates. LearnHarness shows and stores only the alias:opus."provider": "claude-code", "model": "opus", andturns[].modelrecordsclaude-code:opus.So a learner can't tell from the app which model taught a given turn. After a CLI update, two turns both labelled
opusmay have run different models. The only way I found to check is outside the app, for exampleclaude -p "hi" --model opus --output-format jsonand readingmodelUsage.docs/claude-code.mdalready says these are "CLI aliases, not pinned underlying versions", so the current behavior is documented. This proposal is about making the resolved model visible, not about pinning.Observed
claude-code:opus, effort high.chats/*.json) contains no concrete model ID anywhere for Claude Code turns, onlyopus.Proposed behavior (working prototype in a PR)
The CLI's
initializecontrol response (no message, no quota) already lists each alias with its canonical ID and its own label, e.g.{"value":"opus","resolvedModel":"claude-opus-5-5","displayName":"Opus 5.5"}on CLI 2.1.323. The prototype queries it when the model list loads (cached 10 min) and showsOpus 5.5/Sonnet 5.5/Haiku 5.5on the composer chip, in the model menu and in Settings, with the canonical ID in the tooltip. The alias stays the stored selection key; if the CLI doesn't answer, labels stay as today.Prototype: #716Questions for maintainers
initializeat catalog load acceptable, or should it be opt-in? Should the per-response model also be persisted on each message (a storage addition)?resolvedModelon the assistant message, next tocliContextWindow).Related: #377 (offer
fableas an alias), #474 (mentionsopus=claude-opus-5-5from CLI output).I'm happy to implement it once the shape is agreed.
All reactions