zeroclaw-labs/zeroclaw · error · anyhow::Error

Identity format is set to 'aieos' but neither aieos_path nor

Error message

Identity format is set to 'aieos' but neither aieos_path nor aieos_inline is configured. Set one in your config:

[identity]
format = "aieos"
aieos_path = "identity.json"

Or use inline:

[identity]
format = "aieos"
aieos_inline = '{"identity": {...}}'

What it means

ZeroClaw's load_aieos_identity only activates when [identity] format is exactly "aieos". It then tries aieos_path (file, resolved against the workspace dir) and aieos_inline (inline JSON string) in that order. When both are absent it bails with this message, which embeds a copy-pastable config snippet. It is a startup config-completeness guard: the format flag promises an AIEOS persona document that was never supplied.

Source

Thrown at crates/zeroclaw-runtime/src/identity.rs:196

        let identity = parse_aieos_identity(&content).with_context(|| {
            format!(
                "Failed to parse AIEOS JSON from: {}",
                full_path.display().to_string()
            )
        })?;

        return Ok(Some(identity));
    }

    // Fall back to aieos_inline
    if let Some(ref inline) = config.aieos_inline {
        let identity = parse_aieos_identity(inline).context("Failed to parse inline AIEOS JSON")?;

        return Ok(Some(identity));
    }

    // Format is "aieos" but neither path nor inline is configured
    anyhow::bail!(
        "Identity format is set to 'aieos' but neither aieos_path nor aieos_inline is configured. \
         Set one in your config:\n\
         \n\
         [identity]\n\
         format = \"aieos\"\n\
         aieos_path = \"identity.json\"\n\
         \n\
         Or use inline:\n\
         \n\
         [identity]\n\
         format = \"aieos\"\n\
         aieos_inline = '{{\"identity\": {{...}}}}'"
    )
}

fn parse_aieos_identity(content: &str) -> Result<AieosIdentity> {
    let payload: Value = serde_json::from_str(content).context("Invalid AIEOS JSON")?;
    if !payload.is_object() {

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Add aieos_path = "identity.json" under [identity] and create that JSON object file in the workspace (or use an absolute path)
  2. Or embed the document directly: aieos_inline = '{"identity": {...}}'
  3. Check key spelling: exactly aieos_path or aieos_inline; aieos_path wins if both are set
  4. If you did not intend AIEOS, remove the format = "aieos" line or restore the previous format value

Example fix

# before
[identity]
format = "aieos"

# after
[identity]
format = "aieos"
aieos_path = "identity.json"

# or inline
[identity]
format = "aieos"
aieos_inline = '{"identity": {"name": "..."}}'
Defensive patterns

Strategy: validation

Validate before calling

fn identity_config_complete(cfg: &IdentityConfig) -> bool {
    cfg.format != "aieos" || cfg.aieos_path.is_some() || cfg.aieos_inline.is_some()
}
// call before load_aieos_identity; on false, prompt for a payload source

Try / catch

if let Err(e) = load_aieos_identity(&cfg.identity, &workspace_dir) {
    if e.to_string().contains("neither aieos_path nor aieos_inline") {
        // fatal config error: surface the embedded snippet to the user and exit before the agent loop
    }
    return Err(e);
}

Prevention

When it happens

Trigger: Setting [identity] format = "aieos" in the ZeroClaw config without adding aieos_path or aieos_inline; renaming a differently-spelled key (aieos_paths, aieos_file, aieos_json); switching format from "simple"/"markdown" to "aieos" while only carrying over the old config keys. Note format is compared literally — "AIEOS" would return Ok(None) instead, so this error implies format == "aieos" exactly.

Common situations: Migrating an existing bot to the AIEOS persona format and forgetting the payload file; a CI/template pipeline that renders the [identity] table from variables but leaves the payload key undefined; committing the config but not the identity.json the path points to (that later fails with a different read error, but a missing key fails with this one first).

Related errors


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/2b003d21cf6ba6ac. Report an issue: GitHub.