Skip to content

Log Capture

Log capture writes command output to a temporary file for analysis of large outputs.

await_command({
command: "npm run build",
maxDuration: 300,
persistLogs: true
})
{
"status": "success",
"output": "...",
"logPath": "/tmp/opencode-await-abc123/command.log"
}
await_command({
command: "cargo build --release 2>&1",
maxDuration: 600,
persistLogs: true
})
await_command({
command: "pytest -v --tb=long",
maxDuration: 300,
persistLogs: true,
errorPattern: "FAILED"
})
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