summaryrefslogtreecommitdiff
path: root/Omni/Agent
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-25 23:13:04 -0500
committerBen Sima <ben@bensima.com>2025-12-25 23:13:04 -0500
commita4108a484a1c5e83f926b84899fe228d59e5ea18 (patch)
treec38bb0756d5dec0a7b89005354d1b78e5eebfb47 /Omni/Agent
parent0821ee63521f18d7d98efab7e13d812149f0b33c (diff)
Omni/Agent/Subagent/Coder: fix direnv exec path handling
Use `cd <path> && direnv exec .` instead of `direnv exec <path>` 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 <noreply@anthropic.com>
Diffstat (limited to 'Omni/Agent')
-rw-r--r--Omni/Agent/Subagent/Coder.hs3
1 files changed, 2 insertions, 1 deletions
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