Steps to reproduce
Requires a large-ish vault (~4k md files in my case).
Create a base with a complex filtering query. Example:
has_viewing: file.backlinks.map(value.asFile()).filter(value.properties.media.contains(file.asLink()) || value.properties.long_media.contains(file.asLink())).length > 0
Open vault in claude code, ask claude to query the view that uses that filter. Claude will not see the output.
You can verify outside of claude code, when running the query it should take a few seconds to generate the output.
Did you follow the troubleshooting guide? [Y/N]
Yes
Expected result
Claude Code should see the output.
Actual result
Claude does not see the output.
Environment
SYSTEM INFO:
Obsidian version: 1.12.1
Installer version: 1.8.3
Operating system: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:30 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6020 24.6.0
Login status: logged in
Language: en
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 2
Restricted mode: off
Plugins installed: 22
Plugins enabled: 20
1: Natural Language Dates v0.6.2
2: Paste URL into selection v1.11.4
3: Note Refactor v1.8.2
4: Linter v1.30.0
5: Dataview v0.5.68
6: Calendar v1.5.10
7: Templater v2.16.2
8: Tracker v1.17.0
9: Image Layouts v0.15.5
10: Mononote v1.2.2
11: Bulk Rename v0.5.2
12: Style Settings v1.0.9
13: Maps v0.1.6
14: Edge TTS v3.4.3
15: Relative Line Numbers v3.0.0
16: Heatmap Bases View v1.0.6
17: TaskNotes v4.3.0
18: Heatmap Calendar v0.7.1
19: Local Images Plus v0.16.4
20: Property Annotations v0.1.0
RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
Additional information
Claude’s conclusion after a debug session:
- The backlink traversal formulas (file.backlinks.map(value.asFile()).filter(…)) take meaningfully longer to evaluate across hundreds/thousands of notes
- The Obsidian CLI process signals exit (code 0) before stdout is fully flushed
- Direct pipe capture closes when the process exits, losing the late-arriving JSON
- Redirecting to a file captures everything because the filesystem write completes before cat reads it
The bug is in the Obsidian CLI: it doesn’t properly flush/await stdout before the process exits. It’s not a formula filter evaluation bug — it’s a stdout race condition that formula queries are more likely to trigger because they take longer to compute.
Workaround: obsidian base:query … > /tmp/out.txt 2>&1; cat /tmp/out.txt