Skip to content

[BUG] OpenCode plugin defines tool args as plain objects instead of Zod schemas #1947

Closed as not planned
cuongvd23/claude-mem
#1

Description

@thedotmack

Severity: high
Component: plugin-lifecycle

Symptom: TypeError: undefined is not an object during resolveTools; crashes OpenCode whenever any prompt is submitted.

Root cause: src/integrations/opencode-plugin/index.ts defines claude_mem_search's args as plain object {query: {type: "string", ...}}. OpenCode's Zod validator reads schema._zod.def on each arg. npx claude-mem install --ide opencode generates this same broken shape.

Verification against v12.1.1 HEAD: VALID — src/integrations/opencode-plugin/index.ts:320-325 defines claude_mem_search.args as plain object {query: {type: "string"}}, not Zod schema — breaks OpenCode's schema._zod.def validator.


Consolidated during the April 2026 backlog cleanup. Original reports: Issue #1851, Issue #1845

Activity

  1. added
    bugConfirmed bug
    severity:highHigh: frequent failure, major feature broken
    consolidatedConsolidated from April 2026 backlog cleanup
    on Apr 15, 2026
  2. github-actions commented on Apr 15, 2026

    @github-actions
    Contributor

    The OpenCode plugin has a high-severity bug in its lifecycle component where tool arguments are defined as plain objects instead of Zod schemas, causing crashes when prompts are submitted. Specifically, the claude_mem_search tool incorrectly specifies its args as {query: {type: "string"}}, which is incompatible with OpenCode's Zod-based validation (schema._zod.def). Attempts to install the plugin via npx claude-mem install --ide opencode reproduce the issue. Verified against v12.1.1, this improper definition in src/integrations/opencode-plugin/index.ts persists and disrupts functionality. The bug was consolidated from prior issues (#1851 and #1845) during a backlog cleanup in April 2026.

  3. thedotmack commented on Apr 15, 2026

    @thedotmack
    OwnerAuthor

    Closed during the April 2026 backlog cleanup — mass backlog consolidation. If this is still an actionable bug you're seeing on v12.1.1 or later, please open a fresh ticket with a clean repro.

  4. thedotmack commented on Apr 15, 2026

    @thedotmack
    OwnerAuthor

    Reopened — was accidentally closed during backlog cleanup script bug. This is a valid consolidated issue, not a duplicate.

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

    bugConfirmed bugcomponent:plugin-lifecyclePlugin lifecycle (OpenCode / OpenClaw)consolidatedConsolidated from April 2026 backlog cleanupseverity:highHigh: frequent failure, major feature broken

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions