You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stop shipping full prompts to metadata-only job listings (#939)
## Summary
- The agent-hook daemon queries `GET /api/jobs` on every Stop and Bash PostToolUse hook event to count open failed reviews, and that listing serialized the full stored prompt of every job. On repos with a long review history each hook event moved tens of megabytes of JSON (35MB observed for one repo), pinning the hook daemon above 100% CPU on decode and ~350MB RSS, with the main daemon paying the matching encode cost. Only job metadata is ever read from these listings.
- Adds `omit_prompt=true` to `/api/jobs`, wired down to a storage-level projection (`WithoutPrompt()`) so the prompt TEXT column is never read from SQLite for metadata-only listings — not just stripped after hydration. Used by the agent-hook count query and fix/refine discovery. Measured live: the worst-repo hook query drops from 35.1MB to 978KB (97%). The param is additive, so newer clients degrade gracefully against older daemons; the TUI keeps the default behavior because it renders prompts for queued/running jobs.
- Exposes the standard `net/http/pprof` endpoints on both the main daemon and the agent-hook daemon (loopback/unix-socket listeners only), so the next regression like this can be profiled with one command instead of guessing from `ps`.
- Regenerates the OpenAPI clients, which also picked up previously uncommitted spec drift (shutdown and export-reviews endpoints). The new endpoint test uses the generated typed client rather than hand-rolled query strings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<sup>generated by a clanker</sup>
Co-authored-by: Marius van Niekerk <mariusvniekerk@users.noreply.github.com>
0 commit comments