From e5a20ecf8a1dea97a5d8032348d7b81ce25214ff Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Mon, 13 Apr 2026 13:42:06 +0200 Subject: [PATCH] 9p: revert ctl to async (fire-and-forget) --- internal/p9/server.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/internal/p9/server.go b/internal/p9/server.go index 92d83bd..6a1f966 100644 --- a/internal/p9/server.go +++ b/internal/p9/server.go @@ -754,7 +754,7 @@ func (s *Server) isAsyncWrite(path string) bool { return false } switch pathBase(path) { - case "prompt", "enqueue": + case "prompt", "enqueue", "ctl": return true } return false @@ -891,17 +891,10 @@ func (s *Server) handleWrite(path, input string) error { switch input { case "stop": sess.core.Interrupt(agent.ErrInterrupted) - return nil default: - // Forward as slash command. Submit handles it synchronously - // for recognized commands; unrecognized ones fall through to - // start an agent turn, which we must not do from ctl. - if sess.core.IsRunning() { - return fmt.Errorf("agent is running") - } sess.core.Submit(sess.ctx, "/"+input, publish) - return nil } + return nil case "backend": if sess.core.IsRunning() {