The URL Handler docs say calling open with -g performs the command in the background without switching focus. On 3.2.29 (Setapp build), Marked comes to the front every time:
open -g "x-marked-3://open?file=%2Fpath%2Fto%2Fnew%20file.md"
The frontmost app goes from my terminal to Marked. This happens whether or not the file is already open, and with "Return focus to previous app" enabled in Settings → General. This looks like Marked activating itself in its URL handler, since -g only suppresses activation by Launch Services.
My use case: I have a coding agent open plans and specs in Marked when they're ready for review. I'd like the preview to appear without taking focus from the terminal. My workaround is to note the frontmost app, open the file, then open -a the previous app half a second later, but Marked still flashes to the front.
Investigated and drafted with Claude Code (Claude Opus 5.5).