GitHub changed its installation tokens. What does that mean for AI coding agents?
العربية
Imagine a pull request arrives and a review bot goes quiet. The app is still installed. Its permissions look right. The failure turns out to be a field that stores only 40 characters. GitHub changed the shape of a credential, and a detail somebody once treated as a permanent rule has broken the workflow.
What changed in 2026
An installation token lets a GitHub App act within a particular installation. On October 2, GitHub announced that its rollout of stateless tokens was complete. A newly issued token still begins with ghs_, but it is now roughly 520 characters long and contains a JSON Web Token (JWT). GitHub gives two reasons for the change: faster issuance and validation, and a more reliable API. The one-hour lifetime and the controls over permissions and repositories carry forward.
Why the May instructions have an expiry date
During the transition, developers could send X-GitHub-Stateless-S2S-Token when requesting an installation token. The values enabled and disabled let teams compare the two formats. November 30 was the cutoff. A December test that sends disabled can appear to pass even though it exercised only the new format. To test legacy compatibility today, use a synthetic fixture.
How a review agent gets access
Consider an app that summarizes a proposed change. Its backend authenticates as the app, identifies the installation, and requests a short-lived installation token through POST /app/installations/{installation_id}/access_tokens. It can narrow the request to the repository and permissions the job needs. A broker can use that token to retrieve the diff and give the model just the text it needs to summarize. Posting the result is a separate operation requiring the appropriate write permission. For a job that only produces a private summary, that permission adds nothing.
Where AI changes the engineering decision
GitHub attributes the migration to API performance and reliability. AI enters the picture when a developer decides who controls the credential. A model reading a pull request also reads material supplied by its author. Keeping the token in the backend lets that backend decide which repository to read and whether a comment may be posted. The same design works when the model changes, when a task is retried, or when a reviewer decides to produce a summary without publishing it.
A test worth running
Pass a long, synthetic token-shaped string through the same storage, proxy and HTTP-client path as the real credential. Compare the value at the receiving end inside the test without printing it. Trigger a controlled error and inspect the diagnostic output for fragments left behind by an old redaction rule. Then perform one permitted read in a test repository using a freshly issued credential. The first exercise checks preservation and masking. The second checks that the integration actually works.
Sources
May announcement
October rollout update
Installation token documentation