# CLI: \`create\` with content over ~4 KB crashes the main process with a JSON parse error

**URL:** <https://forum.obsidian.md/t/cli-create-with-content-over-4-kb-crashes-the-main-process-with-a-json-parse-error/117325>\
**Category:** Bug reports\
**Tags:** cli\
**Created:** [August 14, 2026, 12:21am UTC](https://forum.obsidian.md/t/cli-create-with-content-over-4-kb-crashes-the-main-process-with-a-json-parse-error/117325 "2026-08-14T00:21:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![torazaburo](https://forum.obsidian.md/user_avatar/forum.obsidian.md/torazaburo/32/36658_2.png) [@torazaburo](https://forum.obsidian.md/u/torazaburo)\
**Post date:** [August 14, 2026, 12:21am UTC](https://forum.obsidian.md/t/cli-create-with-content-over-4-kb-crashes-the-main-process-with-a-json-parse-error/117325/1 "2026-08-14T00:21:55Z")

</div>

### Steps to reproduce

With a vault open, run from a shell:  
obsidian vault=MyVault create “path=unfiled/big.md” “content=$(head -c 8000 /dev/zero | tr ‘\0’ x)”  
The same command with 4000 bytes succeeds. Content is pure ASCII, so this  
is not the multibyte argument-parser bug fixed in 1.12.2.

### Did you follow the troubleshooting guide? [Y/N]

Yes. Not plugin-related; the crash is in the main process handling CLI IPC, before any vault code runs.

### Expected result

The note is created and the CLI prints `Created: unfiled/big.md`.

### Actual result

The note is not created. The CLI hangs indefinitely with no output. Obsidian’s  
main process raises an uncaught exception and shows a modal error dialog, after  
which every subsequent CLI invocation reports “The CLI is unable to find Obsidian.”  
A JavaScript error occurred in the main process  
Uncaught Exception:  
SyntaxError: Unexpected token ‘]’, …“-8000.md”,“tty”:fa"… is not valid JSON  
at JSON.parse ()  
at Socket.n (…\obsidian-1.13.6.asar\main.js:64:136)  
at Socket.emit (node:events:519:28)  
at addChunk (node:internal/streams/readable:561:12)  
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)  
at Readable.push (node:internal/streams/readable:392:5)  
at Pipe.onStreamRead (node:internal/stream\_base\_commons:189:23)

### Environment

* * *

### Additional information

## Likely cause

The socket `data` handler appears to call `JSON.parse` on each chunk as it  
arrives, with no reassembly. A stream carries no message boundaries, so a  
payload spanning a chunk boundary is parsed as a truncated fragment. The  
quoted text is cut mid-value at `"tty":fa`, which is what a raw chunk split  
looks like rather than malformed input. The onset near 4 KB is consistent  
with a default pipe buffer.  
Three separable issues:

1. No message reassembly before `JSON.parse`.
2. The parse error is uncaught in the main process, so a bad read escalates  
to a modal dialog that wedges the app instead of returning an error.
3. The CLI has no timeout, so it waits forever for a reply that cannot arrive.  
Issue 2 is the most damaging in practice: a client gets no error, the write  
is silently lost, and the app needs manual intervention before any further  
CLI call works.
