OpenAI Codex: sandboxed CLI invocation can launch a second Obsidian process that crashes even when the main app is already running

Steps to reproduce

  1. Install the official Obsidian desktop app on macOS and enable the CLI.
  2. Open Obsidian normally and keep it running.
  3. From Codex on macOS, run obsidian version or obsidian help from a sandboxed shell.
  4. Observe the result.

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

N

I am using the latest official installer and collected debug info, but I have not yet reproduced this in the Sandbox Vault or with Restricted mode enabled.

Expected result

The CLI should attach to the already-running Obsidian app, or fail cleanly with a normal error. It should not launch a second Obsidian process, and it should not crash.

Actual result

When invoked from the sandboxed environment, the CLI behaves as if Obsidian is unavailable even though the main app is already running. It then appears to launch another Obsidian process. macOS shows an “Obsidian quit unexpectedly” dialog for that second process, while the original Obsidian window keeps running normally.

Environment

SYSTEM INFO:
	Obsidian version: 1.12.7
	Installer version: 1.12.7
	Operating system: Darwin Kernel Version 25.4.0: Thu Mar 19 19:33:09 PDT 2026; root:xnu-12377.101.15~1/RELEASE_ARM64_T8112 25.4.0
	Login status: logged in
	Language: en
	Catalyst license: none
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 3
	Plugins enabled: 3
		1: Latex Suite v1.11.0
		2: TikZJax v0.5.2
		3: Git v2.38.0


I think this is what’s going on:

  • Codex runs an Obsidian CLI command inside its sandbox.

  • In this environment, the sandbox cannot reliably reach the running app over the local CLI socket.

  • obsidian then behaves as if Obsidian is unavailable and tries to launch Obsidian again.

  • That second, Codex-spawned Obsidian process crashes on startup, so macOS shows “Obsidian quit unexpectedly”.

  • Your original Obsidian app keeps running, which is why the app “seems fine” despite the dialog.

Related: Running Obsidian CLI from Codex crashes Obsidian on macOS · Issue #13706 · openai/codex · GitHub

thank you. we will review this. This is a problem specific to codex. Doesn’t happen with Claude Code. I am not sure if it is specific to macos or if it happens on windows too.

If you started using Obsidian CLI during the beta period, we made some changes to how the CLI invocation works, so your setting may be wrong. Kindly, remove any mention of Obsidian in your ~/.zprofile. Then open Obsidian, go to Settings->General->Advanced and disable and re-enable the command line interface support.

1 Like

I just did this. So now ~/.zprofile does not add modify PATH anymore to the CLI. Rather, it seems that now Obsidian has installed
a soft link at/usr/local/bin/obsidian pointing to /Applications/Obsidian.app/Contents/MacOS/obsidian-cli.

Can you confirm this is the new way? Now it seems to work fine inside the Codex sandbox.

I think the docs should be updated, e.g., Obsidian CLI - Obsidian Help currently says this:

The CLI registration adds the Obsidian binary directory to your PATH via ~/.zprofile. If you are having trouble, check the following:

Your ~/.zprofile file should contain the following line. If it’s missing, you can add it manually:

export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS"

Yes, the docs will be updated shortly.

2 Likes