paperclipai/paperclip · error
workspaceId and companyId are required
Error message
workspaceId and companyId are required
What it means
Error "workspaceId and companyId are required" thrown in paperclipai/paperclip.
Solutions
- Pass both workspaceId and companyId.
When it happens
Trigger: Thrown at packages/plugins/plugin-workspace-diff/src/worker.ts:54 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/74f47c99d7738e35.
Report an issue: GitHub.
Appendix: source
Thrown at packages/plugins/plugin-workspace-diff/src/worker.ts:54
: workspaces.find((candidate) => candidate.isPrimary) ?? workspaces[0] ?? null;
return projectWorkspace
? resolveDefaultBaseRef({
projectWorkspaceDefaultRef: projectWorkspace.defaultRef,
projectWorkspaceRepoRef: projectWorkspace.repoRef,
})
: null;
}
const plugin = definePlugin({
async setup(ctx) {
ctx.logger.info(`${PLUGIN_NAME} plugin setup`);
const workspaceDiff = workspaceDiffService();
ctx.data.register("workspace-diff", async (params: Record<string, unknown>) => {
const workspaceId = readString(params.workspaceId);
const companyId = readString(params.companyId);
if (!workspaceId || !companyId) {
throw new Error("workspaceId and companyId are required");
}
if (params.entityType === "project_workspace") {
const projectId = readString(params.projectId);
if (!projectId) {
throw new Error("projectId is required for project workspace diffs");
}
const workspaces = await ctx.projects.listWorkspaces(projectId, companyId);
const workspace = workspaces.find((candidate) => candidate.id === workspaceId);
if (!workspace) {
throw new Error("Workspace not found");
}
return workspaceDiff.getDiff({
id: workspace.id,
companyId,
cwd: workspace.path,
baseRef: resolveDefaultBaseRef({
projectWorkspaceDefaultRef: workspace.defaultRef,View on GitHub (pinned to 120ae5428f)