Problem
linear teams list uses a GetTeams GraphQL query with no first/after pagination args:
query GetTeams {
teams {
nodes {
id
name
key
description
issueEstimationType
issueEstimationAllowZero
issueEstimationExtended
defaultIssueEstimate
}
}
}
The Linear API returns this in its default page size (50), so any workspace with more than 50 teams silently loses everything past the first page — linear teams list --output json returns exactly 50 entries even though the workspace actually has 178 teams (confirmed via direct Linear API query for the same workspace/token).
This isn't just a listing/display bug: team resolution for --team <key>, linear teams get <key-or-id>, and linear init's team picker all appear to resolve against this same capped/unpaginated list. A team outside the first 50 (e.g. our "Platform Security" / PLATSEC team, confirmed to exist and have issues via direct API lookup) cannot be resolved by key, by name, or even by exact team UUID:
$ linear teams get 3122d282-c31c-4851-b769-fd322c769b6f
Error: failed to get team: failed to resolve team '3122d282-c31c-4851-b769-fd322c769b6f': team not found: 3122d282-c31c-4851-b769-fd322c769b6f
$ linear issues list --team 3122d282-c31c-4851-b769-fd322c769b6f --limit 3
Error: failed to list issues: failed to resolve team '3122d282-c31c-4851-b769-fd322c769b6f': team not found: 3122d282-c31c-4851-b769-fd322c769b6f
For workspaces at this scale, this makes the CLI effectively unusable for the majority of teams, since fetching a specific issue by full identifier (e.g. PLATSEC-617) still works (separate, non-paginated query), but nearly every team-scoped operation does not.
This is the same root cause as #54 (issues list 250-item cap), just on the teams query, with a more severe impact since it breaks name/key/ID resolution entirely rather than just truncating a list.
Proposal
Same fix shape as suggested in #54:
- Add cursor pagination to
GetTeams (first/after + pageInfo { hasNextPage, endCursor }), and auto-page through all results when resolving a team by key/name/ID, or when --output json needs the full set.
- At minimum, surface
hasNextPage as a warning/truncation flag so silent data loss is visible.
Verification
Confirmed at the currently installed Homebrew version (linear-cli v1.10.0):
linear teams list --output json | jq length → 50
- Direct Linear GraphQL query for the same workspace/token →
178 teams total, including Platform Security (key PLATSEC)
linear teams get <PLATSEC's real UUID> → team not found
Problem
linear teams listuses aGetTeamsGraphQL query with nofirst/afterpagination args:The Linear API returns this in its default page size (50), so any workspace with more than 50 teams silently loses everything past the first page —
linear teams list --output jsonreturns exactly 50 entries even though the workspace actually has 178 teams (confirmed via direct Linear API query for the same workspace/token).This isn't just a listing/display bug: team resolution for
--team <key>,linear teams get <key-or-id>, andlinear init's team picker all appear to resolve against this same capped/unpaginated list. A team outside the first 50 (e.g. our "Platform Security" /PLATSECteam, confirmed to exist and have issues via direct API lookup) cannot be resolved by key, by name, or even by exact team UUID:For workspaces at this scale, this makes the CLI effectively unusable for the majority of teams, since fetching a specific issue by full identifier (e.g.
PLATSEC-617) still works (separate, non-paginated query), but nearly every team-scoped operation does not.This is the same root cause as #54 (
issues list250-item cap), just on theteamsquery, with a more severe impact since it breaks name/key/ID resolution entirely rather than just truncating a list.Proposal
Same fix shape as suggested in #54:
GetTeams(first/after+pageInfo { hasNextPage, endCursor }), and auto-page through all results when resolving a team by key/name/ID, or when--output jsonneeds the full set.hasNextPageas a warning/truncation flag so silent data loss is visible.Verification
Confirmed at the currently installed Homebrew version (
linear-cliv1.10.0):linear teams list --output json | jq length→50178teams total, includingPlatform Security(keyPLATSEC)linear teams get <PLATSEC's real UUID>→team not found