anthropics / anthropics/claude-code-action
401 GitHub after 1 hour job, no branch no commits, no comment update
- Dominant language
- TypeScript
- Stars
- 8.9k
- Forks
- 2.1k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
**Describe the bug**
The job finished successfully but GitHub failed with 401. The branch was never created, so all progress was lost.
**To Reproduce**
Create some long running job. Wait until after one hour for claude to try commenting and commiting.
**Expected behavior**
The token gets refreshed or the job is finished and all progress is commited before the timeout passes.
**Screenshots**
Added the log, the repo is public.
**Workflow yml file**
https://github.com/gaarutyunov/mcp-anything/blob/main/.github/workflows/claude.yml
**API Provider**
[x] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex
**Additional context**
'''
Log saved to /home/runner/work/_temp/claude-execution-output.json
Set session_id: 5f424da7-cd6e-4a96-9ff2-da4bdd06be1e
Fetching issue comment 4189380492
GET /repos/gaarutyunov/mcp-anything/issues/comments/4189380492 - 401 with id 6000:2B62BC:E4F2266:E94D2FA:69D2C59D in 284ms
Failed to fetch comment. Debug info:
Comment ID: 4189380492
Event name: issue_comment
Entity number: 30
Repository: gaarutyunov/mcp-anything
GET /repos/gaarutyunov/mcp-anything/pulls/30 - 401 with id 6001:3F049D:ED1F18E:F1780C9:69D2C59D in 132ms
Could not fetch PR info for debugging
Error updating comment with job link: 117 | request: requestOptions
118 | });
119 | }
120 | if (status >= 400) {
121 | octokitResponse.data = await getResponseData(fetchResponse);
122 | throw new RequestError(toErrorMessage(octokitResponse.data), status, {
^
HttpError: Bad credentials - https://docs.github.com/rest
status: 401,
request: {
method: "GET",
url: "https://api.github.com/repos/gaarutyunov/mcp-anything/issues/comments/4189380492",
headers: [Object ...],
request: [Object ...],
},
response: {
url: "https://api.github.com/repos/gaarutyunov/mcp-anything/issues/comments/4189380492",
status: 401,
headers: [Object ...],
data: [Object ...],
},
at fetchWrapper (/home/runner/work/_actions/anthropics/claude-code-action/v1/node_modules/@octokit/rest/node_modules/@octokit/core/node_modules/@octokit/request/dist-bundle/index.js:122:11)
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.
Run bun --no-env-file \
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
Run curl -L \
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 112 0 112 0 0 799 0 --:--:-- --:--:-- --:--:-- 794
{
"message": "Bad credentials",
"documentation_url": "https://docs.github.com/rest",
"status": "401"
100 112 0 112 0 0 798 0 --:--:-- --:--:-- --:--:-- 794
}
'''
Contributor guide
Research direction
Start with the linked .github/workflows/claude.yml and the captured 401 log entries for issue comments and pull requests. Reproduce a job lasting over an hour, then trace the credential used before comment, branch, and commit operations. Done means the long-running job retains valid GitHub access and its progress is not lost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, github-actions, typescript
- Domain
- api, ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100