From 7070e56346c39c1b629bae50ba2ac31c84f180c3 Mon Sep 17 00:00:00 2001 From: Ollie Agent Date: Sun, 9 Aug 2026 01:09:46 +0200 Subject: [PATCH] session: remove dead env map (was stored but never read back) --- session/session.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/session/session.go b/session/session.go index ba1d15d..5e3229d 100644 --- a/session/session.go +++ b/session/session.go @@ -61,10 +61,6 @@ type Session struct { log *olog.Logger sessionsDir string - // Environment - envMu sync.RWMutex - env map[string]string - // Mutable state protected by mu mu sync.RWMutex name string // friendly name @@ -175,7 +171,6 @@ func New(cfg Config) *Session { ID: cfg.SessionID, name: name, Remote: cfg.Remote, - env: make(map[string]string), agents: make([]*agent.Agent, 0, 1), log: log, sessionsDir: cfg.SessionsDir, @@ -255,9 +250,6 @@ func (s *Session) Close() { // SetEnv stores a session-scoped variable and propagates to all agents. func (s *Session) SetEnv(key, value string) { - s.envMu.Lock() - s.env[key] = value - s.envMu.Unlock() for _, ag := range s.agents { ag.SetEnv(key, value) } @@ -467,7 +459,6 @@ func NewEmpty(id string, ctx context.Context, cancel context.CancelFunc) *Sessio name: name, Ctx: ctx, Cancel: cancel, - env: make(map[string]string), agents: make([]*agent.Agent, 0), log: log, sessionsDir: pkgSessionsDir,