diff --git a/src/agents/system-prompt.test.ts b/src/agents/system-prompt.test.ts
index fa6d4de6563..b45c64e72ec 100644
--- a/src/agents/system-prompt.test.ts
+++ b/src/agents/system-prompt.test.ts
@@ -108,7 +108,8 @@ describe("buildAgentSystemPrompt", () => {
});
expect(prompt).not.toContain("## Authorized Senders");
- expect(prompt).not.toContain("## Skills");
+ // Skills are included even in minimal mode when skillsPrompt is provided (cron sessions need them)
+ expect(prompt).toContain("## Skills");
expect(prompt).not.toContain("## Memory Recall");
expect(prompt).not.toContain("## Documentation");
expect(prompt).not.toContain("## Reply Tags");
@@ -131,6 +132,29 @@ describe("buildAgentSystemPrompt", () => {
expect(prompt).toContain("Subagent details");
});
+ it("includes skills in minimal prompt mode when skillsPrompt is provided (cron regression)", () => {
+ // Isolated cron sessions use promptMode="minimal" but must still receive skills.
+ const skillsPrompt =
+ "\n \n demo\n \n";
+ const prompt = buildAgentSystemPrompt({
+ workspaceDir: "/tmp/openclaw",
+ promptMode: "minimal",
+ skillsPrompt,
+ });
+
+ expect(prompt).toContain("## Skills (mandatory)");
+ expect(prompt).toContain("");
+ });
+
+ it("omits skills in minimal prompt mode when skillsPrompt is absent", () => {
+ const prompt = buildAgentSystemPrompt({
+ workspaceDir: "/tmp/openclaw",
+ promptMode: "minimal",
+ });
+
+ expect(prompt).not.toContain("## Skills");
+ });
+
it("includes safety guardrails in full prompts", () => {
const prompt = buildAgentSystemPrompt({
workspaceDir: "/tmp/openclaw",
diff --git a/src/agents/system-prompt.ts b/src/agents/system-prompt.ts
index 9027bba92d7..b0b3ed8be0c 100644
--- a/src/agents/system-prompt.ts
+++ b/src/agents/system-prompt.ts
@@ -22,9 +22,6 @@ function buildSkillsSection(params: {
isMinimal: boolean;
readToolName: string;
}) {
- if (params.isMinimal) {
- return [];
- }
const trimmed = params.skillsPrompt?.trim();
if (!trimmed) {
return [];