Skip to content

feat(config): per-bot thinking/effort configuration and /effort command#97

Closed
Shiien wants to merge 2 commits intoxvirobotics:mainfrom
Shiien:feat/thinking-effort-config
Closed

feat(config): per-bot thinking/effort configuration and /effort command#97
Shiien wants to merge 2 commits intoxvirobotics:mainfrom
Shiien:feat/thinking-effort-config

Conversation

@Shiien
Copy link
Copy Markdown

@Shiien Shiien commented Mar 15, 2026

What

Configurable thinking and effort levels for Claude sessions, with runtime switching via /effort command.

Why

Different use cases benefit from different reasoning levels. Quick questions need less thinking (lower cost, faster), while complex tasks benefit from maximum effort. This lets operators configure defaults per bot and users adjust on the fly.

How

Configuration:

  • Add thinking (object, e.g. {"type": "adaptive"}) and effort (low/medium/high/max) to BotConfig
  • Configurable per bot in bots.json, with defaults: thinking=adaptive, effort=max
  • Passed to Claude Agent SDK query() options

Runtime command:

  • /effort <level> — Switch effort level for current session (low/medium/high/max)
  • Validates input, updates session config, confirms to user

Card display:

  • Show model name, thinking mode, and effort level in completion card stats
  • Improved stats format: use · separator, add cost display

Safety:

  • Duplicate tool_result suppression in executor (prevents API 400 errors when SDK and bridge both respond to the same tool)
  • Re-throw updateCard errors for proper propagation

Checklist

  • Code compiles without errors (npx tsc --noEmit)
  • All tests pass (npm test — 175 tests)
  • Lint passes (npm run lint)
  • Build succeeds (npm run build)
  • Changes focused on thinking/effort configuration

…ommand

Add configurable thinking and effort levels for Claude sessions:

- Add `thinking` and `effort` fields to BotConfig (per-bot JSON and env)
- Pass thinking/effort to Claude Agent SDK query options
- Display model, thinking mode, and effort level in Feishu/Telegram card stats
- Add `/effort` command for runtime effort level switching within a session
- Add duplicate tool_result suppression in executor to prevent API 400 errors
- Re-throw updateCard errors for proper error propagation
- Improve card stats format (use · separator, add cost display)

Defaults: thinking=adaptive, effort=max (configurable per bot in bots.json)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Shiien Shiien changed the base branch from dev to main March 15, 2026 11:37
@floodsung
Copy link
Copy Markdown
Contributor

Closing — these PRs are outdated as the codebase has diverged significantly. Thank you for the contribution! Feel free to open a fresh PR against the current main if you'd like to revisit.

@floodsung floodsung closed this Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants