tinyhumansai/openhuman · error

Missing 'file' parameter

Error message

Missing 'file' parameter

What it means

update_memory tool argument guard: the required 'file' argument (which memory markdown file to update) is missing or not a string. Fires before the workspace lock or any read-modify-write begins.

Source

Thrown at src/openhuman/tools/impl/filesystem/update_memory_md.rs:225

        PermissionLevel::Write
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        self.execute_with_context(args, ToolCallOptions::default(), None)
            .await
    }

    async fn execute_with_context(
        &self,
        args: serde_json::Value,
        _options: ToolCallOptions,
        context: Option<&ToolExecutionContext>,
    ) -> anyhow::Result<ToolResult> {
        let workspace_dir = self.workspace_dir_for_context(context);
        let file = args
            .get("file")
            .and_then(|v| v.as_str())
            .ok_or_else(|| anyhow::anyhow!("Missing 'file' parameter"))?;

        let action = args
            .get("action")
            .and_then(|v| v.as_str())
            .ok_or_else(|| anyhow::anyhow!("Missing 'action' parameter"))?;

        let content = args
            .get("content")
            .and_then(|v| v.as_str())
            .ok_or_else(|| anyhow::anyhow!("Missing 'content' parameter"))?;

        // Guard: only allow MEMORY.md and SKILL.md.
        if !ALLOWED_FILES.contains(&file) {
            return Ok(ToolResult::error(format!(
                "File '{file}' is not allowed. Permitted files: MEMORY.md, SKILL.md"
            )));
        }

View on GitHub (pinned to 7491200858)

Solutions

  1. Pass 'file' as a string naming the memory file (e.g. MEMORY.md)
  2. Check the tool schema for other required arguments
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/impl/filesystem/update_memory_md.rs:225 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/68cdf95c448ac465. Report an issue: GitHub.