multica-ai/multica · error
execenv: write context files: %w
Error message
execenv: write context files: %w
What it means
Error "execenv: write context files: %w" thrown in multica-ai/multica.
Source
Thrown at server/internal/daemon/execenv/execenv.go:468
//
// In place only. Worktree mode discards the whole worktree on failure just
// above, and a cloud envRoot is wiped wholesale by the GC — only the
// local_directory flow writes into a directory that outlives the task and
// belongs to the user, where a leftover marker disables every multica
// command in that directory tree until someone removes it by hand.
if params.LocalWorkDir != "" {
defer func() {
if prepareSucceeded {
return
}
if err := rollBackPreparedSidecars(*manifest); err != nil && logger != nil {
logger.Warn("execenv: roll back sidecars after failed prepare", "work_dir", workDir, "error", err)
}
}()
}
if err := writeContextFiles(workDir, params.Provider, params.Task, manifest); err != nil {
return nil, fmt.Errorf("execenv: write context files: %w", err)
}
// Persist managed-env provenance for non-local issue envs at Prepare time
// (not on completion, where .gc_meta.json is written). A same-issue
// follow-up can be claimed the instant the prior task completes — before
// the prior handler writes .gc_meta.json — so reuse eligibility must be
// provable from an artifact that exists the moment the env is created. Only
// managed (non-local_directory) issue envs get this marker; that is exactly
// the set squad-leader reuse targets (MUL-4886). Non-fatal: a write failure
// only costs the next follow-up its session reuse (it falls back to a fresh
// session), which must never block dispatching this task.
if params.LocalWorkDir == "" && params.Task.IssueID != "" {
if err := WriteManagedEnvProvenance(envRoot, ManagedEnvProvenance{
WorkspaceID: params.WorkspaceID,
IssueID: params.Task.IssueID,
AgentID: params.Task.AgentID,
}); err != nil && logger != nil {
logger.Warn("execenv: write managed env provenance failed (non-fatal); a follow-up may start a fresh session", "error", err)View on GitHub (pinned to 2c0912b6ec)
Solutions
- Check disk space and permissions for the context files.
When it happens
Trigger: Thrown at server/internal/daemon/execenv/execenv.go:468 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/e88876e6dc64f236.
Report an issue: GitHub.