Skip to content

Add per-project model/effort auto-selection #57

Description

@twistedmelonman

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions