Skip to content

evaluate_expression: every ctx.vault call throws "Cannot read properties of undefined (reading 'length') #75

Description

@carkur

Ran into a small problem here that the agent suggested I submit here - tried to keep it concise. Thanks for this awesome plugin - it's really fantastic, and definitely my favorite out of the different copilot-style plugins I've used in different applications.

Plugin version: 3.6.1
Obsidian: desktop, 1.13.7
OS: Fedora KDE 44

Description
The evaluate_expression sandbox runs minimal expressions fine, but any call
touching the ctx.vault bridge throws Cannot read properties of undefined (reading 'length') before user code can even inspect the return value:

  • ctx.vault.read(path) - same error
  • ctx.vault.readBinary(path) - same error
  • ctx.vault.list("/") - same error
  • A probe wrapping everything in try/catch and only reading Object.keys(ctx.vault)
    • same error (so the throw originates inside the bridge, not in user code)

Occurs for any path, including root-level files; sync and await both fail.

Steps to reproduce

  1. evaluate_expression({ ok: true }) - succeeds.
  2. evaluate_expression with any ctx.vault.read(...) or ctx.vault.list(...)
    call - same TypeError as above.

Expected: read returns file content; list returns entries.
Actual: internal TypeError from the vault adapter.

Additional notes from VO agent

  • Worked in earlier sessions (batch file slicing on 2026-08-18/19); broken since
    2026-08-19 and still broken after an Obsidian restart.
  • No setting in the settings dump controls this (no sandbox/eval toggle exists).
  • evaluate_expression is not listed in the generated tools reference
    (docs/reference/tools.md - 82 tools, seven groups) - flagging in case the
    adapter was recently refactored.

Happy to provide more info if needed, though it's a bit hard for me to "see" as it's largely on the agent's side.

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