Skip to content

[BUG] Guard mode v3: claims/edges dropped during MCP serialization in buddy_observe #114

Description

@fiorastudio

Iceman performed Guard mode v3 reasoning tests and identified a critical data loss issue in the MCP transport layer.

The Findings

  1. MCP tool path (buddy_observe via MCP): When calling buddy_observe with claims/edges/cwd via MCP, the companion reacts and gains XP, but 0 claims are written to SQLite.
  2. Direct pipeline call (bypassing MCP): Calling runGuardPipeline() directly from Node.js with the exact same data works perfectly (verified: claims/edges written to SQLite).

Root Cause

The guard pipeline logic itself is solid. The failure occurs between the MCP transport and the pipeline. It appears the MCP serialization/deserialization layer drops or mishandles the claims and edges arrays before they reach the pipeline. Currently, the MCP server's try/catch silently swallows this failure by design.

Technical Context

  • Successful Direct Write Example:
    • claimsWritten: 2
    • edgesWritten: 1
    • session: 9354fd8065e61560-20260501
  • Affected Version: v1.0.6+

Suggested Fix/Next Step

Enable BUDDY_DEBUG=1 in the MCP server environment and inspect the catch block in src/server/index.ts to log the specific serialization or validation error.

Reported via OpenClaw Subagent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions