From d8421f2c241148f833d13a49f32df7d4d39a0d2f Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Tue, 14 Apr 2026 17:39:31 +0200 Subject: [PATCH] =?UTF-8?q?rename=20OLLIE=5F9MOUNT=20=E2=86=92=20OLLIE;=20?= =?UTF-8?q?always=20inject=20OLLIE=20into=20execute=20env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $OLLIE is the ollie root (FUSE mount). Renaming makes it shorter and cleaner for use in sandboxed code. SetSessionID now resolves and injects OLLIE into the execute server env so it is always available regardless of whether the parent process has it set. Co-Authored-By: Claude Sonnet 4.6 --- internal/sandbox/config.go | 6 +++--- pkg/agent/core.go | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/internal/sandbox/config.go b/internal/sandbox/config.go index e7a1d44..f270f2d 100644 --- a/internal/sandbox/config.go +++ b/internal/sandbox/config.go @@ -86,7 +86,7 @@ func DefaultConfig() *Config { }, RWX: []string{ "{HOME}/.config/ollie", - "{OLLIE_9MOUNT}", + "{OLLIE}", "{HOME}/mnt/ollie", }, }, @@ -103,7 +103,7 @@ func DefaultConfig() *Config { "LANG", "TERM", "OLLIE_SESSION_ID", - "OLLIE_9MOUNT", + "OLLIE", "OLLIE_MEMORY_PATH", }, Advanced: AdvancedConfig{ @@ -350,7 +350,7 @@ func SystemDefaults() LayeredConfig { "LANG", "TERM", "OLLIE_SESSION_ID", - "OLLIE_9MOUNT", + "OLLIE", }, } } diff --git a/pkg/agent/core.go b/pkg/agent/core.go index 2be132c..a0d3d8f 100644 --- a/pkg/agent/core.go +++ b/pkg/agent/core.go @@ -359,6 +359,13 @@ func (s *agentCore) SetSessionID(newID string) error { if srv, ok := s.dispatcher.GetServer("execute"); ok { if es, ok := srv.(tools.EnvSetter); ok { es.SetEnv("OLLIE_SESSION_ID", newID) + // Ensure OLLIE is always set, resolving the default if unset. + ollie := os.Getenv("OLLIE") + if ollie == "" { + home, _ := os.UserHomeDir() + ollie = home + "/mnt/ollie" + } + es.SetEnv("OLLIE", ollie) } } } @@ -959,7 +966,7 @@ func (s *agentCore) handleCommand(ctx context.Context, input string, handler Eve if cmd == "/tools" { subdir = "t" } - mount := os.Getenv("OLLIE_9MOUNT") + mount := os.Getenv("OLLIE") if mount == "" { home, _ := os.UserHomeDir() mount = home + "/mnt/ollie"