tinyhumansai/openhuman · error · anyhow::Error
invalid handle (kind must be imessage|email|display_name): {
Error message
invalid handle (kind must be imessage|email|display_name): {e} What it means
Handle validation in parse_handle (used by people_add_alias and related tools): the `kind` argument was not one of imessage|email|display_name (parse failure surfaced from PersonHandle construction). person_id is deliberately left opaque per contract — only kind/value shape is validated host-side. The message embeds the underlying parse error `{e}`.
Source
Thrown at src/openhuman/memory/tools/people.rs:63
.map(str::to_string)
.ok_or_else(|| anyhow::anyhow!("missing required string argument `{key}`"))
}
/// Read `person_id` as the opaque token the contract defines it to be.
///
/// It is not parsed into a `Uuid` here: `PersonRef` is opaque by contract and
/// the driver owns its format. Validating a shape the host does not define
/// would reject a driver that identifies people some other way.
fn parse_person_id(args: &serde_json::Value) -> anyhow::Result<String> {
read_required_str(args, "person_id")
}
/// Build a [`PersonHandle`] from `kind` + `value` args.
fn parse_handle(args: &serde_json::Value) -> anyhow::Result<PersonHandle> {
let kind = read_required_str(args, "kind")?;
let value = read_required_str(args, "value")?;
serde_json::from_value(json!({ "kind": kind, "value": value })).map_err(|e| {
anyhow::anyhow!("invalid handle (kind must be imessage|email|display_name): {e}")
})
}
fn handle_schema_props() -> serde_json::Value {
json!({
"kind": { "type": "string", "enum": ["imessage", "email", "display_name"], "description": "Handle kind." },
"value": { "type": "string", "description": "Handle value (phone / email / display name)." }
})
}
/// List ranked contacts.
pub struct PeopleListTool;
#[async_trait]
impl Tool for PeopleListTool {
fn name(&self) -> &str {
"people_list"
}View on GitHub (pinned to 7491200858)
Solutions
- Use a valid kind: imessage, email, or display_name
- Check the value format matches the kind (e.g. an email address for email)
- Fix malformed handle values from the model's tool call
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/memory/tools/people.rs:63 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/4417ce4955358043.
Report an issue: GitHub.