Compare commits

...

2 Commits

Author SHA1 Message Date
Peter Steinberger
2d9297a93a fix: include skills in minimal prompt (#1431) (thanks @robbyczgw-cla) 2026-01-22 09:01:57 +00:00
Robby
13bedc3f05 fix: include skills in minimal prompt mode for subagents 2026-01-22 08:54:27 +00:00
3 changed files with 6 additions and 4 deletions

View File

@ -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)

View File

@ -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("<available_skills>");
expect(prompt).not.toContain("## Memory Recall");
expect(prompt).not.toContain("## Documentation");
expect(prompt).not.toContain("## Reply Tags");

View File

@ -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";
@ -18,7 +18,7 @@ function buildSkillsSection(params: {
readToolName: string;
}) {
const trimmed = params.skillsPrompt?.trim();
if (!trimmed || params.isMinimal) return [];
if (!trimmed) return [];
return [
"## Skills (mandatory)",
"Before replying: scan <available_skills> <description> entries.",