read_process_output
Read output from running processes with intelligent completion detection. Automatically identifies when processes are ready for input or have finished execution, preventing timeouts on interactive prompts.
Instructions
Read output from a running process with intelligent completion detection.
Automatically detects when process is ready for more input instead of timing out.
SMART FEATURES:
- Early exit when REPL shows prompt (>>>, >, etc.)
- Detects process completion vs still running
- Prevents hanging on interactive prompts
- Clear status messages about process state
REPL USAGE:
- Stops immediately when REPL prompt detected
- Shows clear status: waiting for input vs finished
- Shorter timeouts needed due to smart detection
- Works with Python, Node.js, R, Julia, etc.
DETECTION STATES:
Process waiting for input (ready for interact_with_process)
Process finished execution
Timeout reached (may still be running)
PERFORMANCE DEBUGGING (verbose_timing parameter):
Set verbose_timing: true to get detailed timing information including:
- Exit reason (early_exit_quick_pattern, early_exit_periodic_check, process_finished, timeout)
- Total duration and time to first output
- Complete timeline of all output events with timestamps
- Which detection mechanism triggered early exit
Use this to identify when timeouts could be reduced or detection patterns improved.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | ||
| timeout_ms | No | ||
| verbose_timing | No |
Input Schema (JSON Schema)
{
"properties": {
"pid": {
"type": "number"
},
"timeout_ms": {
"type": "number"
},
"verbose_timing": {
"type": "boolean"
}
},
"required": [
"pid"
],
"type": "object"
}