diff --git a/CHANGELOG.md b/CHANGELOG.md index b84c324b5..91eece430 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Docs: https://docs.clawd.bot - Google Antigravity: drop unsigned thinking blocks for Claude models to avoid signature errors. - Config: avoid stack traces for invalid configs and log the config path. - CLI: read Codex CLI account_id for workspace billing. (#1422) Thanks @aj47. +- Agents: include skills section in minimal prompts for subagents. (#1431) Thanks @robbyczgw-cla. - Doctor: avoid recreating WhatsApp config when only legacy routing keys remain. (#900) - Doctor: warn when gateway.mode is unset with configure/config guidance. - OpenCode Zen: route models to the Zen API shape per family so proxy endpoints are used. (#1416) diff --git a/src/agents/system-prompt.test.ts b/src/agents/system-prompt.test.ts index e37a17008..a71032f78 100644 --- a/src/agents/system-prompt.test.ts +++ b/src/agents/system-prompt.test.ts @@ -23,7 +23,7 @@ describe("buildAgentSystemPrompt", () => { expect(prompt).not.toContain("Owner numbers:"); }); - it("omits extended sections in minimal prompt mode", () => { + it("keeps skills but omits other extended sections in minimal prompt mode", () => { const prompt = buildAgentSystemPrompt({ workspaceDir: "/tmp/clawd", promptMode: "minimal", @@ -37,7 +37,8 @@ describe("buildAgentSystemPrompt", () => { }); expect(prompt).not.toContain("## User Identity"); - expect(prompt).not.toContain("## Skills"); + expect(prompt).toContain("## Skills (mandatory)"); + expect(prompt).toContain(""); expect(prompt).not.toContain("## Memory Recall"); expect(prompt).not.toContain("## Documentation"); expect(prompt).not.toContain("## Reply Tags"); diff --git a/src/agents/system-prompt.ts b/src/agents/system-prompt.ts index 4260c96ab..6ba33a5db 100644 --- a/src/agents/system-prompt.ts +++ b/src/agents/system-prompt.ts @@ -7,7 +7,7 @@ import type { EmbeddedContextFile } from "./pi-embedded-helpers.js"; /** * Controls which hardcoded sections are included in the system prompt. * - "full": All sections (default, for main agent) - * - "minimal": Reduced sections (Tooling, Workspace, Runtime) - used for subagents + * - "minimal": Reduced sections (Tooling, Skills, Workspace, Runtime) - used for subagents * - "none": Just basic identity line, no sections */ export type PromptMode = "full" | "minimal" | "none";