{"record":{"id":"9df6dc1048c00609","repo":"multica-ai/multica","slug":"start-task-failed-w","errorCode":null,"errorMessage":"start task failed: %w","messagePattern":"start task failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/daemon.go","lineNumber":6656,"sourceCode":"\t\tif cerr := os.RemoveAll(taskTempDir); cerr != nil {\n\t\t\ttaskLog.Warn(\"task temp dir cleanup failed\", \"path\", taskTempDir, \"error\", cerr)\n\t\t}\n\t}()\n\n\t// Issue #3999 race A: now that env.WorkDir is on disk, transition the\n\t// server-side state machine dispatched (or waiting_local_directory) →\n\t// running. Calling StartTask before Prepare/Reuse let any consumer\n\t// that read status==running and resolved\n\t// /multica_workspaces/{ws}/{short-id}/workdir hit FileNotFoundError in\n\t// the microsecond window before os.MkdirAll ran.\n\t//\n\t// On error we return early so handleTask's existing FailTask +\n\t// taskfailure.Classify path records the failure with the same\n\t// \"start task failed: <…>\" string and the same failure_reason\n\t// taxonomy as before — see MUL-2946 for the classifier contract.\n\tif err := d.client.StartTask(prepareCtx, task.ID); err != nil {\n\t\tstopPrepareLease()\n\t\treturn TaskResult{}, fmt.Errorf(\"start task failed: %w\", err)\n\t}\n\tstopPrepareLease()\n\tprepareComplete = true\n\tcancelPrepare()\n\t_ = d.client.ReportProgress(ctx, task.ID, fmt.Sprintf(\"Launching %s\", provider), 1, 2)\n\n\treused := gateResumeToReusedWorkdir(&task, &taskCtx, env.WorkDir, sessionHomeReachable(provider, env, envReused), taskLog)\n\t// A reused workdir is necessary but not sufficient for a Codex resume: the\n\t// prior thread's rollout must actually be present in this task's CODEX_HOME\n\t// sessions (MUL-4424 isolates them). Drop the resume before the brief is\n\t// generated below if it isn't, so we never tell the agent it is continuing a\n\t// conversation Codex will silently restart from scratch.\n\tif reused {\n\t\tgateCodexResumeToRolloutPresence(&task, &taskCtx, provider, env.CodexHome, taskLog)\n\t}\n\n\t// Inject runtime-specific config (meta skill) so the agent discovers .agent_context/.\n\truntimeBrief, err := execenv.InjectRuntimeConfig(env.WorkDir, provider, taskCtx)","sourceCodeStart":6638,"sourceCodeEnd":6674,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/daemon.go#L6638-L6674","documentation":"Error \"start task failed: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/daemon.go:6656 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the underlying task start failure."],"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-15T22:17:37.221Z"}