Pi CLI exits with code 0 even when the Anthropic API returns errors
(e.g. insufficient credits). The error is only visible in the JSON
event stream as stopReason:"error" with an errorMessage field.
Now the executor parses message_end/turn_end events for errorMessage
and treats them as failures, preventing false "task completed" reports.
- SECTIONS now uses arrays of candidate names searched in priority order
- Maps Bug Intake sections: New Bugs→TODO, Under Review→IN_PROGRESS, Resolved→DONE
- Added findFirstSection helper for array-based section lookup
- Asana REST API client for task polling, section management, and commenting
- Pi CLI executor for running tasks with specialist agent teams
- Task loop: polls Asana To Do/Pi Worker sections, executes tasks, reports results
- Improvement loop: rotates through 8 improvement categories (code quality, security, docs, testing, etc)
- Health server on :8787
- File-based mutex locks with stale lock detection
- Docker + docker-compose deployment config
- deploy.sh for one-command deployment to cr-server-new via SSH/Incus
- Replaced direct Anthropic API with Pi CLI (uses platform auth, no API key needed)
- Model: claude-sonnet-4-6
- Streaming JSON mode with live progress updates in Telegram
- Per-user session files via Pi's --session/--continue
- Auto-recovery from corrupted sessions
- 5 min timeout, not-lazy system prompt