Fission-AI/OpenSpec · error

Warning: failed to sync Copilot cloud agent files

Error message

Warning: failed to sync Copilot cloud agent files: ${message}

What it means

Warning printed by syncCopilotCloudFiles in its catch block: syncing or removing GitHub Copilot cloud-agent files threw, and the error message is surfaced without failing the whole update run. The update continues; only Copilot cloud files may be stale.

Solutions

  1. Address the underlying error text in the message (permissions, path)
  2. Re-run 'openspec update' or 'openspec init --copilot-cloud' to retry the sync
  3. Manage the .github/copilot files manually if the error persists
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/core/update.ts:557 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25). Data as JSON: /api/errors/cd3fe1d47749c202. Report an issue: GitHub.

Appendix: source

Thrown at src/core/update.ts:557

            );
          }
        } else if (isInteractive()) {
          console.log(
            chalk.dim(
              "GitHub Copilot cloud coding-agent files are available (opt-in). Enable with 'openspec init --copilot-cloud'."
            )
          );
        }
        return;
      }

      const removed = await removeCopilotCloudFiles(projectPath);
      if (removed > 0) {
        console.log(chalk.dim(`Removed: ${removed} Copilot cloud agent file(s) (github-copilot not configured)`));
      }
    } catch (error) {
      const message = error instanceof Error ? error.message : String(error);
      console.warn(`Warning: failed to sync Copilot cloud agent files: ${message}`);
    }
  }

  /**
   * Display message when all tools are up to date.
   */
  private displayUpToDateMessage(toolStatuses: ToolVersionStatus[]): void {
    const toolNames = toolStatuses.map((s) => s.toolId);
    console.log(chalk.green(`✓ All ${toolStatuses.length} tool(s) up to date (v${OPENSPEC_VERSION})`));
    console.log(chalk.dim(`  Tools: ${toolNames.join(', ')}`));
    console.log();
    console.log(chalk.dim('Use --force to refresh files anyway.'));
  }

  /**
   * Display the update plan showing which tools need updating.
   */
  private displayUpdatePlan(

View on GitHub (pinned to 6926ccb18a)