multica-ai/multica · error

derive hermes .env: %w

Error message

derive hermes .env: %w

What it means

Error "derive hermes .env: %w" thrown in multica-ai/multica.

Source

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

	// 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
// no user .env loaded) can't relocate the home either. Written 0600 via atomic
// replace since it can hold API-key secrets; reuse also repairs prior perms.
func writeDerivedHermesEnv(sharedHome, hermesHome string) error {

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Inspect the wrapped error from deriving the hermes .env.

When it happens

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