multica-ai/multica · error
write workspaces root marker: %w
Error message
write workspaces root marker: %w
What it means
Error "write workspaces root marker: %w" thrown in multica-ai/multica.
Source
Thrown at server/internal/daemon/execenv/context.go:83
return fmt.Errorf("foreign file at workspaces root marker path %s; refusing to overwrite", path)
}
// Unparseable content is almost certainly a torn write of our own
// marker; fall through to reclaim it below.
} else if !os.IsNotExist(err) {
// A real read error (e.g. a directory at the path) is not a signal we
// can safely overwrite; surface it. Callers degrade non-fatally.
return fmt.Errorf("read workspaces root marker %s: %w", path, err)
}
payload := taskContextMarkerFile{ManagedBy: TaskContextMarkerManagedBy}
data, err := json.MarshalIndent(payload, "", " ")
if err != nil {
return fmt.Errorf("marshal workspaces root marker: %w", err)
}
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
return fmt.Errorf("create workspaces root marker dir: %w", err)
}
if err := writeWorkspacesRootMarkerAtomic(path, data); err != nil {
return fmt.Errorf("write workspaces root marker: %w", err)
}
return nil
}
// writeWorkspacesRootMarkerAtomic writes data to path via a same-directory temp
// file plus a rename, so a concurrent reader observes either the old file or the
// complete new one — never a partial write. Mirrors the daemon-id / CLI-config
// write idiom (see writeDaemonIDFile). Perm is 0644 because the CLI's upward
// walk must be able to read the marker from a subprocess that may run under a
// different uid; the payload is non-secret.
func writeWorkspacesRootMarkerAtomic(path string, data []byte) error {
tmp, err := os.CreateTemp(filepath.Dir(path), ".daemon_task_context-*.json.tmp")
if err != nil {
return fmt.Errorf("create temp workspaces root marker: %w", err)
}
tmpPath := tmp.Name()
if _, err := tmp.Write(data); err != nil {
tmp.Close()View on GitHub (pinned to 2c0912b6ec)
Solutions
- Check disk space and permissions for the workspaces root.
When it happens
Trigger: Thrown at server/internal/daemon/execenv/context.go:83 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/b5943fd136b6084a.
Report an issue: GitHub.