anthropics / anthropics/claude-code-action
Internal error: directory mismatch for tsconfig.json
- Dominant language
- TypeScript
- Stars
- 8.9k
- Forks
- 2.1k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
## Description
When running the claude-code-action, we see the following internal error in the logs (appears twice):
```
Internal error: directory mismatch for directory "/home/runner/work/_actions/anthropics/claude-code-action/v1/tsconfig.json", fd 4. You don't need to do anything, but this indicates a bug.
```
## Workflow
```yaml
- name: Run Claude Code Review
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: |
/code-review:code-review ${{ github.repository }}/pull/${{ github.event.issue.number }}
claude_args: |
--model claude-sonnet-4-6
--max-turns 25
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr comment:*)"
```
## Environment
- Runner: `ubuntu-latest`
- Action version: `@v1`
- Trigger: `issue_comment` (PR comment containing `@claude`)
## Expected behavior
No internal errors in logs.
## Actual behavior
The error appears twice during the "Run Claude Code Review" step and again during "Post Run Claude Code Review". The action still completes successfully, but these warnings are confusing.
## Additional context
Full log excerpt:
```
Log saved to /home/runner/work/_temp/claude-execution-output.json
Set session_id: 6e3e4ef3-6e57-4326-9a6d-c7e8356f9d52
Internal error: directory mismatch for directory "/home/runner/work/_actions/anthropics/claude-code-action/v1/tsconfig.json", fd 4. You don't need to do anything, but this indicates a bug.
...
Internal error: directory mismatch for directory "/home/runner/work/_actions/anthropics/claude-code-action/v1/tsconfig.json", fd 4. You don't need to do anything, but this indicates a bug.
No buffered inline comments
```
Contributor guide
Research direction
Start by reproducing the issue with the documented issue_comment workflow on ubuntu-latest, focusing on the Run Claude Code Review and Post Run Claude Code Review steps. Trace where the directory-mismatch warning is emitted for tsconfig.json and compare the repeated log entries. Done means the workflow completes without these internal-error warnings while preserving the existing review behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100