paperclipai/paperclip · error · WorkspaceValidationFailure

git_worktree_base_not_git_checkout

git_worktree_base_not_git_checkout

Error message

Issue ${issueLabel} requested ${input.requestedExecutionWorkspaceMode} with git_worktree, but base workspace "${input.base.baseCwd}" is not a git checkout. ${remediation}

What it means

Error "Issue ${issueLabel} requested ${input.requestedExecutionWorkspaceMode} with git_worktree, but base workspace "${input.base.baseCwd}" is not a git checkout. ${remediation}" thrown in paperclipai/paperclip.

Source

Thrown at server/src/services/heartbeat.ts:2153

  effectiveExecutionWorkspaceMode: string | null | undefined;
  issue: {
    companyId: string;
    id?: string | null;
    projectId?: string | null;
  } | null;
  resolveSelectedEnvironmentDriver: () => Promise<string | null | undefined>;
  resolveWorkspace: () => Promise<TWorkspace>;
}): Promise<{
  selectedEnvironmentDriver: string | null;
  workspace: TWorkspace;
}> {
  const selectedEnvironmentDriver = await preflightLowTrustWorkspaceIsolation({
    db: input.db,
    trustPreset: input.trustPreset,
    isolatedWorkspacesEnabled: input.isolatedWorkspacesEnabled,
    effectiveExecutionWorkspaceMode: input.effectiveExecutionWorkspaceMode,
    issue: input.issue,
    resolveSelectedEnvironmentDriver: input.resolveSelectedEnvironmentDriver,
  });

  return {
    selectedEnvironmentDriver,
    workspace: await input.resolveWorkspace(),
  };
}

function deriveRepoNameFromRepoUrl(repoUrl: string | null): string | null {
  const trimmed = repoUrl?.trim() ?? "";
  if (!trimmed) return null;
  try {
    const parsed = new URL(trimmed);
    const cleanedPath = parsed.pathname.replace(/\/+$/, "");
    const repoName =
      cleanedPath
        .split("/")
        .filter(Boolean)

View on GitHub (pinned to 01ad858492)

Solutions

  1. Point the base workspace at a real git checkout; follow the remediation in the message.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/heartbeat.ts:1985 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/75066586dbfda407. Report an issue: GitHub.