# Backlog

Known issues / pre-existing bugs not fixed in their discovery PR. Each entry
includes scope, current impact, and a sketch of the fix.

---

## thinking.budget_tokens — snake_case validator vs camelCase SDK

**Discovered:** 2026-04-29 during the `effort` wiring criticizer pass.

**Files:**
- [utils/effective-config.js:83-89](utils/effective-config.js#L83) — validator
- [engines/claude-engine.js:320](engines/claude-engine.js#L320) — passes `thinking` through to the SDK as-is
- [node_modules/@anthropic-ai/claude-agent-sdk/sdk.d.ts:1320](node_modules/@anthropic-ai/claude-agent-sdk/sdk.d.ts#L1320) — SDK type

**Bug:**
The validator checks `overrides.thinking.budget_tokens` (snake_case), but the
SDK expects `budgetTokens` (camelCase). If a user authors:

```json
{ "thinking": { "type": "enabled", "budget_tokens": 5000 } }
```

The validator accepts it. The object is forwarded as-is to `sdkOptions.thinking`.
The SDK reads `thinking.type === 'enabled'` and looks for `budgetTokens`,
doesn't find it, and either uses a default budget or throws with a confusing
"budgetTokens required" error.

**Impact:** LOW.
- `{ type: 'adaptive' }` is unaffected (no budget field).
- `{ type: 'disabled' }` is unaffected.
- Only `{ type: 'enabled', budget_tokens: N }` triggers the bug, AND only when
  the user wrote snake_case.
- All current default cc-* agents use `{ type: 'adaptive' }` — zero practical
  impact at the moment.
- Future user surprise: someone copies a snippet from VeilCLI's own validator
  comment using `budget_tokens` and ends up with no budget enforcement.

**Fix sketch (~5 lines):**
1. Validator: rename the field to `budgetTokens` and reject `budget_tokens`
   with a clear error message ("did you mean budgetTokens?").
2. OR (more lenient): in `engines/claude-engine.js` before passing thinking
   to the SDK, normalize `budget_tokens` → `budgetTokens` so both spellings
   work.
3. Add a quick test that `thinking: { type: 'enabled', budgetTokens: 1000 }`
   actually reaches the SDK with the right key.

**Severity:** MEDIUM (silent misconfiguration). Worth fixing in a small
follow-up PR — not urgent.
