From 99877e8e63d2eddf141c2f8ecc3d768f8370532e Mon Sep 17 00:00:00 2001 From: Gabriel Trigo Date: Mon, 12 Jan 2026 02:21:10 +0000 Subject: [PATCH 1/2] fix: align /think default with model reasoning --- src/auto-reply/reply.directive.test.ts | 43 +++++++++++++++++++++++++- src/auto-reply/reply.ts | 3 +- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/src/auto-reply/reply.directive.test.ts b/src/auto-reply/reply.directive.test.ts index 8ee37bc32..70a940ddf 100644 --- a/src/auto-reply/reply.directive.test.ts +++ b/src/auto-reply/reply.directive.test.ts @@ -190,9 +190,50 @@ describe("directive behavior", () => { }); }); - it("shows off when /think has no argument and no default set", async () => { + it("defaults /think to low for reasoning-capable models when no default set", async () => { await withTempHome(async (home) => { vi.mocked(runEmbeddedPiAgent).mockReset(); + vi.mocked(loadModelCatalog).mockResolvedValueOnce([ + { + id: "claude-opus-4-5", + name: "Opus 4.5", + provider: "anthropic", + reasoning: true, + }, + ]); + + const res = await getReplyFromConfig( + { Body: "/think", From: "+1222", To: "+1222" }, + {}, + { + agents: { + defaults: { + model: "anthropic/claude-opus-4-5", + workspace: path.join(home, "clawd"), + }, + }, + session: { store: path.join(home, "sessions.json") }, + }, + ); + + const text = Array.isArray(res) ? res[0]?.text : res?.text; + expect(text).toContain("Current thinking level: low"); + expect(text).toContain("Options: off, minimal, low, medium, high."); + expect(runEmbeddedPiAgent).not.toHaveBeenCalled(); + }); + }); + + it("shows off when /think has no argument and model lacks reasoning", async () => { + await withTempHome(async (home) => { + vi.mocked(runEmbeddedPiAgent).mockReset(); + vi.mocked(loadModelCatalog).mockResolvedValueOnce([ + { + id: "claude-opus-4-5", + name: "Opus 4.5", + provider: "anthropic", + reasoning: false, + }, + ]); const res = await getReplyFromConfig( { Body: "/think", From: "+1222", To: "+1222" }, diff --git a/src/auto-reply/reply.ts b/src/auto-reply/reply.ts index 05c2ea186..78b2b134b 100644 --- a/src/auto-reply/reply.ts +++ b/src/auto-reply/reply.ts @@ -673,7 +673,8 @@ export async function getReplyFromConfig( ) { const currentThinkLevel = (sessionEntry?.thinkingLevel as ThinkLevel | undefined) ?? - (agentCfg?.thinkingDefault as ThinkLevel | undefined); + (agentCfg?.thinkingDefault as ThinkLevel | undefined) ?? + (await modelState.resolveDefaultThinkingLevel()); const currentVerboseLevel = (sessionEntry?.verboseLevel as VerboseLevel | undefined) ?? (agentCfg?.verboseDefault as VerboseLevel | undefined); From 0efa6428d08363f3739e97f211fd312e229a371e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 12 Jan 2026 02:51:17 +0000 Subject: [PATCH 2/2] fix: align /think default display (#751) (thanks @gabriel-trigo) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23c77de8c..8c13a6c6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ - Doctor: surface plugin diagnostics in the report. - Plugins: treat `plugins.load.paths` directory entries as package roots when they contain `package.json` + `clawdbot.extensions`. - Config: expand `~` in `CLAWDBOT_CONFIG_PATH` and common path-like config fields (including `plugins.load.paths`). +- Auto-reply: align `/think` default display with model reasoning defaults. (#751) — thanks @gabriel-trigo. - Docker: tolerate unset optional env vars in docker-setup.sh under strict mode. (#725) — thanks @petradonka. - CLI/Update: preserve base environment when passing overrides to update subprocesses. (#713) — thanks @danielz1z. - Agents: treat message tool errors as failures so fallback replies still send; require `to` + `message` for `action=send`. (#717) — thanks @theglove44.