anthropics / anthropics/claude-code-action

Claude action fails when slash-commands directory is missing

Open
#415 3 comments 2 reactions 1 assignee Claimed by @km-anthropic View on GitHub
bug p2
Dominant language
TypeScript
Stars
8.9k
Forks
2.1k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

**Describe the bug**
The workflow fails on the step that copies the slash commands directory, with the error:
Slash commands directory not found or error copying: ShellError: Failed with exit code 1

**To Reproduce**
Steps to reproduce the behavior:
1. Use the claude-code-action in a GitHub Actions workflow (e.g., anthropics/claude-code-action@v0.0.53).
2. Trigger the workflow (e.g., on PR or push).
3. Observe the step that attempts to copy the slash-commands directory.
4. Workflow fails with exit code 1.

**Expected behavior**
If the slash-commands directory is not present, the workflow should skip the copy step gracefully and not fail.

**Screenshots**
Not applicable, but here is the error snippet from the logs:

```
Copying slash commands from /home/runner/work/_actions/anthropics/claude-code-action/v0.0.53/slash-commands to /home/runner/.claude/ Slash commands directory not found or error copying: Shell
Error: Failed with exit code 1
```

**API Provider**
[x] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

**Additional context**

Occurs with anthropics/claude-code-action@v0.0.53.
No custom slash-commands directory is in use.
Would expect the step to be non-fatal if the directory is missing.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.