Create and manage persistent interactive PTY sessions for long-running processes. Enables background execution, session persistence, and reconnection capabilities for continuous operations.

**!! CRITICAL WARNING: PERSISTENT BACKGROUND SESSIONS !!**

Key capabilities:
- Persistent session creation
- Background process management
- Session reconnection
- Multi-session support
- State preservation

Usage scenarios:
- Long-running services (web servers, databases)
- Interactive SSH sessions
- REPL environments (Node.js, Python, etc.)
- Continuous monitoring (log tailing, system monitoring)
- Interactive development environments

Parameters:
- command (required): Initial command to run in session
- sessionName (optional): Unique identifier for session
- cols/rows (optional): Terminal dimensions
- persistent (optional): Keep session running after command completes (default: true)
- truncateMode (optional): head or tail for output truncation (default: tail)

**!! INPUT INTERACTION !!**

Send input to session using pty_manage tool:
```
pty_manage { "action": "write", "sessionId": "<sessionId>", "data": "your input\n" }
```

Interactive workflow:
1. Create session: pty_session { "command": "ssh user@host" }
2. Send input: pty_manage { "action": "write", "sessionId": "...", "data": "password\n" }
3. Send commands: pty_manage { "action": "write", "sessionId": "...", "data": "ls -la\n" }
4. Check output: pty_manage { "action": "get", "sessionId": "..." }
5. Close session: pty_manage { "action": "close", "sessionId": "..." }

**!! ABSOLUTELY CRITICAL RESOURCE MANAGEMENT !!**

**WARNING**: Sessions run PERSISTENTLY in background until EXPLICITLY terminated!

**MANDATORY CLEANUP PROCEDURES**:
1. **MUST use pty_manage** tool for ALL session cleanup operations
2. **UNUSED sessions CONTINUE consuming system resources indefinitely**
3. **Sessions do not automatically terminate** - they run indefinitely until explicitly closed
4. **REGULAR monitoring required**: pty_manage { "action": "list" }
5. **IMMEDIATE termination**: pty_manage { "action": "close", "sessionId": "id" }
6. **FAILURE to clean up WILL lead to SYSTEM RESOURCE EXHAUSTION**
7. **SECURITY RISK**: Uncleaned sessions provide persistent system access

**RESOURCE CONSUMPTION IMPACT**:
- CPU cycles for active processes
- Memory allocation for session buffers
- File descriptors for terminal I/O
- Network connections (if applicable)
- System limits may be reached causing crashes

Security: Requires authorization for session creation and management.
