Agent startup holds the manager's global lock

This commit is contained in:
Ian Gulliver
2026-10-16 12:56:53 -07:00
parent 3da0394116
commit be4b4dda0d
5 changed files with 125 additions and 20 deletions
+11
View File
@@ -28,6 +28,7 @@ type agentProcess interface {
lastLine() time.Time
exited() bool
drive(m *Manager, l *live)
discard()
}
func initialVendorSessionID(vendor api.AgentSessionVendor, id string) string {
@@ -121,6 +122,11 @@ func (p claudeProcess) pid() int { return p.s.Pid() }
func (p claudeProcess) lastLine() time.Time { return p.s.LastLine() }
func (p claudeProcess) exited() bool { return p.s.Exited() }
func (p claudeProcess) discard() {
for range p.s.Events() {
}
}
func (p claudeProcess) drive(m *Manager, l *live) {
ctx := context.Background()
for ev := range p.s.Events() {
@@ -208,6 +214,11 @@ func (p codexProcess) pid() int { return p.s.Pid() }
func (p codexProcess) lastLine() time.Time { return p.s.LastLine() }
func (p codexProcess) exited() bool { return p.s.Exited() }
func (p codexProcess) discard() {
for range p.s.Events() {
}
}
func (p codexProcess) drive(m *Manager, l *live) {
ctx := context.Background()
for ev := range p.s.Events() {