Skip to content
CAI
Software that uses CAICheck a score

earendil-works/pi

47.4

Weak · 26 October 2026

199.8k

lines of production code

TypeScript

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a modular, durable coding agent platform that orchestrates AI-driven software development through a structured, extensible runtime. It provides a robust execution environment featuring sandboxed tool execution, persistent session management with automatic context compaction, and support for remote SSH-based operations. The architecture integrates a unified AI provider layer for chat, image, and classification models, while offering a comprehensive extension API for custom tools, UI components, and third-party integrations like MCP servers.

How it got here

2025 — monorepo restructuring and agent hardening

37 changes.

This period focused on restructuring the codebase into a modular monorepo with dedicated packages for AI, the coding agent, and the TUI, while removing legacy pod management features. Significant work was done to harden the agent's core loop, introduce a durable session runtime, and expand the TUI with advanced rendering and theming capabilities. The release also established stricter repository governance, automated pre-commit checks, and comprehensive test coverage for the new modular architecture.

2026 — Durable execution and extension ecosystem

63 changes.

This period focused on establishing the durable execution framework with the Chord runtime and SQLite-backed persistence, enabling agents to survive restarts and maintain state. It simultaneously expanded the platform's capabilities through a unified extension system, native TUI features, and comprehensive support for local models and MCP servers.

Features

Add GitLab Duo provider extension example

A new example extension for the coding agent has been added at \packages/coding-agent/examples/extensions/custom-provider-gitlab-duo\. This extension enables users to access GitLab Duo AI models (including Claude Opus/Sonnet/Haiku and GPT-5 variants) through GitLab's AI Gateway. It implements OAuth authentication using a bundled client ID and supports both direct access token caching and streaming responses. The package includes a test script (\test.ts\) to verify connectivity and model functionality.

packages/coding-agent/examples/extensions/custom-provider-gitlab-duo · high confidence

Add dynamic-resources extension example demonstrating resources\_discover hook

The dynamic-resources extension example now demonstrates the \resources\_discover\ hook, allowing the coding agent to dynamically load skills, prompt templates, and themes at runtime. The extension registers paths for \SKILL.md\, \dynamic.md\, and \dynamic.json\ (a theme definition with specific color variables and export settings), enabling users to see how external resources can be discovered and integrated into the agent's context.

packages/coding-agent/examples/extensions/dynamic-resources · high confidence

Add example extension demonstrating local npm dependency resolution

The with-deps example extension now includes a new tool, parse\_duration, which utilizes the external 'ms' library to convert human-readable duration strings into milliseconds. This addition serves to verify that the jiti module resolver correctly locates and loads modules from the extension's own node\_modules directory, ensuring that extensions can safely depend on their own local npm packages.

packages/coding-agent/examples/extensions/with-deps · high confidence

Add in-memory durable storage backend with document and scan support

This change introduces a new in-memory storage implementation for the durable package, providing an alternative to file-based backends for testing and development. The new \memory.ts\ module implements the \Storage\ interface, managing conversations, entries, tasks, submissions, and documents within application memory. It supports document versioning with delta batches, scoped document addressing (session, conversation, task), and paginated scanning with cursor-based pagination in both ascending and descending orders, as defined in the new \scan.ts\ utility.

packages/durable/src/storage · high confidence

Add subagent example extension with isolated context and workflow presets

The subagent example extension now provides a tool for delegating tasks to specialized subagents (scout, planner, reviewer, worker) that run in isolated \pi\ subprocesses. It supports single, parallel, and chained execution modes, with output streaming and usage tracking. The extension includes sample agent definitions and workflow presets (implement, scout-and-plan, implement-and-review) to demonstrate common multi-agent patterns.

packages/coding-agent/examples/extensions/subagent · high confidence

Added DOOM build script and WebAssembly module for the Doom Overlay extension

The Doom Overlay extension now includes a build script (\build.sh\) that compiles the DOOM game engine into a WebAssembly module using Emscripten. This script handles dependency checks for Emscripten, clones the \doomgeneric\ repository, and generates \doom.js\ and \doom.wasm\ files. The generated JavaScript module initializes the DOOM runtime in a Node.js environment, providing the core functionality for the overlay.

packages/coding-agent/examples/extensions/doom-overlay/doom · high confidence

Added session migration script and configuration schema generator

A new shell script, migrate-sessions.sh, is provided to fix a bug in v0.30.0 where session files were incorrectly saved to the root agent directory instead of their proper subdirectories; the script moves these files to the correct locations based on the current working directory. Additionally, a new TypeScript script, generate-schemas.ts, has been added to automatically generate JSON Schema files for models, settings, keybindings, and themes from the source code, ensuring the published schemas remain synchronized with the application's configuration structure.

packages/coding-agent/scripts · high confidence

Chord runtime foundation with cluster reloads, state cells, and payload deflation

This change introduces the core Chord runtime in \packages/chord/src\, establishing the foundational architecture for the application's distributed state and service model. It adds a new \Cell\ class for managing typed, schema-validated state with subscription and delta tracking, alongside a \Host\ abstraction that coordinates multi-host cluster reloads (prepare, vote, commit/abort) to ensure code version consistency. The runtime also implements end-to-end flow control on links, including the deflation of large frame payloads (exceeding 64 KiB) to optimize network usage, and provides a contract system for defining local and remote object lifetimes and placements.

packages/chord/src · high confidence

Durable agent harness introduces structured concurrency, nested tool calls, and code mode

The \@earendil-works/pi-durable\ package provides a durable agent harness that persists conversations, model turns, and tool calls to storage, allowing processes to resume interrupted work. This release introduces structured concurrency with task ownership, waiting, and bottom-up aborts, enabling nested tool calls where a tool can invoke another as a durable, owned sub-task. A new \codemode\ tool allows scripts to call conversation tools and survive restarts via deterministic replay. The harness also adds structured tool output, deferred tools with a \tool\_search\ extension, and configurable document retention to manage memory usage. Storage failures now fail the entire session, and several performance fixes optimize the scheduler and document appends.

packages/durable · high confidence

Durable code mode now persists and replays JavaScript scripts across restarts

The durable package introduces a new code mode tool that executes model-written JavaScript in a QuickJS sandbox with durability guarantees. Scripts now survive host restarts by using deterministic replay: the system journals tool call results and state, allowing the VM to resume exactly where it left off rather than losing in-memory state. This change adds specific document types (\pi.codemode.run\, \pi.codemode.journal\, \pi.codemode.store\) to manage start data, execution history, and persistent key-value storage for scripts. Users benefit from reliable, long-running code execution that does not fail due to infrastructure interruptions, along with detailed result listings that include the status of all nested tool calls made during the script's lifetime.

packages/durable/src/codemode · high confidence

HTML export now supports ANSI terminal colors and custom tool rendering

The HTML export feature now preserves terminal styling by converting ANSI escape codes (including 256-color and true-color palettes) into inline HTML styles, ensuring code blocks and tool outputs retain their original colors. Additionally, custom tool outputs are now rendered using the same TUI renderers as the main interface, converting their ANSI output to HTML for consistent display in the exported session.

packages/coding-agent/src/core/export-html · high confidence

Interactive mode restructured into modular components with new bug reporting and session sharing capabilities

The interactive coding agent mode has been reorganized into a modular architecture, splitting the previous monolithic implementation into distinct files for the main mode logic, TUI rendering, chat viewport layout, external editor handling, and model catalog management. This refactor introduces a new /bug command that allows users to generate and send diagnostic reports (including session transcripts or model-generated summaries) to developers, with options to upload directly or export as a local zip file. Additionally, session sharing has been enhanced to support uploading session artifacts to Radius for collaborative viewing, with a fallback to creating private GitHub gists if Radius is unavailable.

packages/coding-agent/src/modes/interactive · high confidence

Introduce Chord Delta for immutable JSON revision tracking and replication

The \packages/chord/src/delta\ module now provides a complete system for tracking changes to plain JSON structures as immutable revisions. It introduces a \Tracker\ API that manages a mutable draft overlay for safe, transactional edits, which are then materialized into exact operation batches (\Op\) via \prepare()\. These batches support efficient, immutable replay to replicas using \applyImmutable\ and \applyImmutableBatches\, ensuring structural sharing and preventing side effects. The module includes a robust diffing engine (\diff.ts\) that generates compact operations (such as string appends/truncates and array permutations) and a wire-format encoder/decoder (\WireOp\) for optimized network transmission. It also enforces strict JSON validity through \JsonRevisionValidator\ and protects against prototype pollution by rejecting unsafe path segments like \\_\proto\\_\. Also in this area: Improved memory efficiency and performance for streaming text and watch updates.

packages/chord/src/delta · high confidence

Introduce JSONL-based durable storage backend

Adds a new JSONL storage implementation for the durable execution system, providing file-based persistence for conversations, entries, submissions, tasks, and documents. The backend uses a main journal file for commit markers and separate sidecar files for large task and document payloads, supporting configurable fsync behavior and automatic reclamation of unused sidecars. A Node.js-specific helper is included to open storage using the local filesystem, and the implementation includes validation to detect and handle data corruption.

packages/durable/src/storage/jsonl · high confidence

Introduce Nix build for the coding agent

Added Nix build files (package.nix and model-catalog.json) that package the coding agent and its dependencies into a reproducible Nix derivation, including a wrapper script that ensures Node.js is available on the PATH for shell tools.

nix · high confidence

Introduce Pi coding-agent behavioral evals with vitest-evals harness

This change adds a new \packages/evals\ package that provides a structured framework for running behavioral evaluations on Pi's coding agent, built on top of \vitest-evals\. It introduces a dual-mode evaluation system: 'host' evals run directly on the local machine for smoke testing and documentation audits, while 'docs' evals perform comparative analysis by building isolated Docker containers with and without documentation to measure documentation lift. The package includes configuration files (\vitest.evals.config.ts\, \tsconfig.json\), a \.gitignore\ for evaluation artifacts, and a comprehensive \README.md\ detailing how to run these evaluations, define new test cases using \describeEval\, and interpret the resulting reports.

packages/evals · high confidence

Introduce built-in MCP server integration with CLI and OAuth support

Adds a complete Model Context Protocol (MCP) integration to the coding agent, enabling users to configure, manage, and authenticate with MCP servers directly. This includes a new \pi mcp\ CLI for adding, removing, listing, and signing in to servers, as well as a \/mcp\ manager for in-session control. The feature supports both local (stdio) and remote (HTTP) server transports, with automatic OAuth 2.0 sign-in flows (including PKCE and dynamic client registration) for remote servers. Servers can be configured globally or per-project via \mcp.json\, with project files able to override global settings. Tools are exposed to the model via three modes: 'direct' (declared immediately), 'deferred' (loaded on demand), or 'codemode' (restricted to scripts). Resources are accessible through standard \list\_mcp\_resources\ and \read\_mcp\_resource\ tools. The implementation includes lazy loading of the MCP runtime to minimize startup impact, robust connection management with retries, and secure credential storage in \mcp-auth.json\.

packages/coding-agent/src/extensions/mcp · high confidence

Introduce codemode tool for sandboxed JavaScript execution

The codemode tool allows the agent to execute JavaScript scripts within a sandboxed environment to orchestrate other tools. Scripts can call tools, access the model catalog for classification and image generation, and use state persistence via store/load. The tool includes a BM25-based search for discovering deferred tools, lazy loading of the sandbox runtime to improve startup performance, and a new renderer that displays nested tool calls, costs, and truncated output with expandable previews.

packages/coding-agent/src/extensions/codemode · high confidence

Introduce documentation lift evaluation harness and runner

Added a new evaluation framework in \packages/evals/src\ to measure the impact of documentation on the coding agent. This includes a CLI runner (\cli.ts\) that orchestrates Docker-based test execution, a harness (\harness.ts\) for interacting with the agent, and supporting modules for planning (\plan.ts\), Docker context management (\docker.ts\), and reporting (\report.ts\). The system compares agent performance across 'with\_docs' and 'without\_docs' variants, generating detailed comparison reports and artifacts.

packages/evals/src · high confidence

Introduce durable SQLite storage backend for Node and Cloudflare Durable Objects

Users can now persist durable state using SQLite, with dedicated adapters for both Node.js (via the built-in node:sqlite module) and Cloudflare Durable Objects. This new storage layer provides a consistent interface for managing conversations, entries, tasks, submissions, and documents, featuring transactional sessions, automatic schema migrations, and optimized replay capabilities.

packages/durable/src/storage/sqlite · high confidence

Introduce durable document, entry, and task definition APIs with Cloudflare Workers test harness

The durable package now exposes a structured API for defining typed documents (singletons and families scoped to sessions, conversations, or tasks) via \defineDoc\ and \defineDocFamily\, including versioning, migration, and checkpoint policies. It adds a set of predefined entry types (user, assistant, system, tool result, reset, compaction) for structured conversation history, and a \defineTask\ function for registering executable tasks. To support development and testing on Cloudflare Workers, the package includes a \test-workers\ directory containing a \TestSession\ Durable Object, a \vitest.config.ts\ for running tests in \workerd\, and conformance tests for the SQLite storage backend, including schema migration validation and alarm-based wake/recovery scenarios.

packages/durable/src · high confidence

Introduce isolated Docker environment for coding-agent documentation lift evals

This change adds a dedicated Docker build and entrypoint for the evals package to isolate the coding-agent documentation lift experiments. The new setup builds a runtime image that installs the coding-agent and evaluator dependencies, then provides two variants: one with documentation files intact and one with them removed, to measure the specific effect of the documentation on model performance. The entrypoint enforces strict security by dropping privileges to a non-root user for the model-facing sandbox while keeping evaluator source code and secrets readable only by root, ensuring that the model cannot inspect the evaluation logic or fixtures.

packages/evals/docker · high confidence

Introduce llama.cpp extension for local model management and inference

Adds a new extension that integrates with the llama.cpp router to manage local models. Users can now discover, download, and load models directly from Hugging Face, with UI support for progress tracking, quantization selection, and handling gated models. The extension exposes a provider that registers available chat and classifier models (including decision-only models) into the agent's model registry, allowing the coding agent to use locally hosted llama.cpp models for inference and classification tasks.

packages/coding-agent/src/extensions/llama · high confidence

Introduce model data validation and generation scripts

The \packages/ai/scripts\ directory now includes a suite of TypeScript scripts to manage and validate AI model metadata. \generate-models.ts\ fetches model catalogs from sources like models.dev and OpenRouter, handling provider-specific configurations (e.g., Cloudflare, Together AI) and generating structured model data. \model-data.ts\ provides the validation logic to ensure generated data integrity, including schema versioning and file hashing. Supporting scripts include \check-model-data.ts\ for CI/validation, \models-dev-reasoning-options.ts\ and \openrouter-reasoning-options.ts\ for mapping reasoning effort levels, and \generate-test-image.ts\ for creating test assets.

packages/ai/scripts · high confidence

Introduce pluggable, streaming core tools with robust platform handling

The coding agent now uses a new set of core tools (bash, edit, find, grep, ls, read, write, and PowerShell) that support pluggable operations for remote execution, streaming output with bounded memory, and improved platform compatibility. Bash and PowerShell commands stream output incrementally, handle timeouts, and manage detached process trees to prevent hangs. The edit tool supports multi-edit operations, fuzzy matching for whitespace and Unicode normalization, and preserves unchanged lines to avoid duplicate output. File operations are serialized via a mutation queue to prevent race conditions. Path resolution handles macOS-specific quirks like NFD filenames, curly quotes, and AM/PM spacing in screenshot names. Output is truncated and persisted to temp files when limits are exceeded, with clear notices to the user.

packages/coding-agent/src/core/tools · high confidence

Introduce remote execution environments over SSH

The \packages/env\ package now provides \RemoteExecutionEnv\, \RemoteTerminal\, and \RemoteWatcher\ classes that allow you to execute commands, run interactive programs in pseudo-terminals, and watch files on remote machines via SSH. This includes a hardened SSH bootstrap process with strict host-key verification, automatic daemon deployment, and robust connection management with timeouts and reconnection logic.

packages/env/src · high confidence

Introduce unified built-in provider registry and typed model accessors

The \packages/ai/src/providers\ area now exposes a centralized registry for all built-in AI providers. A new \all.ts\ entrypoint aggregates every provider (including Amazon Bedrock, Anthropic, Azure OpenAI Responses, Cloudflare AI Gateway, Google Vertex, and many others) and provides typed helper functions—such as \getBuiltinModel\, \getBuiltinImageModel\, and \getBuiltinClassifierModel\—to safely retrieve chat, image, and classifier models from the generated catalog. Each provider is now paired with an auto-generated \.models.ts\ file that flattens its specific model data (chat, image, classifier) from local JSON manifests, and the \builtinProviders()\ and \builtinModels()\ utilities allow consumers to instantiate or register all providers in a single call.

packages/ai/src/providers · high confidence

Introduce vendor-neutral telemetry contracts and typed schema utilities

The new \@earendil-works/pi-telemetry\ package provides a backend-agnostic telemetry system for the platform. It introduces a callback-based \TelemetryContext\ and \TelemetrySpan\ contract that allows applications to explicitly pass context and create nested spans without relying on global state or specific backends. The package includes a shared \NOOP\_TELEMETRY\_CONTEXT\ for optional telemetry, a deterministic \InMemoryTelemetryContext\ for local diagnostics and testing, and a runner-independent adapter conformance suite to validate custom backend integrations. Additionally, it offers typed, serializable schema definitions with inferred TypeScript types for spans, attributes, and events, ensuring compile-time safety for telemetry data.

packages/telemetry · high confidence

Introduces durable environment abstractions for file I/O, watching, and execution

This change adds the core environment interfaces and Node.js implementations for the durable package, enabling reliable file system operations, directory watching, and command execution. It defines a portable \FileSystem\ interface with non-throwing error handling, including bounded binary and text line readers that correctly handle streaming and byte-order marks, as well as a \FileWatcher\ that automatically selects between native and polling modes to handle platform-specific limitations like Windows directory locking. The implementation also includes a \NodeExecutionEnv\ for running shell commands with timeouts and spill-file support, providing a consistent, cross-platform foundation for durable agents.

packages/durable/src/env · high confidence

Introduces the Durable Harness for structured agent conversations

This change adds the \packages/durable/src/harness\ module, providing the core runtime for durable, structured agent conversations. It introduces a \Harness\ class that manages conversation lifecycles, including creation, forking, and aborting, while handling agent configuration, tool registration, and extension hooks. The harness implements automatic context compaction to manage token limits, a robust retry policy for model interactions, and a detailed event streaming system (\AgentEventStream\) for real-time updates on generation, tool execution, and compaction status. It also includes an inbox mechanism for queuing user inputs and managing steering/follow-up modes, ensuring that agent interactions are persistent and observable. Also in this area: Assistant messages now record the requested thinking level; Reduced memory usage and improved performance for streamed answers and tool calls; Durable harness switches to Chord's shared Watch implementation.

packages/durable/src/harness · high confidence

Local issue triage tool for daily review

A new local tool in scripts/issues automates the daily issue review process. It syncs repository issues to a local corpus, uses a pi-durable agent to search for duplicates, categorize issues, and suggest priorities (p0, p1, or none), and provides a web UI for maintainers to review and confirm these decisions. State is stored locally in SQLite and JSON, and the tool runs via a provided shell script.

scripts/issues · high confidence

Native clipboard and modifier-key support for Windows, macOS, and Linux

The TUI now includes native platform helpers for Windows, macOS (Darwin), and Linux that provide asynchronous text and image clipboard access and modifier-key state detection. This change introduces a shared C clipboard abstraction and platform-specific implementations (using AppKit on macOS, X11/libxcb on Linux, and Win32 APIs on Windows) along with build scripts and prebuild targets for each OS, replacing or supplementing previous command-line or terminal-based clipboard paths with direct native integration.

packages/tui/native · high confidence

New AI utility library for streaming, error handling, and retry logic

The \packages/ai/src/utils\ directory now contains a comprehensive set of utility modules to support the AI provider infrastructure. This includes \abort-signals.ts\ and \abort.ts\ for managing operation lifecycles and race conditions, \assistant-message-frame.ts\ for encoding and decoding streaming assistant message events, and \overflow.ts\ for detecting context window limits across various providers. Error handling is standardized via \error-body.ts\ and \diagnostics.ts\, while \provider-retry.ts\ and \retry.ts\ implement robust, abortable retry policies for transient network and provider errors. Additional utilities cover JSON parsing with repair (\json-parse.ts\), context token estimation (\estimate.ts\), HTTP proxy resolution (\node-http-proxy.ts\), and provider environment variable handling (\provider-env.ts\).

packages/ai/src/utils · high confidence

New DOOM overlay demo extension

Added a new example extension that runs the DOOM shareware game as a terminal overlay, demonstrating real-time rendering at 35 FPS using half-block characters and 24-bit color. The extension includes a WebAssembly wrapper for the doomgeneric engine, a component for rendering frames and handling input (WASD, arrows, fire, etc.), and logic to automatically download the shareware WAD file on first run if not found locally. Users can launch the demo via the \/doom-overlay\ command in TUI mode.

packages/coding-agent/examples/extensions/doom-overlay · high confidence

New OAuth authentication flows for Anthropic, GitHub Copilot, Kimi, Meta, OpenRouter, and xAI

The \packages/ai/src/auth/oauth\ directory now includes dedicated OAuth modules for Anthropic, GitHub Copilot, Kimi Code, Meta (Muse), OpenRouter, and xAI, alongside shared infrastructure for PKCE, device-code polling, and callback UI pages. Users can now authenticate with these providers directly through the CLI, with flows supporting both browser-based callbacks and device-code authorization for headless environments.

packages/ai/src/auth/oauth · high confidence

New Plan Mode extension for read-only code analysis

A new Plan Mode extension is available in the coding-agent examples, providing a read-only exploration mode for safe code analysis. When enabled via the \/plan\ command or the \Ctrl+Alt+P\ shortcut, it disables built-in write tools (edit, write) and restricts bash commands to a strict allowlist of read-only operations (e.g., cat, grep, git status), blocking destructive actions like rm or npm install. The extension also introduces explicit step tracking: it extracts numbered steps from 'Plan:' sections in agent responses, displays a progress widget during execution, and recognizes \\[DONE:n\]\ markers to update completion status, with state persistence across session resumes.

packages/coding-agent/examples/extensions/plan-mode · high confidence

New SDK and extension examples for the coding agent

Added example code demonstrating programmatic SDK usage via \createAgentSession()\, CLI integration through an RPC client (\rpc-client.ts\), and a custom TUI chat client (\rpc-extension-ui.ts\) that handles extension UI requests like select, confirm, input, and editor dialogs. The \extensions/\ directory now includes examples for lifecycle event handlers, custom tools, commands, custom UI components, Git integration, system prompt modifications, external integrations, and custom providers.

packages/coding-agent/examples · high confidence

New SDK usage examples for programmatic agent integration

Added a comprehensive set of TypeScript examples in the SDK directory demonstrating how to integrate the coding agent programmatically. The examples cover creating minimal sessions, selecting specific models and thinking levels, customizing system prompts and skills, configuring tool allowlists, registering extensions and custom tools, managing context files and prompt templates, handling API keys and OAuth, overriding settings, and managing session persistence and runtime switching.

packages/coding-agent/examples/sdk · high confidence

New TUI development and diagnostics extensions

Added four new extensions to the .pi/extensions directory to enhance the developer experience and provide runtime diagnostics. The \redraws\ extension introduces a \/tui\ command that displays the count of full TUI redraws, aiding in performance debugging. The \tps\ extension monitors agent lifecycle events to calculate and display tokens-per-second (TPS) along with input/output/cache token usage and total duration upon agent completion. The \prompt-url-widget\ extension enhances the UI by parsing GitHub PR, issue, and security advisory URLs from prompts to fetch and display rich metadata (titles, authors, severity) in a dedicated widget. Finally, the \import-repro\ extension allows users to import and switch to sessions shared via GitHub Gists, pi.dev share URLs, or GitHub issue comments, automatically handling path rewrites for cross-platform compatibility.

.pi/extensions · high confidence

New TUI framework with differential rendering, search, and theming

The \packages/tui/src\ directory has been replaced with a new TUI implementation that introduces several user-facing capabilities. Users can now search the transcript history using the new \AltScreenSearchIndex\ and fuzzy matching logic in \fuzzy.ts\. The interface supports customizable keybindings via \keybindings.ts\ and includes Emacs-style text editing features like a kill ring (\kill-ring.ts\) for yank and yank-pop operations. Visual presentation is enhanced by a new theming system in \colors.ts\ that supports OKLCH and OKHSL color spaces, and Markdown content can now render LaTeX math via \latex.ts\. The framework also provides a new \EditorComponent\ interface in \editor-component.ts\ that allows extensions to supply custom editor implementations.

packages/tui/src · high confidence

New coding tools: bash, powershell, edit, read, and write

The durable package now includes a set of tools for coding agents: bash and powershell for executing commands with structured output and truncation, edit for applying text replacements with diff details, read for accessing text and images (with optional image processing), and write for creating or overwriting files. These tools are registered via the coding-tools extension and support features like output windowing, file mutation queuing, and image handling.

packages/durable/src/tools · high confidence

New custom Anthropic provider example with OAuth and streaming support

An example extension has been added at packages/coding-agent/examples/extensions/custom-provider-anthropic that demonstrates how to register a custom provider for the Anthropic API. This example implements custom streaming logic, supports authentication via both API keys (environment variable) and OAuth (including PKCE flow and token refresh), and defines two model configurations, allowing users to see how to integrate custom AI providers into the coding agent.

packages/coding-agent/examples/extensions/custom-provider-anthropic · high confidence

New developer tooling and release scripts for the pi coding agent

This change introduces a suite of new scripts in the \scripts/\ directory to support the pi coding agent's development workflow and release process. It adds \auto-pi.sh\ as a developer wrapper to run the latest local build, \build-binaries.sh\ to compile standalone binaries for all supported platforms (including Windows ARM64), and \build-coding-agent-bundle.mjs\ to bundle the agent's Node runtime. It also includes several quality and security checks: \check-browser-smoke.mjs\ and \check-entry-graphs.mjs\ to verify browser-safe exports and bundle size budgets, \check-lockfile-commit.mjs\ and \check-pinned-deps.mjs\ to enforce dependency pinning and review lockfile changes, and \check-runtime-deps.mjs\ to ensure all runtime imports are declared. Finally, \coding-agent-consumer.mjs\ provides smoke tests to validate the published package's consumer experience.

scripts · high confidence

New extension examples and documentation for the pi-coding-agent

This change introduces a comprehensive suite of example extensions and a detailed README for the pi-coding-agent, demonstrating how to extend the agent's capabilities. The examples cover lifecycle management (e.g., \permission-gate\, \project-trust\), custom tool creation (\hello\, \question\, \dynamic-tools\), UI customization (\custom-footer\, \custom-header\, \border-status-editor\), and system integration (\bash-spawn-hook\, \mac-system-theme\). The README provides usage instructions and categorizes the examples by functionality, serving as a practical guide for users to implement their own extensions.

packages/coding-agent/examples/extensions · high confidence

New immutable Context API with built-in telemetry and cancellation support

The Chord package introduces a new \Context\ interface and associated utilities in \packages/chord/src/context/index.ts\ to manage invocation-scoped state. This change provides an immutable context mechanism that carries typed values via \ContextKey\, ensuring type safety. It integrates telemetry directly into the context, guaranteeing that \context.telemetry\ is always a valid span (defaulting to a noop if absent) and offering helpers like \traceIn\ and \withTelemetry\ to manage span lifecycles. Additionally, it standardizes cancellation handling through \AbortSignal\ integration, providing utilities such as \withAbortSignal\, \withCancel\, and \awaitWithContext\ to manage promise cancellation relative to the context's lifecycle.

packages/chord/src/context · high confidence

New interactive TUI components and Easter eggs

The interactive mode now includes a suite of new terminal UI components: \ArminComponent\ and \DaxnutsComponent\ provide animated ASCII Easter eggs, while \BashExecutionComponent\ handles streaming bash output with visual line truncation and status indicators. Session and tool state are now rendered via \BranchSummaryMessageComponent\ and \CompactionSummaryMessageComponent\ (collapsible summaries), \AssistantMessageComponent\ (with thinking block toggling and OSC 133 markers), and \CustomMessageComponent\/\CustomEntryComponent\ (supporting extension-provided renderers). Configuration management is handled by \ConfigSelectorComponent\, and the input experience is enhanced by \CustomEditor\ (app-level keybindings and status embedding) and \CountdownTimer\ (for cancellable dialogs).

packages/coding-agent/src/modes/interactive/components · high confidence

New pi-env daemon for remote execution environments

The daemon now provides a remote execution environment over SSH, allowing programs to run in pseudo-terminals for interactive use and reporting the terminal's foreground job. It implements Node-compatible file system operations, including recursive directory creation and proper error codes like ENOTDIR, and streams command output with spill-to-disk for large outputs. The daemon uses a length-prefixed binary protocol for communication and exposes its version via the hello command.

packages/env/daemon · high confidence

New portable SQLite database abstraction with Node and Cloudflare Durable Object adapters

The \packages/chord/src/sqlite\ package now provides a unified, asynchronous SQLite interface (\SqliteDatabase\) that decouples application logic from the underlying runtime. It includes a Node.js adapter (\NodeSqliteDatabase\) backed by the native \node:sqlite\ module, featuring WAL journaling, configurable busy timeouts, and statement caching, as well as a Cloudflare Durable Objects adapter (\DurableObjectSqliteDatabase\) that serializes concurrent SQL operations to prevent storage conflicts. The package also ships with built-in support for atomic schema migrations via \applySqliteMigrations\ and schema prefix validation, allowing applications to manage database versions consistently across both environments.

packages/chord/src/sqlite · high confidence

New print mode and JSON event streaming for single-shot agent runs

The coding agent now supports a dedicated print mode for single-shot interactions, accessible via the \pi -p\ command for plain text output or \pi --mode json\ for structured JSON event streams. This change introduces a new \print-mode.ts\ implementation that handles session lifecycle, signal termination, and output formatting, alongside a \json-event.ts\ module that transforms internal session events into a clean, non-partial JSON wire format suitable for external consumers. The \index.ts\ barrel file exposes these new modes and their associated types, enabling users to integrate the agent into scripts or other tools via stdout.

packages/coding-agent/src/modes · high confidence

New sandbox extension for OS-level bash command isolation

A new example extension has been added to the coding-agent that enables OS-level sandboxing for bash commands using the @anthropic-ai/sandbox-runtime library. This extension replaces the built-in bash tool to enforce strict filesystem and network restrictions (such as blocking access to \~/.ssh or \~/.aws and limiting allowed domains) via platform-specific tools like sandbox-exec on macOS and bubblewrap on Linux. Users can configure these restrictions via global or project-local JSON config files and enable the feature using the \pi -e ./sandbox\ command.

packages/coding-agent/examples/extensions/sandbox · high confidence

New utility modules for clipboard, image processing, and system integration

The coding-agent now includes a suite of new utility modules in \packages/coding-agent/src/utils\ to handle clipboard operations, image processing, and system integration. Clipboard functionality has been expanded to support Wayland (via \wl-paste\/\wl-copy\), X11 (via \xclip\/\xsel\), WSL (via PowerShell), and remote sessions (via OSC 52), with native fallbacks and proper error handling. Image processing now uses \@silvia-odwyer/photon-node\ (WASM-based) to convert images to PNG, apply EXIF orientation, and resize images to fit within size limits, replacing previous dependencies. Additional utilities include ANSI code stripping, changelog parsing, child process management with graceful stdio handling, git URL parsing, and frontmatter parsing.

packages/coding-agent/src/utils · high confidence

SQLite-backed telemetry storage for Chord

Chord now supports persisting telemetry data (spans, traces, and metrics) to a local SQLite database. This change introduces a new \SqliteTelemetry\ implementation that records spans and metric intervals, handles context propagation via carriers, and provides query capabilities to retrieve traces and metrics by attributes, time ranges, and error status. Users can now leverage durable, local storage for their telemetry data instead of relying solely in-memory or noop stores.

packages/chord/src/telemetry-sqlite · high confidence

Unified extension system for lifecycle events and custom tools

The coding agent now exposes a comprehensive extension API that allows third-party modules to subscribe to agent lifecycle events (such as session start, shutdown, and compaction), register custom LLM-callable tools, and interact with the user interface via dialogs, widgets, and footer components. This unified system replaces previous fragmented hooks, providing a consistent runtime for extensions to modify system prompts, intercept input, and manage session state across different execution environments including Node.js, Bun, and compiled binaries.

packages/coding-agent/src/core/extensions · high confidence

Removals

Removal of legacy console, JSON, and TUI renderers

The \console-renderer.ts\, \json-renderer.ts\, and \tui-renderer.ts\ files have been deleted from the \packages/agent/src/renderers\ directory. This removes the previous implementations for displaying agent events in plain text, JSON format, and a terminal user interface, respectively. Users relying on these specific renderer classes for event output will need to migrate to the new rendering architecture introduced in this change.

packages/agent/src/renderers · high confidence

Removal of legacy pod setup and model run scripts

The \model\_run.sh\ and \pod\_setup.sh\ scripts within the \packages/pods/scripts\ directory have been deleted. These scripts previously handled the bootstrapping of GPU pods, including CUDA toolkit installation, virtual environment creation, and the execution of vLLM model servers. Their removal indicates a shift away from this specific manual or CLI-driven pod initialization workflow.

packages/pods/scripts · high confidence

Removal of pods command implementations

The command implementations for managing AI model pods have been removed from the codebase. Specifically, the files handling model deployment logic (including GPU selection and vLLM argument configuration), pod lifecycle management (listing, setting up, and removing pods), and the interactive prompt interface that connected to local models via the agent package have been deleted. This eliminates the ability to configure remote GPU pods, deploy models to them, or interact with them through the CLI.

packages/pods/src/commands · high confidence

Removed the pods package and CLI

The \packages/pods\ source code has been deleted, removing the CLI commands and library functions used to manage remote GPU pods (including setup, switching, and removal) and model deployments (starting, stopping, and listing models). This eliminates the ability to configure SSH connections, manage vLLM instances on remote hosts, and load model-specific GPU configurations via the \pi\ command-line interface.

packages/pods/src · high confidence

Architecture

AI API implementations moved to src/api with lazy loading

The AI provider implementations (Anthropic, Azure OpenAI, Bedrock, Cloudflare, Google, etc.) have been reorganized into the \packages/ai/src/api\ directory. Each provider now has a dedicated lazy-loading wrapper (e.g., \anthropic-messages.lazy.ts\) that dynamically imports the actual implementation file (e.g., \anthropic-messages.ts\) only when needed. This change improves bundle size by deferring the loading of provider-specific code and SDK dependencies until they are actually used, while maintaining the same external API surface for consumers.

packages/ai/src/api · high confidence

Decoupled tool renderers for improved performance and modularity

The coding agent now separates tool presentation logic from execution code by introducing dedicated renderer modules (bash, edit, find, grep, ls, read, write) in the \renderers\ directory. This architectural change allows processes that only display tool output to import renderers without loading the heavy tool execution paths or their typebox parameter schemas, significantly reducing the module graph size. The new renderers provide consistent, theme-aware UI components for tool calls and results, including syntax highlighting for write operations, diff previews for edits, and line-range truncation with expand hints for read, find, grep, and ls tools.

packages/coding-agent/src/core/tools/renderers · high confidence

Introduce AgentSessionRuntime for isolated session lifecycle management

The coding agent now uses a dedicated runtime layer (AgentSessionRuntime) to manage the lifecycle of individual sessions. This runtime owns the current AgentSession along with its cwd-bound services (model runtime, settings, resource loader) and handles session switching, forking, and shutdown. By encapsulating the teardown and recreation of these services, the agent ensures that session state is properly isolated and persisted, preventing issues like duplicate session headers or lost state during branch summarization and compaction.

packages/coding-agent/src/core · high confidence

Refactored TUI into a modular component architecture

The TUI package has been restructured from a monolithic implementation into a system of distinct, reusable components. This change introduces new modules for layout and rendering (Box, HStack, Stack, Spacer), input handling (Input, Editor with kill ring and undo support), and UI controls (ScrollView with configurable scrollbars, SelectList, SettingsList). It also adds specialized components for visual feedback (Loader, CancellableLoader, AltScreenFlashContainer) and media (Image), alongside utilities for mouse interaction (MouseRegion) and markdown rendering. This modularization provides a cleaner foundation for future TUI features and improvements.

packages/tui/src/components · high confidence

Behavioural changes

Agent package refactored with new harness, proxy, and search APIs

The agent package has been significantly restructured to support a new durable harness architecture and improved streaming capabilities. The core agent loop has been extracted into \agent-loop.ts\ with a new \AgentMessage\-centric design, while the previous CLI, argument parsing, and session management files have been removed in favor of a more modular approach. A new \proxy.ts\ module enables LLM calls to be routed through a server to reduce bandwidth, and a \search/index.ts\ module introduces session and entry search capabilities. The public API now exposes the \AgentHarness\, compaction utilities, telemetry schemas, and new configuration options like \thinkingBudgets\ and \maxRetryDelayMs\ via \AgentOptions\, providing a more robust and extensible foundation for agent execution.

packages/agent/src · high confidence

CLI architecture refactored into modular components

The CLI implementation has been restructured from a monolithic entry point into a modular architecture, splitting the code into dedicated files for argument parsing (args.ts), authentication (auth-check.ts, auth-command.ts, credential-print.ts), file processing (file-processor.ts), session management (session-picker.ts), and startup UI (startup-ui.ts). This change introduces a new \auth\ subcommand for managing provider credentials (including \check\, \print-api-key\, and \print-bearer-token\), adds a TUI-based configuration selector (\pi config\), and implements a new first-time setup flow for the official distribution.

packages/coding-agent/src/cli · high confidence

Centralized compaction and branch summarization logic

The core logic for context compaction and branch summarization has been refactored into a dedicated \packages/coding-agent/src/core/compaction\ module. This change consolidates the code responsible for summarizing long sessions and generating summaries when navigating session branches, extracting shared utilities for file operation tracking and message serialization. Users benefit from more robust context management, including improved handling of file read/write operations in summaries and better token budgeting for summarization requests.

packages/coding-agent/src/core/compaction · high confidence

Codemode sandboxing and deterministic execution overhaul

The codemode package has been restructured to support three distinct execution environments: the existing \CodemodeSandbox\ for Node/Bun (worker threads), a new \InlineCodemodeSandbox\ for runtimes without workers (e.g., Cloudflare Workers, browsers), and a \RemoteCodemodeSandbox\ that delegates VM execution to a separate Cloudflare Worker via a Durable Object. A new \sandbox.start()\ API enables deterministic, replayable script runs by allowing the host to answer tool calls and control the virtual clock. TypeScript tool declarations now include detailed schema constraints (e.g., numeric bounds, patterns) as comments. Several stability fixes are included: output is now capped to prevent memory exhaustion, built-ins are frozen to prevent host crashes from script patches, and the Node worker launcher ignores \--watch\ notifications that previously caused bridge errors.

packages/codemode · high confidence

Coding agent CLI restructured with new entry points and migration logic

The coding agent's source code has been reorganized into a new modular structure, introducing dedicated entry points for the standard CLI (cli.ts) and RPC mode (rpc-entry.ts) while centralizing configuration, session management, and extension logic. A new migrations module automatically handles legacy data transitions, including moving sessions from the agent root to project-specific directories, migrating authentication credentials from oauth.json and settings.json to a unified auth.json, and renaming the commands/ directory to prompts/. The package manager CLI has also been updated to support managed self-updates and improved install method detection for Bun, npm, pnpm, and yarn environments.

packages/coding-agent/src · high confidence

Enforced pre-commit checks for formatting, linting, and type safety

A new pre-commit hook has been added to automatically run formatting, linting, and type checking before changes are committed. The hook validates staged files against root configuration and, for the \apps/p2\ directory, runs its own specific checks. Additionally, if files in \packages/ai\ or \packages/web-ui\ are modified, a browser smoke check is triggered to ensure compatibility. This ensures code quality and consistency are maintained at the point of commit.

.husky · high confidence

Image preparation now uses Photon (WebAssembly) with EXIF orientation handling and optional worker threads

The image processing pipeline in the durable package has been replaced with a new implementation based on the Photon library (Rust compiled to WebAssembly). This change introduces automatic correction of JPEG and WebP images based on EXIF orientation data, ensuring images are displayed upright regardless of how they were captured. The system now intelligently scales and encodes images (as PNG or JPEG) to fit within specified size limits, optimizing for inline usage where possible. For Node.js environments, image preparation can optionally run in a separate worker thread to prevent blocking the main event loop during heavy processing, with a fallback to synchronous processing if workers are unavailable. Cloudflare Workers and Durable Objects are supported via a dedicated entry point that leverages Wrangler's WebAssembly module handling.

packages/durable/src/images · high confidence

Introduces new modular package structure and CLI for @earendil-works/pi-ai

The \packages/ai/src\ directory has been reorganized into a modular layout with a new core entry point (\index.ts\) that exports only side-effect-free types and utilities, while provider implementations, API wrappers, and OAuth flows are moved to dedicated subdirectories (\api/\, \auth/\, \providers/\). A new \compat.ts\ entrypoint is provided to maintain backward compatibility with the previous global API surface for existing applications. Additionally, a new CLI (\cli.ts\) is introduced to allow users to list available providers and perform interactive OAuth logins directly from the command line, and a new \bun-oauth.ts\ module registers bundled OAuth flows for standalone Bun binaries.

packages/ai/src · high confidence

Lazy-loaded OpenRouter image generation provider

The OpenRouter image provider is now registered via a new built-in registration module that implements lazy loading. This means the OpenRouter image generation code is only imported when actually needed, reducing initial bundle size and startup time. The provider handles load errors gracefully by returning a structured error response instead of crashing.

packages/ai/src/providers/images · high confidence

MCP client introduces breaking structuredContent change and OAuth issuer validation

The \packages/mcp\ package has been added as a standalone Model Context Protocol client. This release includes a breaking change where \CallToolResult.structuredContent\ is now typed as \unknown\ instead of \Record\<string, unknown\>\, allowing tool calls to return any JSON value (including arrays and null) as per the MCP 2026-07-28 specification. Additionally, OAuth authorization now strictly validates the \iss\ (issuer) parameter against the authorization server's metadata (RFC 9207), throwing \OAuthIssuerMismatchError\ if the issuer does not match or if no metadata was discovered. The package also fixes dynamic client registration by sending the \application\_type\ field for loopback URIs and resolves a \StreamableHttpTransport\ issue on Cloudflare Workers by calling \fetch\ without a receiver.

packages/mcp · high confidence

New provider-owned authentication infrastructure for AI models

The AI package introduces a new authentication system where providers define their own auth logic, replacing the previous implicit resolution. This change adds a request-scoped auth resolution layer that prioritizes stored credentials over environment variables, implements double-checked locking for OAuth token refreshes to prevent race conditions, and provides a pluggable credential store interface with a default in-memory implementation. Users will experience more reliable authentication handling, particularly for OAuth flows, and the system now supports provider-specific environment overlays and explicit cancellation via abort signals.

packages/ai/src/auth · high confidence

Redesigned interactive theme system with system theme and granular color tokens

The interactive coding agent now uses a new theme architecture that includes built-in dark and light themes, a dynamic 'system' theme that adapts to the terminal's palette, and a comprehensive set of granular color tokens. This change introduces specific styling for tool execution states (pending, success, error), markdown rendering (headings, links, code blocks), syntax highlighting, and user message backgrounds. It also adds support for scrollbar theming, transcript search match highlighting, and distinct colors for AI thinking levels, allowing for a more consistent and visually distinct interface across different terminal environments.

packages/coding-agent/src/modes/interactive/theme · high confidence

Repository governance, line-ending normalization, and test isolation hardening

The repository now enforces stricter operational and security standards through new documentation and configuration. A new AGENTS.md defines mandatory development rules for AI agents (e.g., erasable TypeScript syntax, specific import patterns, and commit message formats), while CONTRIBUTING.md establishes a quality bar and auto-closure gate for new contributors. Security is clarified in a new SECURITY.md, and the old PUBLISHING.md has been removed. To prevent cross-platform line-ending issues, .gitattributes now enforces LF for text files and CRLF for Windows scripts. Additionally, test execution is hardened: test.sh now runs in a fully isolated environment (clearing API keys and using a temporary home directory), and new pi-test.sh/ps1/bat scripts allow running the CLI with or without environment variables, ensuring tests and local runs do not leak credentials or depend on the host environment.

(repo-wide) · high confidence

Rewritten RPC mode with typed protocol and client

The RPC mode for headless agent operation has been rewritten to use a strict JSON Lines (JSONL) protocol with a new typed client and server implementation. This change introduces a dedicated \jsonl.ts\ module for reliable LF-only line framing, replacing previous stdout handling to prevent issues with Unicode separators. The new \RpcClient\ spawns the agent process and provides a strongly-typed API for commands such as prompting, session management, and bash execution, while \rpc-mode.ts\ now handles the server-side logic using this typed protocol. Consumers of the RPC interface will interact with a more robust, type-safe interface that ensures proper request/response correlation and event streaming.

packages/coding-agent/src/modes/rpc · high confidence

Unified image and classifier models into the main Models surface

The separate \ImagesModels\ collection and \ImagesProvider\ have been removed and unified into the standard \Provider\ and \Models\ APIs. Image models are now \ImageModel\ instances that share the \BaseModel\ interface with chat models, and image generation is handled via \Models.generateImages()\ and \createProvider({ images })\. The generated model data schema has been updated to version 6 to support multiple model types (chat, image, classifier) per upstream ID, and a new classifier model system with \Models.classify()\ has been added to support JEV-style classification tasks through providers like TypeSafe and Cloudflare Workers AI.

packages/ai · high confidence

Fixes

Fixes environment variable restoration and process warnings in Bun-compiled binaries

This change introduces a workaround for a Bun issue where \process.env\ is empty inside sandbox environments (e.g., nono on Linux/macOS) by restoring environment variables from \/proc/self/environ\ at startup. It also suppresses process warnings in the CLI and registers OAuth flows and Bedrock provider modules specifically for the Bun runtime entrypoint, ensuring the coding agent functions correctly when compiled into a binary.

packages/coding-agent/src/bun · high confidence

Native resolution of TypeScript source aliases in internal processes

Internal processes now use a new source resolver to natively resolve TypeScript source files and tsconfig path aliases (specifically those starting with @earendil-works/). This ensures that internal tooling loads the latest source code directly rather than falling back to potentially stale compiled package distribution files.

packages/coding-agent/src/experimental · high confidence

Test coverage

Add TUI context footer evaluation; Added MCP client conformance test suite; Added comprehensive test coverage for the agent package; Added comprehensive tests for the coding agent session manager; Added durable package example tests; Added regression test suite for coding-agent session and tool behaviors; Added test coverage for Chord runtime core behaviors; Added test coverage for the evals package infrastructure; Added test coverage for the remote execution environment and SSH bootstrap; Added test fixtures for Chord integration testing; Added test fixtures for assistant thinking blocks and session compaction; Added test infrastructure and coverage for durable code mode and execution environment; Added test utility modules for agent testing; Added tests for SQLite drivers and migration logic; Added tests for delta tracker retention and lifecycle semantics; Expanded test coverage for AI provider abort handling and Anthropic-specific behaviors; Expanded test coverage for AgentSession core behaviors; Expanded test coverage for TUI components and regression fixes; Exported durable storage and environment conformance test suites; New deterministic test suite for AgentSession behavior.

Dependencies

Initial release of v0.87.1 with new package structure and dependency updates

This release introduces version 0.87.1 across the monorepo, establishing a new package structure with dedicated packages for the AI integration (@earendil-works/pi-ai), application runtime (@earendil-works/chord), and durable storage (@earendil-works/pi-durable). The coding agent now requires Node.js \>=22.19.0 and includes updated dependencies such as undici 8.10.2, typebox 1.3.27, and the Anthropic SDK 0.124.0. Example extensions for sandboxing, custom providers, and the Gondolin integration have been added to demonstrate plugin capabilities.

(dependencies) · high confidence

Updated vendor libraries for code highlighting and Markdown parsing

The export-html module now uses updated versions of its bundled vendor libraries: Highlight.js has been upgraded to v11.9.0 and the Markdown parser (marked) to v18.0.5. These updates replace the previous versions in the \packages/coding-agent/src/core/export-html/vendor\ directory, ensuring that code syntax highlighting and Markdown-to-HTML conversion in exported documents reflect the latest behavior and fixes from these libraries.

packages/coding-agent/src/core/export-html/vendor · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 49 → 47 (-1.2)

Lenses

  • Code Health 65 → 60 (-5.6)
  • Architecture 65 → 65 (-0.2)
  • Maturity 64 → 77 (+13.4)
  • Readiness 54 → 57 (+3.4)
  • Security 76 → 66 (-9.4)
  • Accessibility 37 → 33 (-3.8)
  • Performance 60 → 60 (+0.0)

Resolved (74)

  • Ambiguous naming convention for mutation vs. immutability. apply is often assumed to be mutable in many libraries, but here it returns T (which could be a new instance or the same reference). applyImmutable explicitly states immutability. However, applyImmutableBatches exists, suggesting apply might be mutable, but the return type T (not void or T[]) is ambiguous. If apply is mutable, it should likely return void or the mutated target. If it returns a new value, it is immutable, making the name applyImmutable redundant or confusingly distinct from apply.
  • AssistantMessageFrameEncoder.encode (cognitive 48) (packages/ai/src/utils/assistant-message-frame.ts)
  • AssistantMessageFrameEncoder.encode (cyclomatic 36) (packages/ai/src/utils/assistant-message-frame.ts)
  • Change coupling: anthropic-messages.ts ↔ google-generative-ai.ts (packages/ai/src/api/anthropic-messages.ts)
  • Change coupling: google-generative-ai.ts ↔ google-vertex.ts (packages/ai/src/api/google-generative-ai.ts)
  • Change coupling: session.ts ↔ memory.ts (packages/durable/src/session/session.ts)
  • Change-coupling hub: openai-completions.ts → azure-openai-responses.ts, google-generative-ai.ts, google-vertex.ts, openai-responses.ts (packages/ai/src/api/openai-completions.ts)
  • Duplicate intent across different context objects. Ctx, Self, and Host all expose a get method with the exact same signature and likely same intent (fetching a handle to a resource). While they belong to different scopes (context, self-service, host), the duplication of the method name and signature across these distinct entry points can be confusing. It is not clear if Ctx.get is a local lookup while Host.get is a global lookup, or if they are identical.
  • FileTooLong: src/record.ts (packages/chord/src/record.ts)
  • Fixed-sleep synchronisation: #2 a revocation while the route is still resolving closes the relay; no worker record is made (packages/chord/test/links-review.test.ts)
  • FunctionTooLong: model-resolver.resolveCliModel (packages/coding-agent/src/core/model-resolver.ts)
  • FunctionTooLong: transform-messages.transformMessages (packages/ai/src/api/transform-messages.ts)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 54 more

New (390)

  • AgentSession._omitRecoveryAttempt (cognitive 18) (packages/coding-agent/src/core/agent-session.ts)
  • Change coupling: azure-openai-responses.ts ↔ openai-completions.ts (packages/ai/src/api/azure-openai-responses.ts)
  • Change coupling: google-vertex.ts ↔ openai-completions.ts (packages/ai/src/api/google-vertex.ts)
  • Change coupling: index.ts ↔ storage.ts (packages/durable/src/index.ts)
  • Change coupling: memory.ts ↔ storage.ts (packages/durable/src/storage/memory.ts)
  • Change-coupling hub: google-generative-ai.ts → anthropic-messages.ts, google-vertex.ts, openai-completions.ts (packages/ai/src/api/google-generative-ai.ts)
  • ClassTooLong: IndexedDbStorage (packages/durable/src/storage/indexeddb.ts)
  • ClassTooLong: ObjectImpl (packages/chord/src/object.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/agent-session.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/compaction/branch-summarization.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/compaction/compaction.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/compaction/compaction.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/compaction/compaction.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/compaction/compaction.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/compaction/compaction.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/compaction/compaction.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/compaction/utils.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/extensions/runner.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/extensions/runner.ts)
  • Cross-context type AgentMessage (agent → coding-agent) (packages/coding-agent/src/core/extensions/types.ts)
  • …and 370 more

Changes since last survey

  • 231 commits — 96 feature/other, 135 fixes

By area

  • packages/coding-agent — 59 commits
  • packages/ai — 57 commits
  • packages/durable — 36 commits
  • packages/chord — 27 commits
  • packages/tui — 12 commits
  • (root) — 9 commits
  • .github/workflows — 5 commits
  • packages/env — 5 commits
  • .github/APPROVED_CONTRIBUTORS — 3 commits
  • packages/agent — 3 commits
  • .pi/extensions — 2 commits
  • nix/package.nix — 2 commits
  • packages/codemode — 2 commits
  • packages/mcp — 2 commits
  • packages/telemetry — 2 commits
  • (repo) — 1 commit
  • .pi/skills — 1 commit
  • packages/evals — 1 commit
  • scripts/check-entry-graphs.mjs — 1 commit
  • scripts/preview-packages.mjs — 1 commit

Notable commits

  • fix: Revert "feat(durable): replicate storages as a commit log"
  • fix: fix(ai): OpenRouter reasoning test uses deepseek-r1-0528, deepseek-r1 left the catalog
  • fix: fix(ai): do not count faux cache writes as input tokens
  • fix: fix(ai): drop Codex models rejected for ChatGPT accounts (#11173)
  • fix: fix(ai): drop images from Anthropic error tool results
  • fix: fix(ai): drop thinking from other models instead of sending it as text (#11000)
  • fix: fix(ai): expect compat on OpenRouter decision models in catalog test
  • fix: fix(ai): expect xhigh thinking for Grok 4.3 and Grok 4.5
  • fix: fix(ai): fall back on Anthropic strict tool limits
  • fix: fix(ai): handle ChatGPT Business workspace usage limit errors
  • fix: fix(ai): hold Anthropic system updates past dropped assistant messages
  • fix: fix(ai): keep images of error tool results for Anthropic and Bedrock Claude
  • fix: fix(ai): keep the prompt cache across tool changes on Responses (#11142)
  • fix: fix(ai): match retryable status codes only as standalone numbers
  • fix: fix(ai): move OpenCode providers to inference endpoints
  • fix: fix(ai): only list announced removals as still unavailable
  • fix: fix(ai): order thinking before text when a completions chunk has both
  • fix: fix(ai): preserve literal data in Gemini tool schemas
  • fix: fix(ai): recover from Copilot request-size overflow
  • fix: fix(ai): repair invalid \u escapes in tool-call arguments
  • …and 211 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

earendil-works/pi was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 26 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit c17be1e9826b0eb3bf29d5a53c1dc0edbf860f78 — the exact code this score is about.
  • Scored under rubric-2026.10.5 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer measure-2026.10.34+preprod-c12eef3a1477.