Skip to content

Agent Skills: docx and pptx skills fail with 'stream ended without producing Message' #1156

@tarik0

Description

@tarik0

Description

When using the Agent Skills beta feature via the container.skills parameter, the docx and pptx skills fail silently, causing the stream to end without producing a Message.

Environment

  • SDK: @anthropic-ai/sdk (TypeScript)
  • Model: claude-sonnet-4-5-20250929
  • Beta headers: code-execution-2025-08-25,skills-2025-10-02

Working Skills

  • pdf
  • xlsx

Broken Skills

  • docx
  • pptx

Reproduction

// This works
const response = await client.messages.stream({
  model: 'claude-sonnet-4-5-20250929',
  max_tokens: 4096,
  container: {
    skills: [{ type: 'anthropic', skill_id: 'pdf', version: 'latest' }]
  },
  tools: [{ type: 'code_execution_20250825', name: 'code_execution' }],
  messages: [{ role: 'user', content: 'Hello' }]
}, {
  headers: { 'anthropic-beta': 'code-execution-2025-08-25,skills-2025-10-02' }
});

// This fails with "stream ended without producing a Message with role=assistant"
const response = await client.messages.stream({
  model: 'claude-sonnet-4-5-20250929',
  max_tokens: 4096,
  container: {
    skills: [{ type: 'anthropic', skill_id: 'docx', version: 'latest' }]
  },
  tools: [{ type: 'code_execution_20250825', name: 'code_execution' }],
  messages: [{ role: 'user', content: 'Hello' }]
}, {
  headers: { 'anthropic-beta': 'code-execution-2025-08-25,skills-2025-10-02' }
});

Test Matrix

Skills Result
['pdf'] ✅ Works
['xlsx'] ✅ Works
['docx'] ❌ Fails
['pptx'] ❌ Fails
['pdf', 'xlsx'] ✅ Works
['pdf', 'docx'] ❌ Fails
['pdf', 'pptx'] ❌ Fails
['pdf', 'xlsx', 'docx', 'pptx'] ❌ Fails
[] (empty) ✅ Works

Expected Behavior

All documented Anthropic skills (pdf, xlsx, docx, pptx) should work as described in the Skills Guide.

Actual Behavior

Only pdf and xlsx skills work. Including docx or pptx in the skills array causes the API to fail without a proper error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions