From 41818ecb595af6a871230ac8ca9779045c5459df Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 11 Aug 2026 17:59:55 +0200 Subject: [PATCH] Start the agent in ~/Work when launched from home Coding agents refuse to persist trust for $HOME, so the keybinding and menu launches -- which inherit the session's ~ cwd -- re-asked on every single session. ~/Work is already the work root Omarchy creates, and trust there sticks. Only applies when the cwd is exactly $HOME, so the inline alias still starts in whatever project directory it was run from. Co-Authored-By: Claude Opus 5 (1M context) --- bin/omarchy-launch-agent | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/omarchy-launch-agent b/bin/omarchy-launch-agent index b86a7bc0..91011877 100755 --- a/bin/omarchy-launch-agent +++ b/bin/omarchy-launch-agent @@ -11,6 +11,10 @@ else inline=false fi +# Agents refuse to remember trust for $HOME, so launches from the keybinding or +# menu start in the work directory instead of re-asking on every session. +[[ $PWD == "$HOME" && -d $HOME/Work ]] && cd "$HOME/Work" + agent=$(omarchy-default-agent) if omarchy-cmd-missing "$agent"; then