multica-ai/multica · error

prepare task-local state: %w

Error message

prepare task-local state: %w

What it means

Error "prepare task-local state: %w" thrown in multica-ai/multica.

Source

Thrown at server/internal/daemon/execenv/hermes_home.go:402

	if sharedHome == "" {
		sharedHome = platformDefaultHermesHome()
	}
	if sourceMustExist {
		if fi, err := os.Stat(sharedHome); err != nil || !fi.IsDir() {
			return hermesSessionMount{}, fmt.Errorf("hermes profile home %q not found (create it with `hermes profile create`)", sharedHome)
		}
	}

	if err := os.MkdirAll(hermesHome, 0o700); err != nil {
		return hermesSessionMount{}, fmt.Errorf("create hermes-home dir: %w", err)
	}
	// Tighten perms on reuse too — MkdirAll leaves an existing dir's mode alone,
	// and the derived config below can hold inline api_key secrets.
	if err := os.Chmod(hermesHome, 0o700); err != nil {
		return hermesSessionMount{}, fmt.Errorf("chmod hermes-home dir: %w", err)
	}
	if err := prepareHermesTaskLocalState(hermesHome); err != nil {
		return hermesSessionMount{}, fmt.Errorf("prepare task-local state: %w", err)
	}
	// Sessions: link state.db at the conversation's persistent store so the
	// transcript survives the task. A store that cannot be mounted leaves the
	// database task-local — the pre-existing behaviour — rather than failing the
	// task. See hermes_sessions.go.
	if sessionStore != "" {
		mounted, err := mountHermesSessionDB(hermesHome, sessionStore, logger)
		if err != nil {
			return hermesSessionMount{}, fmt.Errorf("mount conversation sessions: %w", err)
		}
		sessions = mounted
	}
	// Memory: link memories/ at the agent's persistent store so it survives the
	// task, or fall back to a fresh task-local dir when there is no store (no
	// agent to key on, or an unresolvable profile dir). See hermes_memory.go.
	if memoryStore != "" {
		if err := mountHermesMemories(hermesHome, memoryStore, logger); err != nil {
			return hermesSessionMount{}, fmt.Errorf("mount agent memories: %w", err)

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Inspect the wrapped error from task-local state preparation.

When it happens

Trigger: Thrown at server/internal/daemon/execenv/hermes_home.go:402 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/3b1cda6e233de257. Report an issue: GitHub.