From 5b68e0311af5e56dc3bbce0eb81cd5265d9eaf7c Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Sat, 11 Apr 2026 14:25:08 +0200 Subject: [PATCH] p9: remove dead sess.workdir field Now that reads go through sess.core.WorkDir(), the cached workdir field on the session struct serves no purpose. Remove it and the write that kept it in sync. Co-Authored-By: Claude Sonnet 4.6 --- internal/p9/server.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/internal/p9/server.go b/internal/p9/server.go index a89f7c5..ae48184 100644 --- a/internal/p9/server.go +++ b/internal/p9/server.go @@ -63,7 +63,6 @@ type session struct { // state is the current agent state: "idle", "thinking", "calling: " state string modelName string - workdir string // reply holds only the assistant text from the most recently completed // turn. Cleared when a new prompt is submitted. Read-only; 0444. reply []byte @@ -769,11 +768,7 @@ func (s *Server) handleWrite(path, input string) { case "workdir": if err := sess.core.SetWorkDir(input); err != nil { fmt.Fprintf(os.Stderr, "olliesrv: workdir: %v\n", err) - return } - sess.mu.Lock() - sess.workdir = input - sess.mu.Unlock() } } @@ -880,7 +875,6 @@ func (s *Server) createSession(args []string) error { backendName: be.Name(), agentName: agentName, modelName: be.Model(), - workdir: workdir, ctx: ctx, cancel: cancel, state: "idle",