multica-ai/multica · error
prepare task temp dir: %w
Error message
prepare task temp dir: %w
What it means
Error "prepare task temp dir: %w" thrown in multica-ai/multica.
Source
Thrown at server/internal/daemon/daemon.go:6635
}
// In worktree mode a failed cleanup is NOT survivable: Finalize is
// about to `git add -A`, so whatever the cleanup could not remove
// gets committed and delivered as the task's branch — a diff whose
// content is Multica's own runtime files, which is precisely what
// this mode promises never to produce. Tell Finalize to abort
// instead, so nothing is committed and the worktree is kept for
// inspection. (In place there is no commit and no branch, so a
// cleanup failure stays a warning: the leftover files are visible
// in the user's own tree and removable by hand.)
if cleanupErr != nil && env.LocalWorktree != nil {
env.LocalWorktree.AbortWithReason(fmt.Errorf(
"could not remove the runtime's own files from the worktree before committing: %w", cleanupErr))
}
}()
}
taskTempDir, err := ensureTaskTempDir(env.RootDir, task.WorkspaceID, task.ID)
if err != nil {
return TaskResult{}, fmt.Errorf("prepare task temp dir: %w", err)
}
defer func() {
if cerr := os.RemoveAll(taskTempDir); cerr != nil {
taskLog.Warn("task temp dir cleanup failed", "path", taskTempDir, "error", cerr)
}
}()
// Issue #3999 race A: now that env.WorkDir is on disk, transition the
// server-side state machine dispatched (or waiting_local_directory) →
// running. Calling StartTask before Prepare/Reuse let any consumer
// that read status==running and resolved
// /multica_workspaces/{ws}/{short-id}/workdir hit FileNotFoundError in
// the microsecond window before os.MkdirAll ran.
//
// On error we return early so handleTask's existing FailTask +
// taskfailure.Classify path records the failure with the same
// "start task failed: <…>" string and the same failure_reason
// taxonomy as before — see MUL-2946 for the classifier contract.View on GitHub (pinned to 2c0912b6ec)
Solutions
- Check disk space and permissions for the temp directory.
When it happens
Trigger: Thrown at server/internal/daemon/daemon.go:6635 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/12d5171a24c8012f.
Report an issue: GitHub.