From 8aff88d0a1278b5517442b2f5256761f7a887ef1 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Mon, 3 Aug 2026 11:05:31 +0200 Subject: [PATCH] ollie-remote: use OLLIE_SESSION_ID for elevate broker identity ollie-remote was sending 'agent-' as the session identity to the elevate broker, which never matches any real session. Now reads OLLIE_SESSION_ID from inherited environment (set by the parent olliesrv process) so the broker can validate the session exists. --- cmd/ollie-remote/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/ollie-remote/main.go b/cmd/ollie-remote/main.go index 4a58575..7dd34b4 100644 --- a/cmd/ollie-remote/main.go +++ b/cmd/ollie-remote/main.go @@ -52,7 +52,13 @@ func main() { // Build the tool server with tool registry. toolReg, _ := toolsrv.NewRegistry() - agentID := fmt.Sprintf("agent-%d", os.Getpid()) + // The session's immutable ID is required for tool registry scoping and + // elevate broker identity. Set by the parent process (olliesrv or SSH bootstrap). + agentID := os.Getenv("OLLIE_SESSION_ID") + if agentID == "" { + fmt.Fprintln(os.Stderr, "OLLIE_SESSION_ID not set") + os.Exit(1) + } var opts []toolsrv.Option if *yolo {