Linear API Token Scopes and Agent Write Access
Linear's token type and scope limits cap how much damage an agent can do.

Before you choose any scope, the token type you give a Linear-calling agent already sets the outer limit of what that agent can do if something goes wrong. That ceiling holds regardless of how carefully the scopes layered on top of it get selected afterward. Linear supports two distinct token types for API access, and they differ in a way that matters far more than their shared purpose of authentication might suggest.
A personal API key is static. It does not expire on its own, and it inherits every permission belonging to the account that generated it. An agent running on a personal API key is not a separate, constrained actor in the workspace. There is no mechanism to narrow that down. Whatever the creating user can do, the agent can do, and every read and every write passes through a single endpoint whose permissions trace back to one human's account.
An OAuth 2.0 access token works differently from the ground up. More importantly, it carries only the scopes explicitly granted to it at the moment of authorization. An OAuth token has a bounded useful lifetime, while a compromised personal API key does not expire until someone manually revokes it. Linear migrated all OAuth2 applications to a new refresh token system on April 1, 2026, confirming that the platform actively manages the token lifecycle on an ongoing basis.
The distinction between these two token types is structural, fixed at setup rather than adjusted through later configuration choices. You only know what scopes an agent needs, or how it should authenticate, once you've made this foundational choice. If you pick the personal API key, the scope conversation is largely moot, because there's no scope to pick.
What Each Linear OAuth Scope Permits
Linear's OAuth scope system is a small, tiered set of options rather than a fine-grained permission matrix with a setting for every possible mutation, and several of the mutations an agent will plausibly need to perform require broader access than a minimal-privilege design would prefer.
The scope list, as Linear documents it, breaks down as follows:
- read: always present by default, granting read access across the user's account; it cannot be removed from a grant
- write: write access across the entire user's account, broad by design rather than targeted to a specific resource type
- issues:create: permits creating new issues and their attachments, but grants no ability to update or archive what it creates
- comments:create: permits creating new issue comments, narrower in scope than the general write permission
- timeSchedule:write: permits creating and modifying time schedules
- admin: full access to admin-level endpoints, which Linear's own documentation states should never be requested unless absolutely necessary
- app:assignable and app:mentionable: scopes that apply when an app operates with actor=app set, letting the app receive issue assignments and be mentioned directly
Several mutations an agent plausibly needs have no targeted scope at all and require the full write permission instead. An agent built to triage issues and close out completed work has no scoped path that avoids write. That's a constraint built into the scope system itself, not a misconfiguration on the part of whoever set up the integration.
Mapping real agent tasks onto this scope list clarifies where the narrow options are sufficient and where they aren't. But an agent that triages incoming issues, reassigns them, and closes the ones that are resolved has no narrower path than read plus write, because issueUpdate sits behind the broad scope and nothing else covers it. If you design scopes for a Linear agent, you need to accept that boundary as given, because no workaround exists.
Why app-actor OAuth is the right foundation for agents
Scope selection addresses only part of credential design. A user-delegated OAuth token, even one scoped as narrowly as the task allows, remains the wrong authentication model for an agent, because it conflates the agent's actions with the authorizing human's actions in the audit trail and ties the agent's access to that individual's account standing.
Linear's actor=app parameter addresses this directly. When an application authenticates with actor=app set, the resources it creates get attributed to the application itself, not to whichever user originally authorized the integration. Linear documents this pattern for agents and service accounts specifically, and it differs from the default behavior most OAuth integrations fall into. Under actor=app, the application installs into the workspace as its own member, and the app:assignable and app:mentionable scopes let it receive assignments and mentions the way a human teammate would.
The attribution difference matters for accountability when something goes wrong. If the same agent runs under the default actor=user mode, every action it takes looks identical to something the authorizing human did by hand, burying the agent's mistake inside a person's activity log. That's not a cosmetic difference in how logs read. Because of this, you catch an incident in minutes, or you only discover it weeks later when someone asks why a project manager appears to have closed four hundred issues overnight.
The refresh mechanics show why you need app-actor OAuth at the foundation of agent design, not as an afterthought. None of this is a one-time setup step. Token refresh is an ongoing system concern, so an agent runtime has to handle a 401 invalid_grant response gracefully, not fail silently or, worse, retry blind until something breaks further downstream.
The practical cost of this choice appears whenever a team migrates from the simpler path to the correct one. Moving that integration to app-actor OAuth is a system migration, touching how the agent authenticates, how its actions get attributed, and how its credentials get refreshed, so the decision is worth making correctly the first time rather than discovering the cost of reversing it in production.
How broad write access turns agent mistakes into compounding incidents
The scopes an agent is forced to carry and the actor model it authenticates under together determine how much damage a single mistake can do once that agent is live. Write access changes the character of a failure. So instead of an agent reading stale data and producing a wrong but harmless answer, a write-capable agent can alter real state in the workspace before anyone notices, and every subsequent read by that same agent or any other process now treats the corrupted state as ground truth.
The gap identified in the scope breakdown above is exactly where this risk concentrates. Each of those unintended writes becomes the input the agent's next reasoning step reads back, so one bad turn doesn't stay contained to a single action. It propagates through everything that follows, compounding with each subsequent call the agent makes.
This pattern, where overprivileged service accounts get broad read/write access to enable autonomous action, is the default failure mode many enterprises fall into, not an unusual misstep. Prompt injection turns this structural risk into an active one, since an agent manipulated by injected instructions will use whatever write access it already holds. Agents need scoped credentials, tool allowlists, runtime monitoring, audit trails, and human approval gates on sensitive actions rather than a single broad grant assumed to be safe by default.
The mutations that have no narrow scope, closing issues, changing state, restructuring projects, are the same mutations where a malfunctioning or manipulated agent causes the most damage. That overlap is not a coincidence: it's the reason the next two sections exist, because credential design alone cannot catch a bad agent turn before it reaches production.
Catching Scope Violations with a Stateful Linear Simulator
A stateless mock cannot catch a scope violation, because it answers every call the same way regardless of what the agent actually did on the previous call. Catching a scope violation requires a system that remembers what happened and can refuse a request based on that history. The testing layer needs to maintain state the way the real Linear API does.
Consider an agent that creates an issue under the issues:create scope and then, in the next call, attempts an issueUpdate, which requires the broader write scope it was never granted. The same gap appears whenever one call's output becomes the next call's input: a system caching one static response per API call has no way to reflect the state changes that intervening writes produced, so the test never sees the actual state the agent built up over a multi-step sequence.
To close this gap, you run the agent against a real LLM, the LLM against a real MCP server, and the MCP server against a stateful simulator that reproduces Linear's API behavior, including its scope enforcement and its state transitions. This setup validates pagination, error envelope formats, and auth refresh logic without touching live rate limits or live credentials, which matters because testing against the production API directly would mean burning real quota and real workspace data on every test run. Underneath that integration layer, you still run unit tests against in-process MCP servers using stubs, fast and fully deterministic, gated on every pull request the way any unit test suite should be. But the stateful simulator is what turns the integration tests into something that actually catches scope violations, rather than a suite of tests that all pass regardless of whether the agent respected its boundaries.
Fault injection scenarios specific to Linear agent write access
Scope testing only tells you that an agent stays inside its permitted boundary when conditions are normal. It says nothing about what the agent does when the API itself starts failing mid-sequence, and for a write-capable agent, a mishandled failure can leave Linear in a state that's harder to fix than a clean, total failure would have been. An agent that doesn't handle token expiry or an API rejection gracefully can produce a partial write: one mutation lands, the next one that depended on it doesn't, and nothing in the workspace indicates the two were ever meant to happen together.
Several fault conditions matter specifically for agents holding Linear write access, so each one needs its own test:
- Token expiry mid-execution: OAuth access tokens expire after 24 hours, and a long-running agent task, a background triage loop or a scheduled sync, can span that boundary, expiring between an issueCreate call and the issueUpdate that was supposed to follow it. The test here mocks a 401 Unauthorized response with a realistic invalid_token payload injected partway through the sequence, and checks that the agent surfaces a needs_reauth state rather than silently retrying the call or completing only half the intended write.
- Scope rejection: an agent attempts a mutation that falls outside the scopes its token actually carries. The simulator should return the Linear error response that condition produces, and the agent should log the rejection and stop, rather than retry the same call with escalated credentials it was never granted.
- Rate limiting: Linear enforces rate limits by returning an HTTP 400 response carrying a RATELIMITED error code in the body, not an HTTP 429 status. An agent looping over a batch of issue updates is a realistic candidate for triggering this. The test injects 429 Too Many Requests responses and checks that the agent backs off rather than continuing to issue writes against a service that has already told it to stop.
- Partial writes: a test simulates a successful response to an issueCreate call followed by a 503 on the issueUpdate that was meant to follow it, then checks that the agent logs the inconsistency between the two rather than assuming both calls succeeded because the first one did.
Each of these scenarios ties directly back to the write paths established earlier in the article, issueCreate, issueUpdate, the stateId transition that closes an issue. Testing fault tolerance in the abstract misses the point; the value is in confirming the agent behaves correctly on the exact mutations its scope grant forces it to carry.
Simulator Drift Against the Live Linear API
A stateful simulator that accurately reflected Linear's API at the time it was built does not stay accurate indefinitely. If it drifts out of sync with the live API and nobody notices, it starts handing agents a false pass: the agent appears to respect every scope boundary in CI, while the real API has quietly changed what those boundaries mean in production.
Drift happens in ways that don't announce themselves. Linear does mark fields scheduled for removal with the GraphQL deprecated directive ahead of time, and the changelog carries an [API] prefix on entries describing API changes, but both only cover changes that are documented and intentional. So neither one catches an undocumented behavioral shift that happens quietly between releases.
You can catch this kind of drift before it undermines a test suite's confidence in three distinct ways. Spec-to-spec diffing compares two versions of an OpenAPI or GraphQL schema against each other, but it only works if a current, accurate spec exists to diff against first. Reality-to-reality monitoring makes live requests and compares them against a previously learned baseline, requiring no spec at all, which makes it useful precisely when the spec itself can't be trusted to be current.
The workflow that ties the entire argument together runs on two tiers. Together, these two tiers take every decision made earlier, the token type chosen, the scopes granted, the actor model selected, the fault conditions tested for, and keep them accurate against an API that keeps moving even after the agent ships.
Sources
Related guide
- Slack, GitHub and Linear API Rate Limits for AI Agents
The published API rate limits for Slack, GitHub and Linear side by side: how each is counted, what an agent sees when it hits one, and how to stay under them.


