## 1. Add PTY exit notifications - [ ] 1.1 Extend booterm WS protocol to send `` payload (exit code, last output, runtime) - [ ] 1.2 Wire into apps/coder so AI receives exit notification - [ ] 1.3 Add frontend display of exit status ## 2. Add session metadata for PTY panes - [ ] 2.1 Add title, description, parentAgent, taskId fields to PTY session - [ ] 2.2 Store metadata in session store - [ ] 2.3 Display metadata in terminal pane header - [ ] 2.4 Allow AI agents to query metadata ## 3. Add pattern-based log search - [ ] 3.1 Add pty_read with regex pattern filtering - [ ] 3.2 Add offset/limit pagination ## 4. Add per-session timeouts - [ ] 4.1 Add timeoutSeconds parameter - [ ] 4.2 Implement auto-kill on timeout - [ ] 4.3 Send timeout exit notification ## 5. Add sandbox circuit breaker - [ ] 5.1 Implement consecutive failure tracking (threshold: 2) - [ ] 5.2 On threshold: abort thread, post notification - [ ] 5.3 Add SandboxCircuitBreakerMiddleware ## 6. Add sandbox lifecycle management - [ ] 6.1 Implement 4-case lifecycle: cached→reconnect, creating→reset, missing→create, metadata→reconnect ## 7. Add X-Agent-Flags header support - [ ] 7.1 Parse X-Agent-Flags header in sidecar proxy - [ ] 7.2 Apply per-request flag overrides - [ ] 7.3 Add agent-specific flag config in AGENTS.md ## 8. UI: Terminal enhancements - [ ] 8.1 Show exit code and runtime in terminal footer - [ ] 8.2 Show agent attribution - [ ] 8.3 Add log search UI with regex - [ ] 8.4 Add timeout countdown indicator - [ ] 8.5 Add circuit breaker indicator