anthropics / anthropics/claude-code

[BUG] GitHub Connector — "state: Field required" error blocks repo access

オープン
#92,284 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
invalid
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code

### What's Wrong?

The GitHub connector shows as "Connected" in Claude's Settings → Connectors, but Claude never gets access to any repositories — no GitHub tools appear in any chat (including brand-new chats), and the DanceUp repo can't be checked.

Digging into GitHub's own settings showed the root of it:

Installed GitHub Apps (github.com/settings/installations) — showed no apps installed
Authorized OAuth Apps — empty
Authorized GitHub Apps — "Claude" and "Claude Github MCP Connector" both listed as authorized, both marked "Never used"

So the app had been authorized (OAuth-level consent) but never actually installed with repository access — which is why nothing ever synced to Claude no matter how many times the connector was reconnected on Claude's side.

Steps already tried
Disconnected and reconnected the GitHub Integration in Claude's Connectors settings — multiple times
Fully uninstalled and reinstalled the app on GitHub's side (not just disconnect)
Attempted a manual install directly from GitHub (Configure/Install button), granting "All repositories" access
Error encountered

During the manual install attempt, GitHub redirected to Claude's callback URL:

claude.ai/api/mcp/auth_callback?code=d58fa01116138073fab5&installation_id=159210758&setup_action=install

Which returned:

json
{"type":"error","error":{"type":"invalid_request_error","message":"state: Field required"},"request_id":"req_011CejsPj9nGSuvh4FAMCsQ3"}

This happened consistently across repeated attempts.

Current state

Went back into the GitHub app's installation settings (Permissions / Repository access page) and found that an installation now genuinely exists — installation_id=159210758 — with "All repositories" access configured. So GitHub did create the installation despite the callback erroring out. Claude's side, however, never completes the link: no GitHub tools show up in Claude regardless of how many fresh chats are tried.

### What Should Happen?

Either:

Claude's auth_callback endpoint should accept this callback instead of erroring on a missing state parameter, so the connector setup completes normally, or
The existing installation (installation_id=159210758) should be manually linked/synced to my account on the backend.

### Error Messages/Logs

```shell

```

### Steps to Reproduce

Go to github.com/settings/applications → Authorized GitHub Apps, and click into "Claude Github MCP Connector" (it shows as authorized but "Never used").
From the app's page, click Configure / Install.
On the Permissions & Repository access page, select "All repositories" and click Save.
GitHub redirects to claude.ai/api/mcp/auth_callback?code=...&installation_id=159210758&setup_action=install.
Instead of completing the connection, the page returns the state: Field required JSON error shown below.
Checking Claude's Connectors settings afterward still shows GitHub as not properly linked — no GitHub tools are available in any chat, new or old.

### Claude Model

Sonnet (default)

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

The claude command isn't on PATH in this shell environment, so I can't run claude --version directly here (this session itself is running inside Claude Code, but the CLI binary isn't resolvable in this particular shell).

### Platform

Anthropic API

### Operating System

Windows

### Terminal/Shell

Windows Terminal

### Additional Information

Request

Could someone take a look at linking installation 159210758 to my account, or point me to a workaround in the meantime? Happy to provide more screenshots or details if useful.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start from the GitHub connector install flow and the claude.ai/api/mcp/auth_callback endpoint mentioned in the report. Use the callback URL parameters, installation_id=159210758, and request_id=req_011CejsPj9nGSuvh4FAMCsQ3 to inspect backend handling of missing state. Done means the install callback completes or the existing installation is linked so GitHub tools appear in new chats.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github, python
領域
api, authentication, backend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
32/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。