{"record":{"id":"b006dd618a746276","repo":"multica-ai/multica","slug":"refusing-to-spawn-agent-task-has-no-workspace-id","errorCode":null,"errorMessage":"refusing to spawn agent: task has no workspace_id (task_id=%s)","messagePattern":"refusing to spawn agent: task has no workspace_id \\(task_id=(.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/daemon.go","lineNumber":6084,"sourceCode":"\t}\n\treturn SkillRefData{\n\t\tID:        bundle.ID,\n\t\tSource:    bundle.Source,\n\t\tHash:      manifest.Hash,\n\t\tSizeBytes: manifest.SizeBytes,\n\t\tFileCount: manifest.FileCount,\n\t\tFiles:     fileRefs,\n\t}\n}\n\nfunc (d *Daemon) runTask(ctx context.Context, task Task, provider string, slot int, taskLog *slog.Logger) (taskResult TaskResult, returnErr error) {\n\t// Refuse to spawn an agent without a workspace. An empty workspace_id\n\t// here would make MULTICA_WORKSPACE_ID empty in the agent env, and the\n\t// CLI would otherwise silently fall back to the user-global config — a\n\t// path that can leak operations into an unrelated workspace when\n\t// multiple workspaces share a host.\n\tif task.WorkspaceID == \"\" {\n\t\treturn TaskResult{}, fmt.Errorf(\"refusing to spawn agent: task has no workspace_id (task_id=%s)\", task.ID)\n\t}\n\n\tprepareTimeout := d.effectiveTaskPrepareTimeout()\n\tprepareCtx, cancelPrepare := context.WithTimeoutCause(ctx, prepareTimeout, errTaskPrepareTimeout)\n\tprepareComplete := false\n\tdefer func() {\n\t\tcancelPrepare()\n\t\tif prepareComplete || returnErr == nil || !errors.Is(context.Cause(prepareCtx), errTaskPrepareTimeout) {\n\t\t\treturn\n\t\t}\n\t\t// Collapse every deadline shape (context deadline, HTTP cancellation,\n\t\t// or the explicit waitForExecutionEnvironment cause) into one sentinel\n\t\t// that handleTask can classify as a retryable platform timeout.\n\t\ttaskResult = TaskResult{}\n\t\treturnErr = fmt.Errorf(\"%w after %s\", errTaskPrepareTimeout, prepareTimeout)\n\t}()\n\n\t// task.Repos is the authoritative repo list for this task — when the","sourceCodeStart":6066,"sourceCodeEnd":6102,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/daemon.go#L6066-L6102","documentation":"Error \"refusing to spawn agent: task has no workspace_id (task_id=%s)\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/daemon.go:6084 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Recreate the task with a workspace_id; the daemon refuses to spawn agents without one."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}