gastownhall/beads · error

no Linear team ID configured Run: bd config set linear.team_

Error message

no Linear team ID configured
Run: bd config set linear.team_id "TEAM_ID"
Or:  bd config set linear.team_ids "TEAM_ID1,TEAM_ID2"
Or: export LINEAR_TEAM_ID=TEAM_ID

What it means

After authentication is validated, validateLinearConfig resolves the target Linear team IDs via getLinearTeamIDs (CLI --team flags, linear.team_id / linear.team_ids config keys, LINEAR_TEAM_ID env var). If the resolved list is empty, no sync target exists and this error with setup instructions is returned.

Source

Thrown at cmd/bd/linear.go:1026

	// Accept either OAuth credentials or API key.
	oauthClientID, _ := getLinearConfig(ctx, "linear.oauth_client_id")
	oauthClientSecret, _ := getLinearConfig(ctx, "linear.oauth_client_secret")
	hasOAuth := oauthClientID != "" && oauthClientSecret != ""

	if !hasOAuth {
		apiKey, _ := getLinearConfig(ctx, "linear.api_key")
		if apiKey == "" {
			return fmt.Errorf("Linear authentication not configured\n" +
				"Options:\n" +
				"  OAuth (for CI):  export LINEAR_OAUTH_CLIENT_ID=... LINEAR_OAUTH_CLIENT_SECRET=...\n" +
				"  API key (devs):  export LINEAR_API_KEY=... or bd config set linear.api_key \"YOUR_API_KEY\"")
		}
	}

	teamIDs := getLinearTeamIDs(ctx, cliTeams)
	if len(teamIDs) == 0 {
		return fmt.Errorf("no Linear team ID configured\nRun: bd config set linear.team_id \"TEAM_ID\"\nOr:  bd config set linear.team_ids \"TEAM_ID1,TEAM_ID2\"\nOr: export LINEAR_TEAM_ID=TEAM_ID")
	}

	for _, id := range teamIDs {
		if !isValidUUID(id) {
			return fmt.Errorf("invalid Linear team ID (expected UUID format like '12345678-1234-1234-1234-123456789abc')\nInvalid value: %s", id)
		}
	}

	return nil
}

// maskAPIKey returns a masked version of an API key for display.
// Shows first 4 and last 4 characters, with dots in between.
func maskAPIKey(key string) string {
	if len(key) <= 8 {
		return "****"
	}
	return key[:4] + "..." + key[len(key)-4:]

View on GitHub (pinned to 71377f2769)

Solutions

  1. Run `bd config set linear.team_id "TEAM_ID"`
  2. For multiple teams: `bd config set linear.team_ids "ID1,ID2"`
  3. Or export LINEAR_TEAM_ID=TEAM_ID in the environment running bd
  4. Run `bd linear teams` to list team IDs and pick the correct one

Example fix

// before
$ bd linear sync
Error: no Linear team ID configured...
// after
$ bd config set linear.team_id "12345678-1234-1234-1234-123456789abc"
$ bd linear sync
Defensive patterns

Strategy: validation

Validate before calling

team := os.Getenv("LINEAR_TEAM_ID")
if team == "" {
	return fmt.Errorf("configure linear.team_id via 'bd config set' or LINEAR_TEAM_ID before syncing")
}

Try / catch

if err := runLinearSync(ctx); err != nil && strings.Contains(err.Error(), "no Linear team ID configured") {
	// run `bd linear teams`, pick a UUID, `bd config set linear.team_id`, retry
}

Prevention

When it happens

Trigger: Running bd linear sync/push/pull with no --team flag, no linear.team_id or linear.team_ids in bd config, and no LINEAR_TEAM_ID env var.

Common situations: API key configured but team never set; LINEAR_TEAM_ID set in a different shell/environment than the one running bd; config key typo (e.g. linear.teams instead of linear.team_ids).

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/d4a986c9bf200e96. Report an issue: GitHub.