diff --git a/packages/core/src/tools/skill.ts b/packages/core/src/tools/skill.ts index ce716b98720..398f475ae85 100644 --- a/packages/core/src/tools/skill.ts +++ b/packages/core/src/tools/skill.ts @@ -461,6 +461,12 @@ class SkillToolInvocation extends BaseToolInvocation { // track via `onSkillLoaded` — no skill body was loaded, and // conflating the two would inflate skill telemetry / // `/context` skill-token attribution with command runs. + if (typeof content === 'object' && 'error' in content) { + return { + llmContent: content.error, + returnDisplay: content.error, + }; + } return { llmContent: [{ text: content }], returnDisplay: `Delegated to command: ${this.params.skill}`,