summaryrefslogtreecommitdiff
path: root/Omni/Agent/Subagent/Coder.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-25 22:16:12 -0500
committerBen Sima <ben@bensima.com>2025-12-25 22:16:12 -0500
commit0821ee63521f18d7d98efab7e13d812149f0b33c (patch)
treee6fbbc997cedea501253b2b1e32c4ee2dbd1fe22 /Omni/Agent/Subagent/Coder.hs
parentabdace209323b65f6c5db1bf553ede1f60da00cc (diff)
Omni/Agent/Subagent/Coder: always run in /home/ava/omni
- Add omniRepoDir constant for the repo path - Use direnv exec with explicit path instead of "." - Update ava manifest workingDirectory to /home/ava This separates Ava's working directory from Coder's repo directory. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'Omni/Agent/Subagent/Coder.hs')
-rw-r--r--Omni/Agent/Subagent/Coder.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Omni/Agent/Subagent/Coder.hs b/Omni/Agent/Subagent/Coder.hs
index 63273f6..65abcc9 100644
--- a/Omni/Agent/Subagent/Coder.hs
+++ b/Omni/Agent/Subagent/Coder.hs
@@ -138,11 +138,16 @@ defaultCoderConfig namespace task =
coderMaxVerifyRetries = 2
}
+-- | The omni repo directory where Coder runs all commands
+omniRepoDir :: FilePath
+omniRepoDir = "/home/ava/omni"
+
-- | Run a bash command and capture output
-- Uses direnv exec to ensure the nix shell environment is loaded
+-- Always runs in the omni repo directory
runBashCapture :: Text -> IO (Exit.ExitCode, Text, Text)
runBashCapture cmd = do
- (code, out, err) <- Process.readProcessWithExitCode "direnv" ["exec", ".", "bash", "-c", Text.unpack cmd] ""
+ (code, out, err) <- Process.readProcessWithExitCode "direnv" ["exec", omniRepoDir, "bash", "-c", Text.unpack cmd] ""
pure (code, Text.pack out, Text.pack err)
-- | Phase 1: Initialize - check environment, detect broken state