multica-ai/multica · error

derive hermes config

Error message

derive hermes config: %w

What it means

Wraps failure deriving the task-local Hermes config in the overlay (provider pinned, external dirs adjusted to the task environment). Fatal so Hermes never boots with config inherited verbatim from the shared home.

Solutions

  1. Inspect the wrapped error from deriving the hermes config.
Defensive patterns

Strategy: try-catch

When it happens

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

Appendix: source

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

		}
		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)
		}
	} else if err := detachHermesMemories(hermesHome); err != nil {
		return hermesSessionMount{}, fmt.Errorf("create task memories dir: %w", err)
	}

	if err := mirrorSharedHermesHome(sharedHome, hermesHome, logger); err != nil {
		return hermesSessionMount{}, fmt.Errorf("mirror shared hermes home: %w", err)
	}
	if err := writeDerivedHermesConfig(sharedHome, hermesHome, env, logger); err != nil {
		return hermesSessionMount{}, fmt.Errorf("derive hermes config: %w", err)
	}
	if err := writeDerivedHermesEnv(sharedHome, hermesHome); err != nil {
		return hermesSessionMount{}, fmt.Errorf("derive hermes .env: %w", err)
	}
	if err := writeHermesBoundSkills(hermesHome, workspaceSkills, logger); err != nil {
		return hermesSessionMount{}, err
	}
	return sessions, nil
}

// writeDerivedHermesEnv writes the task-local .env: the source home's .env
// contents (credentials/settings preserved) with any HERMES_HOME assignment
// removed, then a pinned HERMES_HOME pointing at the overlay appended last so it
// wins. Hermes loads <HERMES_HOME>/.env with override=True right after profile
// resolution, so without this an out-of-band HERMES_HOME= in the source .env
// would relocate the home past the overlay (dropping bound skills and memory
// isolation). We always write the file — even when the source has none — so the
// overlay .env "loads" and Hermes' project-.env fallback (override=True only when

View on GitHub (pinned to 2c0912b6ec)