Job-Centric Terminal That Never Loses Context
Every terminal is tied to a job. PTY sessions with health monitoring detect agent inactivity and connection issues. Two-level attention system alerts when agents need guidance. 5MB persistent ring buffer.
Native PTY Sessions
Cross-platform PTY via portable_pty. Real shells (zsh, bash, PowerShell). 64KB buffer streaming.
Health Monitoring
5-second health checks. Detects inactive/dead processes. Auto-recovery with intelligent actions.
5MB Ring Buffer
SQLite persistence with automatic truncation. Sessions survive app restarts. Full audit trail.
Automatic Health Monitoring System
Health State Detection
Continuous monitoring every 5 seconds with intelligent state detection and recovery actions.
- •Healthy: Normal operation
- •NoOutput: Silent for >30s
- •Agent Requires Attention: 2+ minutes inactive
- •ProcessDead: Shell terminated
- •PersistenceLag: DB sync pending
Auto-Recovery Actions
Intelligent recovery based on health state. No manual intervention required.
- SendPrompt: Echo 'alive' probe
- Interrupt: Ctrl+C with restart
- Restart: Kill and recreate PTY
- Reattach: Recreate channels
- FlushPersistence: Force DB sync
Two-Level Agent Attention System
Inactivity Detection
Simple time-based detection when agents stop producing output.
User Notifications
Progressive alerting when agents need human guidance.
Professional Terminal Features
Voice Transcription
OpenAI Whisper integration for voice commands. Direct PTY input with staging area.
- Real-time audio processing
- Editable staging before execution
- Microphone device selection
- JWT authenticated API calls
Session Persistence
SQLite-backed sessions with 5MB ring buffer. Survives app restarts and crashes.
- Async persistence worker
- Prompt marker detection ($, #, >)
- Auto-truncation at 5MB
- Session recovery on startup
CLI Auto-Launch
Detects implementation plans and auto-launches configured CLI tools after shell init.
- 2-second shell initialization delay
- PATH augmentation for tools
- Custom command templates
- Project-specific configurations
xterm.js Frontend
VS Code's terminal renderer with WebGL acceleration and full Unicode support.
- 10K line scrollback buffer
- Unicode 11 & CJK support
- GPU rendering option
- Image paste to project folder
Technical Architecture
→ PTY pair creation (portable_pty)
→ Shell detection (zsh/bash/PowerShell)
→ Environment setup + PATH augmentation
→ Process spawn with login flags (-l -i)
→ Broadcast channels for output
→ Sync MPSC for persistence queue
→ 16ms batch processing in frontend
→ Direct Uint8Array handling
→ Process alive verification
→ Output timestamp tracking
→ Agent attention detection
→ Automatic recovery triggers
→ 5MB ring buffer (SUBSTR truncation)
→ Prompt marker priority flush
→ Session recovery on restart
→ Full audit trail capability
Platform & Performance
Cross-Platform Shells
Auto-detects system shell. Login shell with proper rc files. Environment variable inheritance.
Connection Recovery
Exponential backoff retry. Auto-reattach on disconnect. Historical output preservation.
Plan Integration
Copy implementation plans directly. 4KB chunk sending. Template placeholder support.
Performance
RequestIdleCallback batching. WebGL GPU acceleration. Lazy text decoding.
Multi-Session
DashMap concurrent access. Isolated output channels. Per-session health tracking.
Error Recovery
Network retry logic. Process restart capability. Graceful degradation.
What Makes This Different
✗Standard Terminals
- ✗No health monitoring
- ✗No agent attention tracking
- ✗Lost on app restart
- ✗No attention alerts
- ✗Separate from workflow
✓Vibe Manager Terminal
- ✓5-second health checks
- ✓Auto-recovery actions
- ✓5MB persistent buffer
- ✓Agent attention detection
- ✓Job-centric integration
Experience the Terminal That Never Loses Context
Health monitoring, session persistence, agent attention detection. This is how terminals should work - resilient, intelligent, job-centric.