From 0821ee63521f18d7d98efab7e13d812149f0b33c Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 25 Dec 2025 22:16:12 -0500 Subject: Omni/Agent/Subagent/Coder: always run in /home/ava/omni MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- Omni/Agent/Subagent/Coder.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Omni/Agent/Subagent/Coder.hs') 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 -- cgit v1.2.3