Skip to main content

start_process

The start_process tool is the primary way for Claude to run commands, launch programs, and start interactive sessions on your computer. It’s essential for data analysis, automation, and any task that requires executing code or commands.

What it does

Starts new terminal processes with smart detection features:
  • Launch terminal sessions (bash, zsh, PowerShell)
  • Start interactive environments (Python REPL, Node.js, R)
  • Execute single commands or long-running processes
  • Handle both quick tasks and persistent sessions
  • Automatically detect when processes are ready for input

How it works

Simply ask Claude to run commands or start programs:
Claude will use start_process to launch the appropriate program or command.

Key Features

Intelligent Detection

Automatically recognizes REPL prompts, process completion, and when programs are ready for input

Cross-Platform Support

Works seamlessly on Windows, macOS, and Linux with platform-specific optimizations

Interactive Sessions

Perfect for Python, Node.js, R, and other interactive programming environments

Process Management

Smart handling of both short-lived commands and long-running processes

Common Use Cases

Data Analysis Workflows

The most powerful use of start_process is for data analysis:
This enables Claude to:
  1. Launch Python with start_process("python3 -i")
  2. Import libraries like pandas, numpy, matplotlib
  3. Load and analyze your data interactively
  4. Create visualizations and generate insights
  5. Save results back to files

Development Tasks

System Administration

File Processing

Interactive vs Command Execution

Best for: Data analysis, development, exploratory tasksExamples:
  • python3 -i - Python REPL for data analysis
  • node -i - Node.js for JavaScript processing
  • R - R statistical computing environment
  • bash - Interactive shell for system tasks
Benefits:
  • Maintain state between commands
  • Build complex workflows step by step
  • Ideal for data exploration and analysis
  • Perfect for iterative development

Critical: Local File Analysis

For ANY work with local files (CSV analysis, JSON processing, data exploration), you MUST use start_process with interactive sessions. The analysis tool cannot access local files and will fail.

Correct Workflow for File Analysis

  1. Start interactive session: start_process("python3 -i")
  2. Import libraries: Use interact_with_process to load pandas, numpy, etc.
  3. Load local files: Read CSV/JSON files from your file system
  4. Analyze data: Perform calculations, create summaries, generate insights
  5. Save results: Write findings back to files

Why This Matters

  • Analysis tool: Browser-only, cannot read your local files
  • Process tools: Direct access to your file system and data
  • Always use processes: For any local file work, always start with start_process

Smart Process Detection

Desktop Commander includes intelligent detection features:

REPL Recognition

Automatically identifies when interactive environments are ready:
  • Python >>> prompt
  • Node.js > prompt
  • R > prompt
  • Shell $ or # prompts

Completion Detection

Knows when processes finish vs when they’re still running:
  • Short commands complete quickly
  • Long-running processes stay active
  • Interactive sessions wait for more input
  • Error conditions are properly handled

Early Exit Prevention

Prevents timeouts when processes are simply waiting for input:
  • No unnecessary waiting for prompts
  • Clean output without extra prompt characters
  • Clear status indicators for process state
  • Efficient handling of different response patterns

Platform-Specific Features

Default Shell: zshPackage Manager: Homebrew (brew)Python: Usually python3 commandSpecial Commands:
  • open - Open files/applications
  • GNU tools may have different names (e.g., gsed)
Notes:
  • System Integrity Protection may block some operations
  • Xcode Command Line Tools may be required for development

Security Considerations

Command Blocking

Desktop Commander blocks dangerous system commands by default:
  • File system formatting commands (mkfs, format)
  • User management commands (sudo, passwd, useradd)
  • System control commands (shutdown, reboot)
  • Network security commands (iptables, firewall)

Configurable Security

  • Review blocked commands with get_config
  • Customize security settings as needed
  • Add or remove command restrictions
  • Configure directory access limitations

Best Practices

  • Always review what Claude plans to execute
  • Start with restricted permissions and expand as needed
  • Use directory limitations for sensitive projects
  • Monitor process activity with list_sessions

Performance Tips

For data analysis or multi-step processes, start an interactive session once and reuse it rather than running separate commands.
Short commands need brief timeouts, while data processing or compilation may need longer timeouts.
Use list_sessions to see what processes are running and clean up unused sessions with force_terminate.

Troubleshooting

Process Won’t Start

  • Check that the command exists and is in your PATH
  • Verify you have permissions to execute the command
  • Ensure required software is installed (Python, Node.js, etc.)
  • Check for typos in command names

Session Appears Stuck

  • Process might be waiting for input (use interact_with_process)
  • Check if it’s a long-running operation that needs more time
  • Use read_process_output to see current status
  • Consider force_terminate if truly stuck

Permission Errors

  • Some commands require elevated privileges
  • Check directory permissions for file operations
  • Review security settings and blocked commands
  • Consider running with appropriate user permissions