Releases: heyhuynhgiabuu/pi-task
Release list
v0.3.0
Added
- Optional HerdR execution backend with geometry-aware, serialized pane spawning, durable resume steering, and parent-owned cleanup.
PI_TASK_BACKEND=auto|herdr|tmux|sdk.
Changed
- Task titles now include a gear prefix, for example
⚙ reviewer. - Task completion is persisted before terminal cleanup.
Fixed
- HerdR steering submits exactly one Enter.
- HerdR lifecycle cleanup no longer races parent completion polling.
- Internal dead-code and dependency checks are clean.
See CHANGELOG.md for details.
v0.2.6
Non-tmux SDK task widgets
- Update task widgets only when task state changes rather than repainting continuously.
- Keep SDK background task rows visible until their own SDK settlement.
- Preserve tool invocation details and display the most recent SDK tool call.
- Provide structured foreground SDK results with expand/collapse parity.
- Preserve tmux foreground tool-stat polling.
Verification
npm testnpm run build- TypeScript diagnostics
- Packed artifact inspected
npm publication is intentionally not included in this release.
v0.2.5
pi-task v0.2.5
Highlights
- One-tool orchestration:
taskguidance is stricter and clearer — prompt contract now explicitly requires goal, non-goals, write/read policy, stop condition, and verification recipe. - Cleaner task receipts: foreground textual progress and background launch receipts now both show the exact subagent JSONL path, without noisy tmux/session-name boilerplate.
- Cleaner widgets: foreground and background widgets both use a compact header + tree-detail layout, with collapsed
(+N more)tool-call summaries and aligned spacing. - Harness cleanup: removed stale harness references and dead foreground-progress data plumbing so the extension is cleaner around its single-tool design.
- Tests: widget regression coverage is now part of the main
npm testrun.
Upgrade
pi install @heyhuynhgiabuu/pi-task@0.2.5
# or link local: pi extensions link ~/dev/projects/pi-taskRequires peer @earendil-works/pi-coding-agent ^0.80.0.
pi-task v0.2.4
pi-task v0.2.4
Highlights
- Reliable background polling: prevents overlapping poll ticks from completing the same background task twice, and reads subagent JSONL from
sessions/<taskId>consistently. - Better failure diagnostics: when a tmux subagent exits without a result, the parent report now includes the expected session directory, JSONL presence, and pane tail when available.
- Safer subagent startup:
PI_TASK_CHILD_NO_EXTENSIONS=1runs child Pi sessions with--no-extensionsfor debugging extension-load crashes. - Cleaner task UI: shared task title renderer keeps running and completed task titles consistent; completion notifications use the theme
toolSuccessBgbackground. - Tests: polling concurrency regression, failure diagnostics coverage, and render hint expectations updated.
Upgrade
pi install @heyhuynhgiabuu/pi-task@0.2.4
# or link local: pi extensions link ~/dev/projects/pi-taskRequires peer @earendil-works/pi-coding-agent ^0.80.0.
v0.2.3 - task roster, delegation UI, workspace scope
0.2.3 — 2026-07-02
Highlights
- Task roster: bundled agents
explore,scout,general,reviewer(removed worker / planner / vision). YAMLhidden,proactive,readonly; dynamic task catalog + preflight. - Workspace scope in delegated prompts; parent hint to pass absolute repo paths when cwd ≠ target.
- Foreground: sticky header (
toolTitleagent,texttool count while running,successduration); description until live stats;readProgress(sessionDir); overlap caps. - Background + results: shared result body —
mutedtoolcalls •successduration on completed results; one collapsed⎿line; task-complete title aligned with sticky; dim)on expand hint. - Tests: prompt, frontmatter, renderHint; smoke peer
piversion check.
Upgrade
pi install @heyhuynhgiabuu/pi-task@0.2.3
# or link local: pi extensions link ~/dev/projects/pi-taskRequires peer @earendil-works/pi-coding-agent ^0.80.0.
v0.2.2 — structured task UI & background parity
@heyhuynhgiabuu/pi-task v0.2.2
Structured scout/task output in the TUI, foreground Ctrl+O, and background completion parity.
Highlights
- Ctrl+O on finished tasks shows Summary / Findings / Evidence / Files / Caveats / Next steps when the subagent returns XML (canonical
<result>or agent<episode>aliases). - Background tasks use the same renderer on
task-completenotifications; start receipt is a plain⎿ Started task…block (no<task>XML dump). - Episode alias parsing:
sources→ evidence,blockers→ caveats,checks→ next_steps,decisions→ findings. - Fix:
task-completeno longer crashes the TUI (Text.trimon rendered array).
Install
pi install npm:@heyhuynhgiabuu/pi-task@0.2.2Pair with updated .pi/agents/*.md <result> envelopes for best results.
Verify
npm run build && npm testv0.2.1
Added
background: truesupport for SDK backend. The Pi task tool now acceptsbackground: truewhen running inside the SDK (non-tmux backend). The subagent'sAgentSessionlives in the host's process; its subscriptions and extension context stay valid as long as the parent session is alive, which is what OpenPi's sidecar guarantees.stale-ctxfiltering.extension_errorevents that come from a Promise rejection whose message mentions "this extension ctx is stale" are now swallowed before the UI sees them. The host's session-replacement path was triggering a benign race during reload.- Task-session-history helpers. New
.pi/task-session-history.jsonis the source of truth for runtime task status. The renderer no longer readsTASKS.mdfor status or navigation. - Cancelled foreground navigation is normalized. A click on a pending task row no longer aborts the running child; the row stays unclickable until the task settles.
Fixed
reload_sessionno longer leaks extension timers. The sidecar now does a full session replacement (dispose + startSession) on reload, which atomically destroys the old runner and its timers.- Background tmux panes self-destruct on exit. Pane
remain-on-exitandsetPaneSelfDestructare set so dead tasks don't accumulate. - Restore reconciles registry with JSONL. On startup,
restoreActiveBackgroundTaskswalks the registry and the per-task JSONL, marking tasks done/failed and killing stale panes.
32 commits since v0.2.0. See CHANGELOG.md for the full release notes.
v0.2.0
v0.2.0
Demo
▶ 89s background-task walkthrough (MP4)
Spawning a background subagent in a tmux pane, watching live tool-call progress in the parent pane, reading the final result via the session JSONL.
Changed
- Modular refactor of
src/. The single-fileindex.tsis now a thin wiring layer; the implementation is split across focused modules:src/tool/—renderCall,renderResult,taskComplete,prompt,schema.src/lifecycle/—polling,completion,toolStats,widget,restore.src/subagent/—buildArgv,runSdk,tmux,waitCompletion.src/conversation.ts—findJsonlSessionByName, registry andtask-session-historyhelpers.src/constants.ts—BACKGROUND_CHECK_MS,COUNT_POLL_MS,TASK_TIMEOUT_MS,MAX_POLL_ERRORS.src/types.ts—BackgroundTask,RegistryEntry,TaskSessionHistoryEntry,TaskDetails.
- Session JSONL is now the single source of truth for task results.
RESULT.mdis no longer read for completion detection or result text — the final assistant message in~/.pi/agent/sessions/.../<id>.jsonlis the authoritative result. This removes mid-writeEACCESand "stale truncatedRESULT.md" failure modes entirely. - Completion detection is gated on
stopReason.hasAgentFinished()insrc/session-text.tsonly treats an assistant message as final when itsstopReasonisstop,endTurn,length,error, oraborted.toolUsemid-turn streaming text is correctly ignored. - Background polling is hardened.
checkInFlightguard prevents overlapping poll ticks.MAX_POLL_ERRORS = 3per-task counter absorbs transient filesystem errors. Try/catch aroundcheckTaskCompletion()keeps the interval alive on one-off failures. - Reordered completion check flow. Session JSONL is consulted before pane liveness, so
remain-on-exitpanes no longer block detection.
Added
renderCall/renderResult/ task-complete renderers with Ctrl+O expand/collapse (viakeyHint("app.tools.expand")) on thetasktool. Foreground results show stats + preview; expanded shows the full result text. The keybinding hint falls back toCtrl+Oif theapp.tools.expandkeybinding is not registered.- Foreground real-time tool-call progress. The foreground
executepath now polls the session file and emits_onUpdatecallbacks while waiting, so the parent pane shows a live${n} tool callscount alongside the spawned subagent pane.
Fixed
- Duplicate "scout - Description" / "scout — Description" header in foreground results:
renderResultno longer re-renders the header thatrenderCallalready rendered. - The
( to expand)empty-keybinding hint: now falls back to a plainCtrl+O to expandlabel whenkeyText("app.tools.expand")is empty.
Verified
npm run typecheckpassesnpm run buildpassesnpm run smokepassesnpm pack --dry-runsucceeds (115.5 kB tarball, 61 files)
v0.1.6
0.1.6
What changed
- Per-task data lives in flat files at the top of
.pi/artifacts/.
No per-task subdirs, no<task-id>paths. - The subagent's session is auto-saved by pi at
~/.pi/agent/sessions/<cwd>/<session-id>.jsonl. pi-task does not
maintain its own session storage. - Task widget rendering is now split into a dedicated module for easier
maintenance. - Foreground and background widgets now use consistent colors for
duration/tool-call stats. - Background completion results now use a padded themed main-pane block
and no longer duplicate completed-widget notifications. - Final foreground tool-call counts now match the live widget count.
Layout
.pi/artifacts/
├── TODO.md pikit canonical (untouched)
├── PLAN.md pikit canonical (untouched)
├── PROGRESS.md pikit canonical (untouched)
├── DECISIONS.md pikit canonical (untouched)
├── TASKS.md pi-task: all task data, ### blocks per task
└── task-sessions.json pi-task: conversation_id → { task_id, session_file }
No .pi/task-runs/. No .pi/artifacts/task-<id>/ subdirs. No
CONTEXT.md (the prompt is in the CLI arg). No SESSION.md. No
RESULT.md (the subagent's final assistant message IS the result;
pi-task reads it from the auto-saved session file).
How it works
- Parent launches
pi --name <task_id> "<prompt>"in a tmux pane
(interactive TUI) — orpi --mode jsonif tmux is unavailable - Subagent works, user watches (in tmux mode)
- Subagent's final assistant message IS the result. The prompt
tells the subagent to end with a clear summary. - Parent reads the last assistant message from the auto-saved
session file (tmux mode) or from the JSON event stream (SDK mode) - Parent embeds the result in
TASKS.mdas a#### Resultblock - Parent updates
task-sessions.jsonwith the session file path - For resume, parent uses
pi --session <session_file>to continue
v0.1.5
- Add durable subagent conversation_id to the task tool.
- Reuse existing .pi/artifacts/task-/ layout; new files: SESSION.md and metadata.json.
- Persist conversation_id -> task- mapping under .pi/artifacts/task-conversations.json.
- Add /task-sessions command to list durable conversations.
- Durable conversation resume requires the tmux/CLI backend.
- Refactor conversation helpers into src/conversation.ts.
- Add unit tests for conversation artifact naming/validation/session card.