Skip to content

Agent Skills: docx and pptx skills fail silently with streaming #893

@tarik0

Description

@tarik0

Description

When using the Agent Skills beta with the container.skills parameter, the docx and pptx skills cause the stream to end without producing a Message. The pdf and xlsx skills work correctly.

Environment

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

Reproduction

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic();

// ✅ This works
const working = 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
const failing = 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 Results

Skill Status
pdf ✅ Works
xlsx ✅ Works
docx ❌ Fails
pptx ❌ Fails

Error

Stream ends with: stream ended without producing a Message with role=assistant

Expected

All documented skills should work per the Skills Guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions