Skip to content

feat(effort): add xhigh/auto levels + ephemeral --effort flag#3694

Open
ckumar1 wants to merge 1 commit intogastownhall:mainfrom
quickserve-ai:feat/effort-xhigh
Open

feat(effort): add xhigh/auto levels + ephemeral --effort flag#3694
ckumar1 wants to merge 1 commit intogastownhall:mainfrom
quickserve-ai:feat/effort-xhigh

Conversation

@ckumar1
Copy link
Copy Markdown
Contributor

@ckumar1 ckumar1 commented Apr 20, 2026

Summary

Adds two new effort levels (xhigh and auto) to ValidEffortLevels, plus an ephemeral --effort flag on gt start and a GT_EFFORT environment-variable tier in ResolveRoleEffort.

Motivation

Multi-agent fleets benefit from being able to bump a single session to a higher effort tier for a specific task without permanently editing per-role config. Today the only knobs are the role-default tier in role_effort.<role> (persistent) and command-line effort flags on downstream commands — there is no way to say "just this gt start, run the agent at xhigh effort." The ephemeral --effort flag and GT_EFFORT env var fill that gap, and xhigh/auto give the fleet meaningful higher tiers to target.

Changes

  • internal/config/types.go, internal/config/cost_tier.go: add xhigh and auto to ValidEffortLevels and the cost-tier ordering.
  • internal/config/env.go, internal/config/loader.go, internal/config/env_test.go, internal/config/cost_tier_test.go: add GT_EFFORT as a tier in ResolveRoleEffort (env > flag > role > default), with tests.
  • internal/cmd/start.go: add --effort flag to gt start, ephemeral (applies only to that invocation, does not modify config).
  • CHANGELOG.md: note the additions.

Testing

  • go test ./internal/config/... — green, including the new env_test.go cases.
  • go test ./... — green locally.
  • Manual: GT_EFFORT=xhigh gt start <role> picks up the tier; gt start <role> --effort auto picks up the flag; neither persists after the session ends.

Checklist

  • Code follows project style (conventional commits, existing config package conventions).
  • Tests added for env-var tier resolution and the new level ordering.
  • No breaking changes — existing low/medium/high continue to work unchanged; xhigh and auto are additive.

Notes

This change originated as an operational patch on our fork's carry/operational branch. Filing upstream per the "graduate to upstream" path in our carry-patch lifecycle — both towns would benefit from not maintaining a local carry patch for this.

Claude Code 2.x (and 4.x-class models) exposes two effort levels gastown
previously rejected: `xhigh` (extended reasoning budget) and `auto` (model
picks adaptively). Rigs can now opt into deeper reasoning per-role via
role_effort in rig settings, and operators can push an entire session into
xhigh/auto ephemerally via `gt start --effort <level>` without editing config.

Changes:
- ValidEffortLevels + IsValidEffortLevel accept "xhigh" and "auto"
- ResolveRoleEffort gains Tier 0: GT_EFFORT env var, set by `gt start --effort`;
  beats GT_COST_TIER and rig/town role_effort. Invalid values warn + skip.
- gt start --effort <level> validates against ValidEffortLevels and exports
  GT_EFFORT for deacon/mayor and every agent they later spawn.
- Deprecation notice for CLAUDE_CODE_EFFORT_LEVEL now points at --effort /
  GT_EFFORT as the session-scoped escape hatch.
- Comments on TownSettings.RoleEffort and RigSettings.RoleEffort updated to
  list the new levels.

Tests: GT_EFFORT precedence, xhigh/auto acceptance, invalid fallthrough.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Executed-By: gastown/crew/woodhouse
@github-actions github-actions bot added the status/needs-triage Inbox — we haven't looked at it yet label Apr 20, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/cmd/start.go 16.66% 5 Missing ⚠️
internal/config/cost_tier.go 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@asblab asblab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Posted in error by an automated process — --dangerously-skip-permissions got me. Please dismiss.)

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

Labels

status/needs-triage Inbox — we haven't looked at it yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants