coleam00/Archon · error

Failed to sync repository to ${defaultBranch}. Try /reset or

Error message

Failed to sync repository to ${defaultBranch}. Try /reset or check if the branch exists. Details: ${syncResult.error.code === 'branch_not_found' ? `Branch '${defaultBranch}' not found` : 'message' in syncResult.error ? syncResult.error.message : syncResult.error.code}

What it means

Error "Failed to sync repository to ${defaultBranch}. Try /reset or check if the branch exists. Details: ${syncResult.error.code === 'branch_not_found' ? `Branch '${defaultBranch}' not found` : 'message' in syncResult.error ? syncResult.error.message : syncResult.error.code}" thrown in coleam00/Archon.

Source

Thrown at packages/adapters/src/forge/github/adapter.ts:711

        getLog().error({ repoPath, errorCode: err.code, err }, 'github.repo_path_access_failed');
        throw new Error(
          `Cannot access repository at ${repoPath}: ${err.code ?? err.message}. ` +
            'Check permissions and disk health.'
        );
      }
      // ENOENT means directory doesn't exist - we'll clone below
    }

    if (directoryExists) {
      if (shouldSync) {
        getLog().info({ repoPath, defaultBranch }, 'github.repo_syncing');
        const syncResult = await syncRepository(toRepoPath(repoPath), toBranchName(defaultBranch));
        if (!syncResult.ok) {
          getLog().error(
            { error: syncResult.error, repoPath, defaultBranch },
            'github.repo_sync_failed'
          );
          throw new Error(
            `Failed to sync repository to ${defaultBranch}. ` +
              `Try /reset or check if the branch exists. Details: ${syncResult.error.code === 'branch_not_found' ? `Branch '${defaultBranch}' not found` : 'message' in syncResult.error ? syncResult.error.message : syncResult.error.code}`
          );
        }
      }
      return;
    }

    // Directory doesn't exist - clone the repository
    getLog().info({ owner, repo, repoPath }, 'github.repo_cloning');

    // Create project structure (source/, worktrees/, artifacts/, logs/) before
    // cloning so worktree paths resolve correctly on first webhook clone.
    await ensureProjectStructure(owner, repo);

    // Resolve the right auth token per mode. App mode talks to the auth
    // provider (installation token, ~1h validity); PAT mode reads env directly.
    let ghToken: string | undefined;

View on GitHub (pinned to 0773b97458)

When it happens

Trigger: Thrown at packages/adapters/src/forge/github/adapter.ts:711 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/357a2e36cd0e089a. Report an issue: GitHub.