multica-ai/multica · error

configure Codex shell environment: %w

Error message

configure Codex shell environment: %w

What it means

Error "configure Codex shell environment: %w" thrown in multica-ai/multica.

Source

Thrown at server/internal/daemon/daemon.go:8500

// configureCodexTaskShellEnvironment writes the managed shell policy only
// after the task and agent custom environment are fully assembled. This makes
// the allowlist reflect the child environment that will actually be launched,
// including platform-specific essentials and blocklist-checked custom_env
// credentials.
// Failure is fatal: launching with an unowned or malformed policy could either
// drop the task-scoped token again or expose inherited daemon credentials.
func configureCodexTaskShellEnvironment(provider, codexHome string, inherited []string, agentEnv, agentCustomEnv map[string]string, logger *slog.Logger) error {
	if provider != "codex" {
		return nil
	}
	if strings.TrimSpace(codexHome) == "" {
		return errors.New("configure Codex shell environment: task CODEX_HOME is missing")
	}
	authorizedExplicit := codexShellAuthorizedCustomEnvNames(agentCustomEnv)
	includeOnly := execenv.CodexShellEnvAllowlist(inherited, agentEnv, authorizedExplicit)
	configPath := filepath.Join(codexHome, "config.toml")
	if err := execenv.EnsureCodexShellEnvPolicyConfig(configPath, includeOnly, logger); err != nil {
		return fmt.Errorf("configure Codex shell environment: %w", err)
	}
	return nil
}

func defaultArgsForProvider(cfg Config, provider string) []string {
	var args []string
	switch provider {
	case "claude":
		args = cfg.ClaudeArgs
	case "codex":
		args = cfg.CodexArgs
	case "codebuddy":
		args = cfg.CodebuddyArgs
	case "qwen":
		args = cfg.QwenArgs
	case "qwenpaw":
		args = cfg.QwenpawArgs
	default:

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Inspect the wrapped error from the Codex shell environment configuration.

When it happens

Trigger: Thrown at server/internal/daemon/daemon.go:8500 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/2842455a0771427f. Report an issue: GitHub.