tinyhumansai/openhuman · error

missing required array argument `cards`

Error message

missing required array argument `cards`

What it means

Guard in thread_task_board_write: the required `cards` argument is absent from the tool args (args.get("cards") returned None). The tool schema declares cards as a required array, so a call omitting it fails here before any deserialization.

Source

Thrown at src/openhuman/threads/tools.rs:719

            "properties": {
                "thread_id": { "type": "string" },
                "cards": { "type": "array", "items": { "type": "object" } }
            },
            "required": ["thread_id", "cards"]
        })
    }

    fn permission_level(&self) -> PermissionLevel {
        PermissionLevel::Write
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        log::debug!("[tool][threads] task_board_write invoked");
        let thread_id = read_required_str(&args, "thread_id")?;
        let cards_val = args
            .get("cards")
            .cloned()
            .ok_or_else(|| anyhow::anyhow!("missing required array argument `cards`"))?;
        let cards: Vec<TaskBoardCard> = serde_json::from_value(cards_val)
            .map_err(|e| anyhow::anyhow!("thread_task_board_write: invalid cards: {e}"))?;
        let board = TaskBoard {
            thread_id,
            cards,
            updated_at: Utc::now().to_rfc3339(),
        };
        let saved = TaskBoardStore::new(self.config.workspace_dir.clone())
            .put(board)
            .await
            .map_err(|e| anyhow::anyhow!("thread_task_board_write: {e}"))?;
        Ok(ToolResult::success(serde_json::to_string(&json!({
            "task_board": saved,
        }))?))
    }
}

/// Delete one thread. **Irreversible** — default-OFF.

View on GitHub (pinned to 7491200858)

Solutions

  1. Include a `cards` array in the tool call, even an empty one to clear the board
  2. Ensure the model emits cards as a JSON array of objects
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/threads/tools.rs:719 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/70ecb3cabb999643. Report an issue: GitHub.