Running Obsidian CLI from Codex crashes Obsidian on macOS
Description
Running any obsidian CLI command from Codex Desktop causes Obsidian to immediately crash on macOS.
For example, this alone is enough to trigger the crash:
obsidian --help
When the command is executed from Codex, Obsidian crashes instantly and macOS shows the standard crash dialog saying that "Obsidian quit unexpectedly" and asking whether it should be reopened.
Environment
- macOS 26.1 (25B78)
- MacBook Pro (M1 Pro)
- Obsidian 1.12.4
- Obsidian binary:
/Applications/Obsidian.app/Contents/MacOS/obsidian
Reproduction
From Codex Desktop, run:
obsidian --help
Result:
- Obsidian immediately crashes
- macOS shows the system crash dialog ("Obsidian quit unexpectedly")
Notes
In my Codex setup I have a custom skill that executes CLI commands.
When the obsidian command crashes, the skill detects that the CLI execution failed and falls back to using a system query command instead. This fallback behavior is part of my custom skill logic and not something built into Codex itself.
The key issue is that launching the Obsidian CLI binary from Codex causes Obsidian to crash immediately.
The same obsidian binary works normally when executed from a regular terminal or from another agent environment on the same machine.
The crash only occurs when the command is launched from Codex.
From the macOS crash report:
- Parent Process:
codex - Responsible Process:
Codex - Exception:
EXC_CRASH (SIGABRT)
Happy to provide the full crash report if helpful.
6 Comments
@jinchenma94 check this, https://x.com/ziwen_uu/status/2029213673370353835
I can confirm that this happens periodically.
There's a chance that it's related to the file that's being edited by Codex is currently opened in Obsidian UI. Will try to test more to understand the exact reproduction steps.
I am getting this same issue and can confirm the diagnosis and solution from that tweet are accurate. Switching the Codex chat from "Default permissions" to "Full access" (via the dropdown below the chat input) results in the obsidian cli invocations now working. Targeted authorization of obsidian commands by a rules file (also mentioned in the tweet) is working as well.
For example from my test, in .codex/rules/default.rules:
For rules reference see https://developers.openai.com/codex/rules#create-a-rules-file .
I'm assuming the proper behaviour would be Codex prompting the user about a need for escalated permissions for the obsidian command.
I'm guessing the reported behaviour (Obisidian crash) may be related to the fact that - per their docs - the Obsidian cli requires the app to be running. The cli appears to be a thin client to the GUI app rather than a standalone terminal app. So likely Codex is running the cli, which spawns the gui app (you can see it do this yourself if you invoke the cli from a terminal without the gui app open yet), then sandbox restrictions kick in which causes the gui app to be aborted which likely explains the Obsidian crash dialog popup.
I think this is what's going on:
@3f6a, thanks for the analysis. That sounds quite plausible. If that's the case, then this is something that we probably cannot fix in Codex. We've seen other tools that behave poorly when run inside of a sandbox, and in many cases the maintainers of those tools have been willing to make improvements. I recommend reporting this to the maintainers of Obsidian to see if they can make it work better when it encounters the limitations of a sandbox.
https://forum.obsidian.md/t/macos-obsidian-cli-launched-from-codex-agent-crashes-a-short-lived-obsidian-process-while-terminal-works-normally/112402/2
Hope Obsidian devs pay attention.