claude-code-action icon indicating copy to clipboard operation
claude-code-action copied to clipboard

Internal error: directory mismatch for tsconfig.json

Open Rohan-cp opened this issue 6 months ago • 12 comments

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

- 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

Rohan-cp avatar May 08 '26 09:05 Rohan-cp

We're hitting the same issue

gravityrail avatar May 10 '26 16:05 gravityrail

Same issue, seems to be a duplicate of #1205

ivanpuhachov avatar May 11 '26 21:05 ivanpuhachov

same issue here

jamaljeantobias avatar May 13 '26 16:05 jamaljeantobias

same issue here

bernadinel avatar May 21 '26 08:05 bernadinel

Yep, here as well.

rdekoster avatar May 21 '26 14:05 rdekoster

Same issue. And it is getting unbearable for us. Claude code was supposed to aid developers in making quick development. It is very unfortunate that there own developers cannot fix blocker bug happening around a month. If the issue is with bun upstream then please fork that , fix that and use that.

adeelamin15 avatar May 25 '26 06:05 adeelamin15

same issue for me, whats the fix?

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.

vs4vijay avatar May 26 '26 18:05 vs4vijay

Same issue

anujkumar-df avatar May 27 '26 07:05 anujkumar-df

Bumping this

vs4vijay avatar Jun 04 '26 07:06 vs4vijay

same. run a /install-github-app on a repo. happens on official configuration

cucumber-sp avatar Jun 06 '26 13:06 cucumber-sp

Same issue, any fixes?

EDITTED: ok I saw it has been fixed by https://github.com/anthropics/claude-code-action/pull/1315.

yongzhang avatar Jun 10 '26 06:06 yongzhang

Adding a version bisect + a working workaround, since the thread is mostly "same issue" and #1315 (dropping --tsconfig-override) clearly didn't resolve it on the current @v1.

Bisect (via the code-review@claude-code-plugins /code-review plugin, ubuntu-latest):

  • ✅ Works on v1.0.171 (Claude Code 2.1.207, 2026-07-11) and earlier.
  • ❌ Crashes on v1.0.172 – v1.0.174 (Claude Code 2.1.208 – 2.1.210, 2026-07-14). @v1 currently resolves to v1.0.174, so every fresh run hits it. This answers #1322's "has the tag recently moved?" — yes, on 2026-07-14.

Two things combine to make this a red check rather than just log noise:

  1. The Bun error directory mismatch for directory ".../v1/tsconfig.json" is self-labeled non-fatal ("You don't need to do anything, but this indicates a bug") and comes from the action walking up to its own tsconfig.json — so it fires even on PRs whose diff contains no TypeScript at all.
  2. #1496 (shipped in v1.0.172) started failing the step when the result is is_error:true even with subtype:success. That is what flipped this from tolerated log noise into a hard failure: ##[error]Claude result reported subtype success with is_error:true. So the fatal regression window opens exactly at v1.0.172, which lines up with the Bun/Claude Code bump.

Workaround that restores green CI today — pin the immutable SHA instead of the floating tag:

uses: anthropics/claude-code-action@e90deca47693f9457b72f2b53c17d7c445a87342 # v1.0.171

Re-float once the Bun tsconfig resolution is fixed. Hope the bisect helps narrow it down.

5edges-engineering avatar Jul 15 '26 09:07 5edges-engineering