Skip to content

Releases: agenticoding/pi-agenticoding

v0.4.0

Choose a tag to compare

@ofriw ofriw released this 23 Jul 13:17

Breaking Changes

  • Ledger renamed to notebook — tools are now notebook_write, notebook_read, and notebook_index; /ledger is /notebook. Legacy ledger-entry session data still rehydrates so existing sessions keep their pages.
  • Handoff briefs no longer embed notebook bodies — referenced pages are fetched on demand via notebook_read. The brief carries only the task and primer; the notebook remains the long-term grounding store.
  • Handoff eligibility gate — handoff rejects empty briefs, sessions under ~30k tokens, or missing usage data so compaction cannot run without a real brief and a meaningful context load.
  • Human-set notebook topics are authoritative — the agent cannot override a topic the user set via /notebook or the topic UI.

Added

  • Readonly mode/readonly, Ctrl+Shift+R, and --readonly toggle a session-persisted read-only posture. Write/edit are blocked; bash is classified and limited (allowlist / temp-only writes), with OS sandboxing on macOS (sandbox-exec) and Linux (bwrap) when available. Spawned children inherit the posture (no write/edit; guarded bash). Status shows 🔒 with gentle nudges. Handoff is blocked unless the user runs /handoff or crosses an eligible human topic boundary; readonly resumes after compaction.
  • Notebook topicsnotebook_topic_set and /notebook <topic> set the active semantic frame (🧭 in the status bar). Topics clear after handoff so the next context assigns a fresh one. Topic-change boundary hints integrate with the watchdog.
  • Readonly frontmatter on skills and promptsreadonly: true defers enabling readonly when that skill or prompt is invoked.

Changed

  • Spawn tool inheritance — child agents inherit active registered parent tools executable in the child session, including MCP/extension tools, while still excluding spawn and handoff and keeping child-local notebook tools.
  • Topic- and readonly-aware watchdog — band-throttled primacy-zone nudges with copy that reflects the active topic and readonly state; warning widget at ≥70% context; malformed context percentages render as ctx --%.
  • Handoff lifecycle status — richer TUI status (requested / required / in progress), generation guards, and rejection of overlapping handoff attempts.
  • Notebook overlay and indicators — interactive /notebook overlay (renamed from /ledger) with subject-oriented page semantics; empty notebook count stays dim/discoverable rather than hidden without cue.

Fixed

  • TUI-safe diagnostics — removed stderr/console logging that corrupted pi's ANSI TUI rendering from the extension host process.
  • Headless UI guardsui.notify and readonly toggle no-op cleanly when no UI is attached instead of throwing.
  • Rehydration null-safety — notebook and readonly session resume no longer crash on missing or partial persisted state.

v0.3.0

Choose a tag to compare

@ofriw ofriw released this 24 May 05:42

[0.3.0] - 2026-05-23

Added

  • Interactive /ledger TUI overlay — replaced the static notification popup with a full interactive overlay. Use arrow keys to navigate entries, press Enter to preview a selected entry body (truncated at 500 chars with ...), and Escape to close. Empty state shows a discoverability hint.
  • Visual handoff indicator — when /handoff is invoked, a live 🤝 Handoff in progress badge appears in the TUI status bar. Clears automatically when compaction completes, or when the agent finishes a turn without calling the handoff tool.
  • Ledger tool TUI renderersledger_add calls now render inline with a styled preview (✓ Saved "entry-name": first line...) in the conversation. Shows the full entry body when expanded.
  • Write-lock reentrancy detection — nested calls to saveLedgerEntry now throw an explicit error instead of silently corrupting the serialization chain.

Changed

  • Frame-based spawn scheduler — replaced the microtask-per-event render model with a scheduler that batches expensive component work at ~30 FPS. High-frequency streaming events (50–100+/sec) accumulate state cheaply per-event; layout, cache invalidation, and TUI invalidates are deferred to the next frame tick. Eliminates UI jank during bursty LLM streaming in child sessions.
  • ESM module type — added "type": "module" to package.json for compatibility with strict ESM projects.

Fixed

  • Stray ANSI reset codes in spawn shelltruncateToWidth no longer injects escape sequences that break background color styling in collapsed spawn renderer borders and padding.

v0.2.0

Choose a tag to compare

@ofriw ofriw released this 21 May 10:44

v0.2.0 - 2026-05-21

Added

  • Microtask event batching — rapid child session events are coalesced into a single parent invalidate per microtask boundary, preventing UI jank during bursty tool execution.
  • Epoch-based invalidation — the spawn renderer uses epoch counters rather than pointer comparison to detect stale sessions, making ownership checks reliable across session resets.

v0.1.0

Choose a tag to compare

@ofriw ofriw released this 21 May 10:16

v0.1.0 - 2026-05-21

Initial release of pi-agenticoding — context management primitives for the pi coding agent: spawn, ledger, and handoff.

Added

Context Management System Prompt

  • Automatic system-prompt injection — the LLM receives a context management primer at session start.
  • Live ledger listing in system prompt — each session start injects the current ledger entries.

Spawn — Isolate Subtasks in Clean Child Contexts

  • spawn tool — delegate isolated work to an in-memory child agent with its own clean context.
  • Parallel execution — siblings run concurrently; the parent orchestrates and merges results.
  • Child tool inheritance — children receive ledger tools but never spawn or handoff tools.
  • Ledger-aware child prompts — child sessions know what ledger entries exist without pre-loading.
  • Child output truncation — results limited to 2000 lines / 50KB.
  • Explicit model-required error — fails immediately when no model is configured.
  • No grandchildren — prevents explosive branching.
  • Session lifecycle management — proper cleanup on completion, error, or parent session reset.
  • Signal-based cancellation — respects AbortSignal for mid-flight cancellation.

Ledger — Sparse Continuity Cache

  • ledger_add tool — save named, compact continuity entries.
  • ledger_get tool — retrieve full entry bodies by name.
  • ledger_list tool — list all entries with name and first-line preview.
  • Persistence across sessions — ledger entries survive context resets, handoffs, and restarts.
  • Epoch-based staleness — child ledger tools reject access when parent session was reset.

Handoff — Deliberate Context Compaction

  • handoff tool — deliberate compaction replacing noisy context with a clean restart.
  • /handoff command — user-facing shortcut for the same.
  • Rich compaction summary — inlines referenced ledger entries.
  • Clean slot handoff — full history preserved in session file.
  • Post-handoff auto-resume — momentum without manual re-prompt.
  • Enforcement tracking — prevents the /handoff command from being silently ignored.

Primacy-Zone Watchdog

  • Advisory context-usage reminders — injected before each LLM call at 30%/50%/70% thresholds.
  • Hidden from user — uses custom role with display: false.

TUI and Status Indicators

  • Context usage in status bar — live ctx 65% indicator, color-coded.
  • Ledger count indicator — 📒 N badge, hidden when empty.
  • /ledger command — shows entries in a TUI notification overlay.
  • Live spawn rendering — collapsible child agent sessions with real-time action summaries.
  • Render caching — cached by width/expanded/showImages.
  • Graceful degradation — recovers from errors without crashing the parent TUI.

Extension Wiring and Lifecycle

  • Single state object — shared across hooks, tools, and TUI renderer.
  • Session lifecycle hooks — before_agent_start, context, session_start, turn_end, agent_end, session_before_compact.
  • Comprehensive test suite — 50+ tests across all primitives.