9p: revert ctl to async (fire-and-forget)

This commit is contained in:
Levi Neely 2026-04-13 13:42:06 +02:00
parent 69e5bd18d9
commit e5a20ecf8a
1 changed files with 2 additions and 9 deletions

View File

@ -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() {