From a4108a484a1c5e83f926b84899fe228d59e5ea18 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 25 Dec 2025 23:13:04 -0500 Subject: Omni/Agent/Subagent/Coder: fix direnv exec path handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use `cd && direnv exec .` instead of `direnv exec ` since the latter doesn't work correctly with nix-direnv caching. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- Omni/Agent/Subagent/Coder.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Omni/Agent/Subagent/Coder.hs b/Omni/Agent/Subagent/Coder.hs index 65abcc9..8924c2c 100644 --- a/Omni/Agent/Subagent/Coder.hs +++ b/Omni/Agent/Subagent/Coder.hs @@ -147,7 +147,8 @@ omniRepoDir = "/home/ava/omni" -- Always runs in the omni repo directory runBashCapture :: Text -> IO (Exit.ExitCode, Text, Text) runBashCapture cmd = do - (code, out, err) <- Process.readProcessWithExitCode "direnv" ["exec", omniRepoDir, "bash", "-c", Text.unpack cmd] "" + let fullCmd = "cd " <> Text.pack omniRepoDir <> " && direnv exec . bash -c " <> quoteShell cmd + (code, out, err) <- Process.readProcessWithExitCode "bash" ["-c", Text.unpack fullCmd] "" pure (code, Text.pack out, Text.pack err) -- | Phase 1: Initialize - check environment, detect broken state -- cgit v1.2.3