You are a coding agent working in the omni monorepo (live worktree). Wait for instructions.
You are a coding agent working in the omni monorepo (live worktree). Wait for instructions.
Please pick up task t-759.1. Start by running: task show t-759 --json to read the epic context, then task show t-759.1 --json for your specific subtask.
Summary: add a null-byte-delimited stdin prompt mode to Omni/Agent.hs. When invoked with no script argument, agent should read prompts from stdin delimited by \x00, run the loop for each prompt, and persist session state across prompts. EOF on stdin = clean exit. Shebang case (with argv script) stays completely unchanged.
Read the full task description for acceptance criteria. This is part of the epic (t-759) to unify the agent runner so that agentd can use Omni/Agent for both oneshot and persistent modes, enabling replay/debug for persistent agents.
After reading both tasks, respond with your understanding and implementation plan before writing any code.
Plan looks right. Proceed with implementation of t-759.1: add the two-mode split to Omni/Agent.hs (script-arg = oneshot, no-arg = stdin prompt loop with null-delimited prompts). Preserve session state across prompts in stdin mode. Run tests when done and report back via the inbox.
Review approved on t-759.1. Please:
Commit the t-759.1 changes with a clear message referencing the task (include ‘Task-Id: t-759.1’ trailer). Include the Omni/Agent.hs refactor, the Op program change in Omni/Agent/Programs/Agent.hs, and the new regression test. Run task update t-759.1 --status Review after committing.
Then pick up t-759.2 (signal handling). Read task show t-759.2 for the full spec. Summary: add SIGINT → cancel current iteration via existing SteeringCancel path in Op.check; SIGTERM → finish current iteration then exit. Use System.Posix.Signals. Reuse existing SteeringCancel plumbing, don’t invent new cancellation machinery. In stdin-mode, after SIGINT the agent returns to reading the next null-delimited prompt (does not exit). Reply with your plan before touching code.
One small nit from the review worth addressing in either t-759.1’s commit or a follow-up: the EOF branch in runNullDelimitedPromptLoop runs an unterminated trailing prompt. Current behavior is lenient (effectively ‘delimiter is \0 or EOF’) which is probably what we want for shell ergonomics — just add a code comment noting this is intentional.
Plan acknowledged. Proceed with t-759.2 (SIGINT/SIGTERM handling) as described. Reuse the SteeringCancel path as planned. When done, commit with Task-Id: t-759.2 trailer, move to Review, then wait for ack before starting t-759.3.
t-759.2 has been reviewed and approved by Ava — marked Done. Thanks.
Next task: t-759.3 — swap agentd persistent-agent spawner from pi to agent (Omni/Agent.hs).
Read the full spec with: task show t-759.3 –json
Brief overview:
Workflow as before:
Status check: are you still working on t-759.3 (swap Agentd persistent-agent spawner from pi → agent)? Last update was ~24h ago. If you hit an auth/timeout/tool error, please report it. Otherwise, summarize current state and next planned action.
Status check: were you working on t-759.3 (Swap Agentd persistent-agent spawner from pi to Omni/Agent)? The previous instance appears to have wedged ~24h ago with no commits or comments after dispatch. Just restarted you cleanly.
Please:
Note: while you were stuck, someone landed agentd CLI cleanups on live (acf1cdd3, 36d4022f, efa934ac, 3f51028f, 3d315545) — flatten persistent CLI and remove run/steer aliases. Adjacent to your work but doesn’t do the pi->agent swap. Rebase if needed.
New task: t-764 (agentd updated_at timestamp) and t-765 (workflow system_prompts). Pick whichever is next in your queue. Both are well-scoped and independent. t-764 touches intent/Omni/Agentd/Daemon.hs; t-765 touches intent/Omni/Ide/Workflows/. Details in task descriptions.
What is your current status? What task are you working on? Report briefly.
Pick up task t-759.4: Remove pi persistent-agent code paths and steering file mechanism. Read the task description with ‘task show t-759.4’ for full details. Key points: remove pi RPC spawning from Omni/Agentd/Daemon.hs, remove pi JSONL parsing from agentd, remove AGENT_STEERING_FILE polling from Omni/Agent.hs, update any docs/skills referencing steering file or ‘pi –mode rpc’. Keep pi itself — only remove agentd’s use of it as a persistent-agent runner. Acceptance: rg ‘mode rpc’ and rg ‘steering.file’ should return no results, all tests pass.
Cherry-pick commit bf7596d4 into your current branch. This is the iAUC metrics commit from intent-coder (t-766). Just: git cherry-pick bf7596d4
Start task t-750: Remove legacy in-process agent code from Omni.Agentd.Daemon. The current daemon API path is fully systemd-backed, but Daemon.hs still contains legacy Process.createProcess + RunningAgent codepaths. Delete dead code, simplify DaemonState, and drop the -Wno-unused-top-binds warning suppression. Use ‘task start t-750’ to begin.
After t-750, start task t-665: Fix zombie ‘running’ status when container exits before terminal event. The status/list-runs commands should reconcile with container state or emit synthetic failure when startup aborts without a terminal JSON event. Stale runs stay ‘running’ with 0 cost forever. Use ‘task start t-665’ to begin.
After t-665, start task t-748: Fix the restart hang where agentd service stays in stop-sigterm for ~2m during systemd-driven restarts. The daemon logs ExitSuccess but systemd keeps the unit in deactivating/stop-sigterm until timeout, then SIGKILLs. Investigate wrapper/child process behavior on SIGTERM. Use ‘task start t-748’ to begin.
After t-748, start task t-695: Fix pi.log writing — handle closed immediately after creation. The comment says a path-based append-per-line fix was done but the task is still Open. Check if the fix is actually in the current codebase. If it is, verify and close it out. If not, implement the path-based append-per-line approach instead of a persistent handle. Use ‘task start t-695’ to begin.
After t-695, start task t-761: Port pi’s system prompt to Omni/Agent coding agents. Consolidate the various coding skills and prompts scattered around the repo (dev-system.md, coder.md, overseer.md, pi system prompts, skill files) into a canonical version. One source of truth for what a coding agent’s system prompt and skills should be. Check pi-agent-core source for pi’s system prompt, adapt it for our toolset (bild, task CLI, Omni code layout, Haskell/Python/Nix mix, Task-Id commit trailers, Review lifecycle). Wire it into the agent binary as the default coding agent prompt. Use ‘task start t-761’ to begin.
After t-761, start task t-760: Design compaction strategy for Omni/Agent coding agent. Read pi-agent-core’s compaction implementation to understand their trigger (API error classification) and compaction prompt. Then write a design doc (markdown) in Omni/Agent/ covering: linear+compaction vs adaptive context, compaction trigger mechanism, what gets preserved vs summarized, how it interacts with Op free monad state threading (asMessages from t-759.1), and how it fits the Prompt/IR pipeline. Include a followup implementation task. Use ‘task start t-760’ to begin.
Work on task t-770: Health Dashboard: Sub-pages, Training Page, Full Activity Cache, All-Time Bests. Run ‘task show t-770’ for the full spec. Branch: ava. Working directory should be ~/omni/ava. Key points: (1) Split the monolithic /health page into sub-pages (overview, nutrition, training, labs). (2) Build a new Training sub-page with CTL/ATL/TSB chart, bike EF chart, run EF chart (compute speed/HR for runs since intervals.icu returns null EF for runs), and all-time bests. (3) Cache full intervals.icu API payloads to /var/health/training-cache.json with backfill from 2025-01-01. (4) Keep existing Exercise type and exercise-cache.json working for nutrition analysis. Read the full task description for detailed acceptance criteria and API field reference.
Code review for commit 28d635fc (health: split dashboard into sub-pages and add training analytics, formerly a625b629 on the ava branch — now merged to live).
I reviewed the diff and found the following issues to fix:
Bug (fix this first):
isBelowEasyHrThreshold. The pattern match uses (z2Upper : _) treating the first element of icu_hr_zones as the Z2 upper bound. But intervals.icu returns zone boundaries where index 0 is Z1 upper, index 1 is Z2 upper, etc. This means the ‘easy’ filter is too permissive — it’s filtering by the Z1 ceiling instead of the Z2 ceiling. Fix to use the second element: (_ : z2Upper : _).Minor issues (fix as you see fit):
2. _now is unused in trainingPage and labsPage. Either use it (e.g. for a staleness warning) or remove it.
3. No error handling on fetchBackfill. If one monthly batch fails, the failure is silent and data is partially cached with gaps that never retry. Consider logging a warning when a batch fails, or at minimum surfacing the gap somehow.
Please fix these in the live worktree (~/omni/live). Commit with message health: fix HR zone index in easy filter, clean up unused bindings and Task-Id trailer Task-Id: t-770. Then move t-770 to Review.
Sanity check: what tool are you using to run? Are you using ‘pi’ (the Pi CLI) or ‘agent’ (Omni/Agent stdin mode)? Just reply with a one-line answer.