Skip to content

pi-python v0.8.0

Choose a tag to compare

@github-actions github-actions released this 31 Oct 10:31
· 89 commits to main since this release
a5d32d5

This release is about the agent as a program that needs no Python. The agent can now run as a frozen (PyInstaller) executable, and the new workflow agent-binaries.yml builds one executable for each of five platforms and attaches the archives to the GitHub Release of a tag. These archives are the base of the binary entry for the ACP registry (the entry is not submitted yet). pi-agent-cli-lc now installs the OpenAI-format provider (langchain-openai) by default, so a bare uvx pi-agent-cli-lc can call a model. Changed also has two changes of zypi that you can see: it refuses 21 flags that the Python agent does not back, and its settings page has eight rows fewer. Known issues says what does not work yet, and that includes a macOS finding about the workflow sandbox.

Added

  • The agent can run as a frozen executable (PyInstaller): three places in the code assumed a Python interpreter next to the agent. The workflow sandbox started its script process with sys.executable -I -S -B -X utf8 child.py, which a frozen program refuses. A frozen build now starts a program of its own for that, child.py frozen alone with the standard library and nothing else, from the folder frozen-child next to sandbox/host.py. The layers of the sandbox do not change. The older form of the terminal login (_meta["terminal-auth"]) named sys.executable -m pi_agent_cli --setup; a frozen build names its own program and --setup. A provider that a frozen build does not hold (anthropic, deepseek, any other) now fails with a text that says to set provider = "openai" and base_url, not with pip install ..., which cannot help there. --setup offers only the providers that the build holds. PI_SANDBOX_FROZEN_CHILD=<program> runs the whole sandbox test suite against the frozen program. Tests: pi_agent_core/tests/test_frozen_providers.py, packages/pi-dynamic-workflows/tests/test_sandbox_frozen.py and conftest.py, and additions to test_acp_auth_methods.py and test_setup_command.py.
  • A workflow builds the agent as one executable for each of five platforms (CI, packaging): .github/workflows/agent-binaries.yml builds the agent with PyInstaller (one file) on ubuntu-22.04, ubuntu-22.04-arm, macos-15, macos-15-intel and windows-2022. There is no windows-aarch64 build, because tiktoken has no wheel for it. Each program is tested on its own platform: a smoke test, 13 ACP contract tests against the program, and the sandbox tests against the frozen script process. The archives are named zycode-agent-<target>-<version>.tar.gz (.zip for Windows). The workflow starts after the Release workflow succeeds for a tag push (workflow_run) and uploads the five archives to that release with gh release upload --clobber. It stops when the tag is not v<version of pi-agent-cli-lc>. A pull request that touches the agent runs it as a dry run, and by hand (workflow_dispatch with a tag) it repairs a release whose upload failed. The frozen agent holds only the OpenAI-format provider; for Anthropic or DeepSeek use provider = "openai" with base_url, or the Python package. Not signed. Code: packaging/agent/. Design, release steps and trial results: docs/specs/2026-10-31-agent-binaries.md. Not tried yet: the publish job (it runs only after a tag), the rule of GitHub that a workflow_run workflow uses the file on the default branch, and the first start of a program in Zed or JetBrains.
  • The Landlock layer of pi-sandbox is tested on a Landlock kernel, and the flags and settings of zypi are measured against the Python agent (TUI, tests): the new test landlock_enforcement_e2e (workspace, read-only and strict profiles; the parent stays free; a child inherits the layer) passed on kernel 6.12 (Landlock ABI 6). The probes for flags and settings (scripts/tui_pty/) are the base of the two changes of zypi below. Test code only: zypi does not change by these. (#57, #58)

Changed

  • pi-agent-cli-lc depends on the OpenAI-format provider (langchain-openai): it asks for pi-agent-core-lc[openai]. A registry entry cannot add --with, so a bare uvx pi-agent-cli-lc had no provider and could not call a model. The other providers are extras of the package now: pi-agent-cli-lc[anthropic] and pi-agent-cli-lc[deepseek] (the extras of pi-agent-core-lc stay). Behaviour change: installing pi-agent-cli-lc now also installs langchain-openai and its dependencies (openai, tiktoken).

  • An interactive zypi refuses a flag that the Python agent does not back, and says why (TUI): an interactive session passes no flag to the agent, so 21 flags that came from the upstream project did nothing: --allow, --deny, --reasoning-effort, --worktree, --max-turns, --disable-web-search and 15 more. --deny was the worst case. The agent still asked about a call that matched the rule, and it never refused the call. Now zypi prints error: zypi did not start., names each of these flags with its reason, and exits with status 2 before it starts the agent. 19 of the flags are no longer in zypi --help. --rules and --system-prompt-override stay there with the note "-p only", because -p passes them to the agent. An interactive session reads .pi/SYSTEM.md and .pi/APPEND_SYSTEM.md instead. -p, the subcommands and the hidden compatibility flags do not change. Behaviour change: a script that starts an interactive zypi with one of these flags now fails with status 2.

  • The settings page does not offer eight settings that change nothing (TUI): remember_tool_approvals, default_selected_permission, default_model, toolset.ask_user_question.timeout_enabled, fork_secondary_model, prompt_suggestions, hunk_tracker_mode and auto_update steered the Rust runtime, or a feature that left with it. With the Python agent, a change on the page did nothing, or it did something other than the row said. default_model saved a key that the next start ignores. default_selected_permission showed "Always allow on all sessions" for a prompt that starts on "Allow once". The page has eight rows fewer, and the Models category is gone. The code and the keys of config.toml stay. A value that an earlier version saved is still read, and default_selected_permission = "reject" in config.toml still selects "Reject" in the first prompt of a session. Together with the change above, this ends the known issue of v0.7.0, "Some flags and settings have no effect", for everything that was measured.

  • The workflow sandbox on macOS has no kernel limit on memory or on the number of processes (docs, tests): measured in CI on macos-15 and macos-15-intel. The layers that work there are process, rlimit-core, rlimit-cpu, rlimit-nofile, rlimit-fsize and the audit hook. rlimit-as has no effect (the system does not enforce RLIMIT_AS: a 1 GiB allocation succeeds under a 256 MiB limit), and rlimit-nproc has no effect (a script can start child processes). So only the audit hook stands in the way there. Before this, the design said that macOS was not tested. README.md, AGENTS.md, packages/pi-dynamic-workflows/README.md and docs/specs/2026-10-01-workflow-sandbox-design.md say it now, and the sandbox tests check what each platform has. No code of the sandbox changes. With the default permission mode ask, every workflow call is asked about first.

  • The release workflow builds the macOS arm64 binary on macos-15 (CI): GitHub removes the macos-14 runner on 2026-11-02. Only the runs-on of build-tui-macos-arm changes. Not run: this job runs only for a tag, so the first run is the release of 0.8.0. (#69)

  • The TUI CI runs the tests of pi-sandbox, with enforcement required (CI): the new suite is in scripts/tui_baseline.toml (105 passed, 3 skipped). The job installs bubblewrap, lifts the AppArmor block on unprivileged user namespaces of ubuntu-24.04, and sets SANDBOX_E2E_REQUIRE_ENFORCEMENT=1. A runner without Landlock or a working bwrap now fails the job; before, the tests returned early and counted as passed. (#59)

  • New version numbers (all Python packages, TUI): pi-agent-core-lc, pi-agent-harness-lc and pi-agent-cli-lc go from 0.7.0 to 0.8.0. The three pin each other with ==, so install them at one version. The four extension packages need the new core (pi-agent-core-lc>=0.8.0) and get new versions, because the publish step skips a version that PyPI has already: pi-web-access-py, pi-goal-x-py and pi-dynamic-workflows-py go from 0.4.0 to 0.5.0, and pi-mcp-py from 0.2.0 to 0.3.0. zypi --version and the agentInfo of the agent show 0.8.0 (the TUI crates pi-pager-bin and pi-version, and tui/Cargo.lock, carry the same number).

Removed

  • More dead code in the TUI: 16 unused modules, the MCP loaders, and the folder-trust gate that guarded them (TUI): the call graph (scripts/tui_callgraph.py units) listed 16 modules that no live code refers to, and plan decision 10 named the MCP loaders of pi-shell and recent_dirs of pi-pager. All of it is gone. The modules are: in pi-hooks, dispatcher, result, runner, runner::command and runner::http (the hook dispatcher and the hook runners, 4,339 lines, and the crate's own integration test); in pi-shell, session::events, session::telemetry, session::unified_list, upload, upload::turn, auth::flow and config::reloader; and pi-workspace::publish, pi-tools::implementations::editor_infra, pi-mcp::wire and pi-agent::prompt::browser_verification. The compiler then found the code that only these called, and that is gone too: the plugin-registry and session-registry helpers of pi-shell, the consume side of the folder-trust gate (the cache of verdicts and project_scope_allowed; nothing calls the gate, because the loaders that it guarded are gone), the resolver of the [plugins] config, and the module claude_import. pi-hooks drops its dependencies reqwest, url, tokio and pi-extra-ca, and pi-shell drops dirs and pi-session-events. grant_folder_trust stays: the pager calls it for --trust, and the pager's trust dialog still uses the decision side in pi-workspace. pi-tools::types::error stays: the call graph lists it as dead, but it holds the From impls for ToolError, and code uses such an impl without a name. No behaviour changes: the whole workspace, with its tests, compiles without the removed code, so nothing refers to it, and the build that ships (pi-pager-bin, pi-pager-minimal, pi-update) has 0 warnings. Two tests change what they check. session_new_and_load_send_no_mcp_servers (pi-pager) no longer calls the removed loader to show that its fixture is a real one. project_config_never_sources_feedback_user (pi-shell) uses find_project_configs to show that the project config is found, because the function that it used before is gone. 9,067 lines go and 65 come, in 47 files under tui/. The tests of pi-shell go from 838 to 784 (54 go with the code that they tested; none is new), and 110 test functions in crates that are not suites of the manifest go too (98 in pi-hooks, 9 in pi-workspace, 3 in pi-tools). The ceilings in scripts/tui_baseline.toml go down: leader 243 to 239, x.ai 297 to 282, and the floor of pi-shell 820 to 766. The dependency graph stays at 970 packages. docs/baselines/tui-support.md is generated again: the support crates now have one dead unit left, pi-tools::types::error.
  • The test-support crate of the TUI loses its unused half: seven modules and eleven dependencies (TUI): plan phase D.5. pi-test-support held a mock inference server (mock_server, inference_override, scripted, sse), two ACP stdio clients (acp_client), a runner for -p (headless) and a counting server (counting_server): 5,443 lines and 47 test functions, for the tests of the Rust agent runtime that is gone. The workspace builds with its tests without them, so nothing used them. The lookup of the pager binary (grok_binary) and git_workdir go too: only the removed modules called the first, and nothing called the second. The crate keeps what tests use: EnvGuard, env_parse, scaled, TestSandbox, TestProcess, and ResourceSnapshot with its sampler. Eleven dependencies go: agent-client-protocol, anyhow, async-trait, axum, futures-util, pi-acp-lib, serde, serde_json, tokio-util, tracing, and the dev-dependency reqwest; tui/Cargo.lock loses 11 lines and no package. The README.md of the crate is written again. No behaviour changes: the crate is a dev-dependency of pi-shell, pi-pager and pi-tools (publish = false), so zypi does not change. The suites have the numbers of before (pi-shell 838, pi-pager 5,651), the 23 tests that remain in the crate pass, and tui_baseline.py check is green (warnings 0, graph 970, residue unchanged). 5,646 lines go and 27 come, in 12 files.

Fixed

  • The /resume picker shows sessions that are more than 30 days old (TUI): the picker left out every session that was last updated more than 30 days ago. A Python session that nobody touched for a month was gone from /resume, and only --resume <id> could still open it. The picker now shows every session that the agent lists. The agent sends the list in pages of 50, and the picker reads up to 100 pages. A session with no updatedAt that parses is still left out.
  • A flaky test of the pager no longer fails by chance (TUI, test only): needs_animation_gates_prompt_history_tick_delivery now waits for a fresh result of the daemon. (#65)

Known issues

Carried over from 0.7.0 where they still hold. The one about flags and settings is gone: 21 flags are refused and eight settings are hidden (see Changed), for everything that was measured.

  • The allowlist egress mode of the benchmark runner does not filter (pi-agent-cli): the Terminal-Bench tasks use it. The runner passes only proxy variables to the container, and EgressPolicy.allowed_hosts goes into run.json and nowhere else. A test on 2026-10-16 reached example.org, huggingface.co and httpbin.org through the proxy. The official list itself has github.com. One agent used this to download the reference solution of its own task, so that run does not count. --egress-mode no-network rules this out (a task that needs apt-get then fails). --no-docker runs share the file system with the agent. Use them for smoke tests only.
  • The workflow sandbox has no memory or process limit on macOS: see Changed. A script that runs on macOS can allocate memory without a kernel limit and can start child processes. Only the audit hook (a speed bump, not a boundary) stands in the way.
  • The agent executables are new and have run only in CI: nobody has started one in Zed or JetBrains, the publish job has not run, the registry entry is not submitted, and the programs are not signed (macOS and Windows may warn at the first start). The Linux x86_64 program is built on ubuntu-22.04; its glibc floor was not measured here. The frozen agent holds only the OpenAI-format provider.
  • [ui.status_line] has no context or cost items with the Python agent: the agent does not tell zypi the size of the context window, the tokens in use or a cost, so these items stay empty, and a script gets no context_window.*, cost.total_cost_usd, workspace.branch or workspace.repo_root. The rest of the row is drawn.
  • The user guide has no way to open it: the 7 pages are in the binary, but nothing in the UI opens them.
  • --session-id and --continue get slow with thousands of sessions (TUI, pi-agent-cli): the agent lists its session directory again for each page of session/list, so reading all pages costs pages x directory size. --session-id reads all pages. At 1,000 sessions it takes 1.3 s on Linux and 1.8 s on Windows. At 5,000 sessions it takes 28 s and 34 s, and the lookup stops after 30 s. --continue takes 0.6 s and 0.8 s at 1,000 sessions, and 10 s and 12 s at 5,000. Below 1,000 sessions this is fine, and the owner decided to leave it (plan decision 18).
  • Two agent processes that use one home can still make two sessions with the same id (pi-agent-cli): inside one agent process, an id that a client chose is reserved while its session is open, so a second session/new with that id is refused. Two processes do not see each other's reservations. Both can make the session; the first to write its file wins, and the first message of the other is refused (a session with this id already exists).
  • An id that no session ever had also opens with session/load (pi-agent-cli): the agent cannot tell such a UUID from the id of a blank session (a session with no file), so it opens an empty session. zypi export <uuid> of such an id says that the session has no conversation content, and not "not found".
  • pi-mcp-py is Alpha (0.3.0): it has no OAuth, MCP resources, prompts, sampling, roots, elicitation or tools/list_changed. The MCP SDK hides the error of a failed POST request of a legacy SSE server, so a call to a dead SSE server ends only after the call limit of 120 s. A thread that Zed creates before the first worktree of the project has loaded gets an empty mcpServers list (zed#64611). The agent cannot tell this from "no servers", so such a thread has no MCP tools and no notice; a new thread works. zypi has no setting for MCP servers, so only an editor can pass them. The package takes the annotations of a server as given: in the ask mode, a tool that its server marks as read-only runs without a question. Nobody has used the package in the real Zed window; its tests use real child processes, the real agent and ACP over stdio.
  • Tested on Linux only for the latest changes of the TUI: the end-to-end and pseudo-terminal scripts run on Linux (WSL2); the tests of pi-mcp-py also run on Windows. Nobody has started the macOS zypi binary (CI builds it). There is no Windows zypi binary. The Landlock layer of the sandbox was tested only on kernel 6.12; the behaviour on kernels 5.13 to 6.11 was not tested.