{"record":{"id":"c2115d4838ffceaf","repo":"multica-ai/multica","slug":"execenv-prepare-openclaw-config-w","errorCode":null,"errorMessage":"execenv: prepare openclaw config: %w","messagePattern":"execenv: prepare openclaw config: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/execenv.go","lineNumber":592,"sourceCode":"\t\t}\n\t\tlogger.Warn(\"execenv: write sidecar manifest failed (non-fatal)\", \"error\", err)\n\t}\n\n\t// For OpenClaw, synthesize a per-task config that pins workspace to\n\t// workDir. The skill scanner then reads {workDir}/skills/ (written by\n\t// writeContextFiles above). Fail closed on errors: a malformed user\n\t// config that the openclaw CLI can't read is a real problem and\n\t// silently degrading to a minimal config would mask it by booting\n\t// OpenClaw without the agents / providers / API keys it expects.\n\tif params.Provider == \"openclaw\" {\n\t\tresult, err := prepareOpenclawConfig(envRoot, workDir, OpenclawConfigPrep{\n\t\t\tOpenclawBin: params.OpenclawBin,\n\t\t\tMcpConfig:   params.McpConfig,\n\t\t\tGateway:     params.OpenclawGateway,\n\t\t\tLogger:      logger,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"execenv: prepare openclaw config: %w\", err)\n\t\t}\n\t\tenv.OpenclawConfigPath = result.ConfigPath\n\t\tenv.OpenclawIncludeRoot = result.IncludeRoot\n\t}\n\n\tlogger.Info(\"execenv: prepared env\", \"root\", envRoot, \"repos_available\", len(params.Task.Repos))\n\tprepareSucceeded = true\n\treturn env, nil\n}\n\n// ReuseParams describes the inputs to Reuse. It mirrors PrepareParams for\n// the per-provider knobs (CodexVersion, OpenclawBin) so callers can pass\n// the same resolved binary path on both first-run and reuse paths.\ntype ReuseParams struct {\n\t// WorkspacesRoot is the daemon-owned root under which all task envs live.\n\t// Passed on reuse so the root-level fail-closed marker is self-healed here\n\t// too — a marker removed while the daemon runs is restored before a reused\n\t// task spawns, not only on the fresh-Prepare path.","sourceCodeStart":574,"sourceCodeEnd":610,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/execenv.go#L574-L610","documentation":"Error \"execenv: prepare openclaw config: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/execenv.go:592 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error from openclaw config preparation."],"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"}