- MODEL_MAP: `sonnet` alias bumped from claude-sonnet-4-6 → claude-sonnet-5 (matches the current Claude 5 family default). Prior pin remains reachable via new `sonnet-4.6` alias for back-compat.
- DEFAULT_ANTHROPIC_MODEL and `inherit` now resolve to claude-sonnet-5.
- ruflo init template (settings-generator.ts): top-level `model` set to claude-sonnet-5 (previously commented out with a stale sonnet-4-5 hint); `claudeFlow.modelPreferences.default` bumped from opus-4-8 → claude-sonnet-5.
- Project `.claude/settings.json` synced with the new template output (model + modelPreferences); removed the stale skillListingBudgetFraction rationale comment (kept the 0.06 value — #1834 still has 358 SKILL.md duplicates, workaround is still load-bearing).
- Test updates for #2232 / #1906 regression guards to assert the new sonnet-5 resolution and the new `sonnet-4.6` back-compat alias.
Bumps @claude-flow/cli, claude-flow, and ruflo to 3.30.4 (PATCH — no API change, default-model refresh only). All 30 model-resolution/sampling-params tests + 400 commands-deep tests green.
Follow-up: sampling-params regex in agent-execute-core.ts (#2357) may need `sonnet-5` added if Sonnet 5 rejects temperature/top_p/top_k like the rest of the Claude 5 family — not touched here because I don't have that behavior confirmed.
Co-Authored-By: RuFlo <ruv@ruv.net>
Fixes four user-reported bugs from the same triage round, each with a
regression test and the minimal honest fix:
#2232 (Opus 4.8 / silent-downgrade): bump `opus` alias to claude-opus-4-8
(keep `opus-4.7` reachable), and route `executeAgentTask` through the
existing `resolveAnthropicModel` so literal claude-* ids stop silently
collapsing to Sonnet 4.6 via the bare MODEL_MAP||DEFAULT fold. Widens the
agent-tools alias whitelist, JSON-schema enum, and updates the statusline /
settings defaults.
#2235(B) (stale system_status.uptime): read live `process.uptime()` instead
of the persisted metrics.startTime, which was the file's creation timestamp
and reported ~8.8-day uptime on a freshly-spawned server. (Note: part A —
agentdb db-unified legacy SQLite never engaging better-sqlite3 — is in the
bundled agentdb package and is upstream-only.)
#2234 (MCP server orphan / ~1 GB leak): add a parent-death watchdog to
`ruflo mcp start` that exits cleanly when the process is reparented to
launchd/init (ppid===1) — i.e. Claude Code has exited. Stops ~50 MB
orphans accumulating across restarts and a stale orphan winning the stdio
handshake.
#2239 (Q-state encoder discards keyword block): replace the 31-bit
truncating fold (which silently dropped features 0–31, collapsing
keyword-distinct tasks to one Q-state) with a 32-bit FNV-1a fold over the
full quantized vector. Bump encoder version to 2 in the persisted model;
loadModel resets the Q-table on a v1→v2 mismatch (keeps stats/epsilon).
Tests: 17 new regression tests across all four issues; full CLI suite
62 files / 2104 passed / 46 skipped / 0 failed.
Closes#2232, #2234, #2239. Closes#2235 (B); #2235 (A) tracked upstream.
Co-Authored-By: RuFlo <ruv@ruv.net>
`MODEL_MAP` in agent-execute-core.ts mapped haiku/sonnet/opus/inherit to
`claude-3-5-haiku-latest` / `claude-3-5-sonnet-latest` / `claude-3-opus-latest`
— ids the Anthropic API now 404s. Every `agent_execute` call (and the WASM
agent's LLM fallback, which routes through `resolveAnthropicModel`) failed
with HTTP 404 even with a valid key.
Fixed mappings (Claude 4.x family):
haiku → claude-haiku-4-5-20251001
sonnet → claude-sonnet-4-6
opus → claude-opus-4-7
inherit → claude-sonnet-4-6 (= new DEFAULT_ANTHROPIC_MODEL)
Also replaced the 4 other hardcoded `claude-3-5-sonnet-latest` defaults
(`callAnthropicMessages` fallback, `resolveAnthropicModel` no-input case,
`executeAgentTask` fallback, the doc-comment example) with
`DEFAULT_ANTHROPIC_MODEL`.
## CI coverage (the user's ask: "make sure the ci guard doesn't miss these")
Two layers:
1. Unit test `__tests__/agent-execute-models.test.ts` — picked up by the
cli package's vitest run in CI. Asserts each alias resolves to the
right Claude-4.x id, the prefix-strip works, the pass-through works,
and — critically — `no alias resolves to a claude-3.x id` (the #1906
regression-class assertion). 8/8 pass.
2. Witness marker `#1906` in the manifest — `claude-sonnet-4-6` must be
present in `agent-execute-core.js` dist; `witness-verify` fails on
regression. 104/104 fixes verified.
Closes#1906 · related to #1863 (agent_execute was the path #1863's
comment pointed users at — now it actually works)
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>