multica-ai/multica · error
get agent env: %w
Error message
get agent env: %w
What it means
Error "get agent env: %w" thrown in multica-ai/multica.
Source
Thrown at server/cmd/multica/cmd_agent.go:1133
// Agent env subcommands
// ---------------------------------------------------------------------------
// runAgentEnvGet fetches the plaintext custom_env for a single agent
// via the audited `/env` endpoint. The CLI prints raw JSON in JSON
// mode and a key/value table otherwise; we never truncate or mask
// values here — the security gate is on the server, not the printer.
func runAgentEnvGet(cmd *cobra.Command, args []string) error {
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
var resp map[string]any
if err := client.GetJSON(ctx, "/api/agents/"+args[0]+"/env", &resp); err != nil {
return fmt.Errorf("get agent env: %w", err)
}
output, _ := cmd.Flags().GetString("output")
if output == "json" {
return cli.PrintJSON(os.Stdout, resp)
}
headers := []string{"KEY", "VALUE"}
env, _ := resp["custom_env"].(map[string]any)
rows := make([][]string, 0, len(env))
for k, v := range env {
rows = append(rows, []string{k, fmt.Sprintf("%v", v)})
}
cli.PrintTable(os.Stdout, headers, rows)
return nil
}
// runAgentEnvSet replaces an agent's custom_env wholesale via theView on GitHub (pinned to 2c0912b6ec)
Solutions
- Check server connectivity and permissions, then retry fetching the agent env.
When it happens
Trigger: Thrown at server/cmd/multica/cmd_agent.go:1133 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/c6964ee195d6162d.
Report an issue: GitHub.