Problem
claude-wrapper already intercepts every claude invocation and is project-aware
(session naming keys off repo/directory in lib/remote-session.sh), but has no concept of
model/effort selection. That's currently all-or-nothing via the global
~/.claude/settings.json (effortLevel, and until recently alwaysThinkingEnabled) —
there's no way to e.g. default a docs-only repo to a cheaper tier and an active
app-debugging repo to a stronger one, short of hand-editing a local .claude/settings.json
per repo.
This is the layer positioned to make Anthropic's
model/effort guidance
("match model to task hardness") automatic per project instead of a manual global dial.
Proposed fix
Extend the wrapper to read an optional per-repo hint (e.g. a value in
.claude/config.sh, already templated in dev-env's .claude/config.sh.template, or a new
key) and inject --model/--effort-level alongside the existing --remote-control
injection in bin/claude-wrapper. Needs:
- New
lib/model-selection.sh module
- Tests mirroring
tests/test-remote-session.sh's pattern
- A decision on default tiering rules (by repo language/build tooling, or an explicit
opt-in list per repo)
Scope note
This is the largest of the three related follow-ups — new functionality, not a config
tweak. Route through the normal plan → subagent-driven execution flow rather than an
inline patch.
Reference
Full analysis: dev-env repo, docs/plans/2026-07-31-cost-perf-followups.md, item 3 (listed
as item 4 in the original chat evaluation).
Claude-Session: https://claude.ai/code/session_017PUAfxBAZPUSyt3nYzwqcq
Problem
claude-wrapperalready intercepts everyclaudeinvocation and is project-aware(session naming keys off repo/directory in
lib/remote-session.sh), but has no concept ofmodel/effort selection. That's currently all-or-nothing via the global
~/.claude/settings.json(effortLevel, and until recentlyalwaysThinkingEnabled) —there's no way to e.g. default a docs-only repo to a cheaper tier and an active
app-debugging repo to a stronger one, short of hand-editing a local
.claude/settings.jsonper repo.
This is the layer positioned to make Anthropic's
model/effort guidance
("match model to task hardness") automatic per project instead of a manual global dial.
Proposed fix
Extend the wrapper to read an optional per-repo hint (e.g. a value in
.claude/config.sh, already templated in dev-env's.claude/config.sh.template, or a newkey) and inject
--model/--effort-levelalongside the existing--remote-controlinjection in
bin/claude-wrapper. Needs:lib/model-selection.shmoduletests/test-remote-session.sh's patternopt-in list per repo)
Scope note
This is the largest of the three related follow-ups — new functionality, not a config
tweak. Route through the normal plan → subagent-driven execution flow rather than an
inline patch.
Reference
Full analysis:
dev-envrepo,docs/plans/2026-07-31-cost-perf-followups.md, item 3 (listedas item 4 in the original chat evaluation).
Claude-Session: https://claude.ai/code/session_017PUAfxBAZPUSyt3nYzwqcq