CDX-201b · Module 3
Monitoring & Logging
3 min read
Cloud tasks produce structured logs that capture every step of execution: repository cloning, dependency installation, AGENTS.md loading, task execution, file modifications, command outputs, and final results. These logs are essential for debugging failed tasks, understanding why a task produced unexpected output, and auditing what the agent did when running autonomously.
The codex cloud logs command retrieves the full execution log for a completed task. For real-time monitoring, the web interface shows task progress as it happens — you can watch the agent's reasoning, file modifications, and command executions live. This is particularly useful during the initial adoption phase when you are calibrating task scope and AGENTS.md rules.
# View logs for a completed task
codex cloud logs <task-id>
# View logs with full command output
codex cloud logs --verbose <task-id>
# List recent cloud tasks with status
codex cloud status --history 10
# Export logs for analysis
codex cloud logs <task-id> --json > task-log.json
- Enable verbose logging For the first 10 cloud tasks, use --verbose to get full command output. This builds intuition for what the agent does during execution.
- Categorize failures Track failure reasons: timeout (task too broad), dependency error (lock file issue), network error (blocked endpoint), or quality issue (wrong approach). Each category has a different fix.
- Build a dashboard Export task logs as JSON and build a simple dashboard tracking success rate, average duration, and cost per task type. This data drives optimization decisions.