{"record":{"id":"89c3fff7fa34c187","repo":"davila7/claude-code-templates","slug":"warning-could-not-fetch-agents-using-fallback-li","errorCode":null,"errorMessage":"Warning: Could not fetch agents, using fallback list","messagePattern":"Warning: Could not fetch agents, using fallback list","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli-tool/src/index.js","lineNumber":1513,"sourceCode":"            for (const categoryItem of categoryContents) {\n              if (categoryItem.type === 'file' && categoryItem.name.endsWith('.md')) {\n                agents.push({\n                  name: categoryItem.name.replace('.md', ''),\n                  path: `${item.name}/${categoryItem.name.replace('.md', '')}`,\n                  category: item.name\n                });\n              }\n            }\n          }\n        } catch (error) {\n          console.warn(`Warning: Could not fetch category ${item.name}:`, error.message);\n        }\n      }\n    }\n    \n    return agents;\n  } catch (error) {\n    console.warn('Warning: Could not fetch agents, using fallback list');\n    // Comprehensive fallback list if all methods fail\n    return [\n      { name: 'frontend-developer', path: 'development-team/frontend-developer', category: 'development-team' },\n      { name: 'backend-developer', path: 'development-team/backend-developer', category: 'development-team' },\n      { name: 'fullstack-developer', path: 'development-team/fullstack-developer', category: 'development-team' },\n      { name: 'api-security-audit', path: 'api-security-audit', category: 'root' },\n      { name: 'database-optimization', path: 'database-optimization', category: 'root' },\n      { name: 'react-performance-optimization', path: 'react-performance-optimization', category: 'root' }\n    ];\n  }\n}\n\nasync function installIndividualSkill(skillName, targetDir, options) {\n  console.log(chalk.blue(`💡 Installing skill: ${skillName}`));\n  const startTime = Date.now();\n\n  try {\n    // Skills can be in format: \"skill-name\" or \"category/skill-name\"","sourceCodeStart":1495,"sourceCodeEnd":1531,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/index.js#L1495-L1531","documentation":"This is the top-level fallback for getAvailableAgents(): every strategy to fetch the agent list from GitHub failed, so the CLI prints this warning and returns a hardcoded fallback list of well-known agents. Functionality continues but the list may be stale/incomplete relative to the live repo.","triggerScenarios":"All fetch attempts fail: no network (offline machine), DNS failure for raw.githubusercontent.com/api.github.com, HTTP 403 rate limit on every category request, or a proxy blocking all outbound HTTPS.","commonSituations":"Air-gapped or proxied corporate environments, airplane/offline usage, CI without network egress, or exhausting the unauthenticated GitHub API quota.","solutions":["Check connectivity: `curl -I https://api.github.com` and `curl -I https://raw.githubusercontent.com`.","Set GITHUB_TOKEN (or GITHUB_ACCESS_TOKEN) to raise rate limits if the failure is 403-based.","Configure proxy env vars (HTTPS_PROXY) if behind a corporate proxy.","Accept the fallback list — it exists precisely so the CLI keeps working offline; update your CLI version to get a fresher hardcoded list."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// probe connectivity before relying on live agent list\nconst reachable = await fetch('https://api.github.com', { method: 'HEAD' }).then(r => r.ok).catch(() => false);","typeGuard":null,"tryCatchPattern":"catch { console.warn('Could not fetch agents, using fallback list'); return FALLBACK_AGENTS; }","preventionTips":["Treat the fallback list as a feature: always provide a hardcoded baseline.","Ship a cached copy of the last successful fetch to use before the hardcoded fallback.","Set GITHUB_TOKEN in CI environments."],"tags":["offline","fallback","github-api","network"],"backgroundTag":"offline-fallback-data","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}