Log Capture
Overview
Section titled “Overview”Log capture writes command output to a temporary file for analysis of large outputs.
Enable Log Capture
Section titled “Enable Log Capture”await_command({ command: "npm run build", maxDuration: 300, persistLogs: true})Result
Section titled “Result”{ "status": "success", "output": "...", "logPath": "/tmp/opencode-await-abc123/command.log"}Use Cases
Section titled “Use Cases”Large Build Outputs
Section titled “Large Build Outputs”await_command({ command: "cargo build --release 2>&1", maxDuration: 600, persistLogs: true})Test Failure Analysis
Section titled “Test Failure Analysis”await_command({ command: "pytest -v --tb=long", maxDuration: 300, persistLogs: true, errorPattern: "FAILED"})Combining with AI Summarization
Section titled “Combining with AI Summarization”await_command({ command: "npm run test:integration", maxDuration: 600, persistLogs: true, summarize: { enabled: true }})This gives you:
- Full log file for detailed analysis
- AI summary for quick understanding