Repository navigation
pi-python v0.7.0
This release is about the first run. pi-agent-cli-lc now has a console script with the name of the package, so uvx pi-agent-cli-lc works, and a user who has no model and no key can set both with python -m pi_agent_cli --setup. An ACP client that can run a terminal login (Zed) gets the same dialog as a login. Nobody has run that login inside Zed yet. Fixed has the benchmark runner that showed the verifier's tests to the agent, -p that exited 0 after a failed model call, and the extension API defects of audit batch 9. Changed has the new version numbers: the extension packages need the new core. Known issues says what does not work yet.
Added
- A console script with the name of the package (
pi-agent-cli):pi-agent-cli-lcstarts the same function aspi-agent-cli, which stays.uvx <package>runs the executable that has the name of the package, and it stops with an error when the package has none. The package had onlypi-agent-cli, souvx pi-agent-cli-lc==0.6.0printed "An executable namedpi-agent-cli-lcis not provided by packagepi-agent-cli-lc". The ACP registry starts a PyPI agent only in this form (uvx <package> <args>; it has no--from), so a registry entry needs this script. It is on PyPI from 0.7.0.uvx --from pi-agent-cli-lc pi-agent-cliworks with every release. Test:packages/pi-agent-cli/tests/test_console_scripts.py. - The README tells how to start the agent in Zed as a custom agent (docs): the section "In Zed (custom agent)" has the
agent_serversentry (uvx --from pi-agent-cli-lc), the place of the model and key settings, and the entry for a checkout. The command of the entry was run with the published 0.6.0 package: the agent answeredinitializein an empty home. It was not run inside Zed. --setup, and a terminal login for ACP clients (pi-agent-cli): a user who has no model and no key can now set both from a terminal.python -m pi_agent_cli --setupasks for the provider (OpenAI, Anthropic or DeepSeek), the model and the key. It writes a[model]table toagent.toml(a new file, or the end of a file that has no such table; the text that is there stays to the byte) and the lineNAME=keytolocal.env(mode 0600 on POSIX). The key is read without echo and is never printed, logged or put inagent.toml. It stops, before the first question, for a file that is not TOML, for a[model]table that sets no provider, and for a home that has only the oldconfig.toml. The agent also offers the dialog to the client as an authentication method (pi-setup, "Set up model and API key"). A client that announcesauth.terminal(Zed) gets a method of typeterminal. A client that announces only_meta["terminal-auth"](older clients, the registry validator) gets a method with the command in_meta. Other clients,zypiincluded, getauthMethods: []as before. While the agent has no usable model,session/newanswersauth_required(-32000) to a client that can run the login, and the agent readsagent.tomlandlocal.envagain atsession/new,session/loadandsession/resume.session/loadandsession/resumenever refuse. A key that--setupreplaces needs a new agent process (load_local_envnever overwrites a variable that is set). Not run inside Zed. A script that acts as the client ran a live agent process on Linux (initialize,session/new, the login command in a pseudo-terminal,session/new,authenticate). Design:docs/specs/2026-10-28-acp-terminal-auth-setup-design.md. Tests:packages/pi-agent-cli/tests/test_setup_command.py,test_acp_auth_methods.py.- The product site for zycode (
web/, docs): a static site athttps://zycode.dev, in English (/) and in Chinese (/zh/). It is not a Python package, and no file of a release contains it.web/README.mdhas the commands, the deploy, and the rules for what the site may claim (every claim has a source in the repository). The<head>of a page has the canonical link, thehreflanglinks, the Open Graph and Twitter tags, JSON-LD data (WebSiteandSoftwareSourceCode) and the icons;robots.txtandsitemap.xmlare generated. The new workflowweb-ci.ymlrunsnpm run checkandnpm run buildfor a PR that changesweb/. A merge tomainthat changesweb/deploys the site by itself (Cloudflare Workers Builds, not GitHub Actions). The rootREADME.mdlinks to the site.
Changed
-
The release workflow builds the Linux binary on
ubuntu-24.04, not onubuntu-latest(CI): GitHub moves the labelubuntu-latestto Ubuntu 26. A binary that is built there can need a newer glibc than the 2.39 of Ubuntu 24.04, and then a machine with Ubuntu 24.04 could not start it. The jobbuild-tuiinrelease.ymlnow names the image, asTUI CIdoes (ADR6) and asbuild-tui-macos-armdoes withmacos-14. Nothing changes for the files of a release: the build ofv0.6.0ran onubuntu-24.04already. The other jobs ofrelease.yml(tests, Python packages, publishing) still useubuntu-latest; they ship no binary. -
The documentation says that the Linux binary needs glibc 2.39 or newer (docs):
docs/TUI-AND-CODE-AGENT.md, Option A. The binary ofv0.6.0hasGLIBC_2.39as its highest versioned symbol, so a system with an older glibc cannot start it (Ubuntu 22.04 has 2.35). Option B (build from source) works there. -
The workflows use the Node 24 versions of three GitHub Actions (CI):
actions/upload-artifactv4 to v6,actions/download-artifactv4 to v7, andactions/cachev4 to v5. GitHub removed Node 20 from its runners on 2026-09-23. It runs the old versions on Node 24 and prints a warning. The new versions change only the runtime; the inputs that the workflows use are the same.arduino/setup-protoc@v3stays: it has no release for Node 24, and it works on Node 24 (the runs of 2026-10-26 passed).download-artifactruns only in the jobs that publish, so a dry run ofrelease.ymldoes not test it. -
A change of the Python agent alone runs one test target of the pager, not the whole TUI CI (CI):
tui-ci.ymlstarted forpackages/pi-agent-cli/pi_agent_cli/**andpackages/pi-agent-cli/tests/_tool_agent.py, because the end-to-end tests of the pager (python_agent_e2e) talk to the agent. But it runs ten suites and takes 18 to 35 minutes, and a change of the Python agent can change only that one target. The runs for the PR of--setuptook 25 to 35 minutes, and the first two failed on a Rust test that the PR does not touch (fixed in #47). Now these two paths start the new workflowtui-e2e.yml, which runs that target alone. It restores the cache of thetestjob oftui-ci.ymland never saves one.tui-ci.ymlruns fortui/**,scripts/tui_baseline.py,scripts/tui_baseline.tomland its own file, and it still includes the end-to-end tests. A change of both runs both workflows. Tests:scripts/tests/test_tui_baseline.pykeeps the two workflows in line (paths, command, environment, install lines, cache key). -
The cache of the TUI CI keeps its key when GitHub updates the runner image (CI):
Swatinem/rust-cacheputs the version of every Rust toolchain on the runner into the cache key. The image has its ownstable, and the image of 2026-10-25 changed it from 1.99.0 to 1.99.1. The key changed, no cache matched, and thetestjob built everything again: 35 minutes, 31 of them for the build (18 minutes with the cache). Now the jobs oftui-ci.ymlandtui-e2e.ymlthat install the pinned toolchain make it the default and uninstall the other toolchains before the cache step (the stepKeep only the pinned Rust toolchain). So the key depends on the pinned toolchain, on the files oftui/and on theCARGO_*andRUST_BACKTRACEvariables of the workflow, and not on the image. The first run onmainafter this change builds everything once and saves the cache (onlymainsaves).add-rust-environment-hash-key: falseis not a substitute: it also removes the hash ofCargo.lockfrom the key, so the key never changes and the cache is saved only once. Tests:scripts/tests/test_tui_baseline.pykeeps the step equal in every job and before the cache step, and keeps the hashed variables equal in the two workflows. -
The PyPI pages link to the site (packaging): the
[project.urls]of the sevenpyproject.tomlfiles haveWebsite = "https://zycode.dev", and the README ofpi-agent-cli-lcsays that the agent is the one of zycode. The link shows on PyPI from this release. -
New version numbers (all Python packages, TUI):
pi-agent-core-lc,pi-agent-harness-lcandpi-agent-cli-lcgo from 0.6.0 to 0.7.0. The three pin each other with==, so install them at one version.zypi --versionand theagentInfoof the agent show 0.7.0 (theCargo.tomlfiles ofpi-pager-binandpi-versionandtui/Cargo.lockcarry the version ofpi-agent-cli-lc, and a test checks it). The extension packages are released with the core, so all four now requirepi-agent-core-lc>=0.7.0, andpi-dynamic-workflows-pyalso requirespi-agent-harness-lc>=0.7.0.pi-web-access-py,pi-goal-x-pyandpi-dynamic-workflows-pygo from 0.3.0 to 0.4.0, andpi-mcp-pygoes from 0.1.0 to 0.2.0. Their behaviour has not changed since 0.6.0 (pi-dynamic-workflows-pyhas a new comment inruntime.py); the new requirement and theWebsitelink are the changes. The publish step skips a version that is on PyPI already, so a new requirement needs a new version number.
Fixed
- The first turn without a model named a missing package (
pi-agent-cli): with no[model]table the provider ismock. LangChain has no such provider, and in an install without thelangchainpackage the turn failed with "Provider 'mock' needs init_chat_model from the 'langchain' package: pip install langchain". That text hid the real cause. Now the turn fails with "No model is set. Run the agent with --setup, or add a [model] table to <agent.toml>." The scripted LLM (PI_USE_MOCK=1) and the real providers are not changed. Test:packages/pi-agent-cli/tests/test_first_run_errors.py. -pexited 0 with an empty line when the model failed (pi-agent-cli): the turn ended withstopReason="error", and the headless runner printed the empty answer and returned 0. Now it writeserror: <reason>to stderr and returns 1, and stdout keeps only the text of an answer. Behavior change for a script that read exit status 0 after a failed model call. Test:packages/pi-agent-cli/tests/test_first_run_errors.py.- The benchmark runner showed the verifier's tests to the agent (
pi-agent-cli):DockerContainerSession.setup()copied the task'stests/into the container as/testswhen the container started. The agent has a shell in that container, so it could readtest.sh,test.patch,grader.pyandtest_outputs.py. This was so from the first version of the runner (2026-09-04). Nowsetup()copies nothing.run_verifier()installs/testsafter the agent is done, and first removes any/teststhat the agent made. DeepSWE'stask.tomlasks for this ([verifier] environment_mode = "separate"). Affected results: a scan of all 65 saved trajectories found one Terminal-Bench pass that read/tests(extract-elf, 2026-09-07), and one--no-dockerrun that read the task cache withtests/andsolution/in it (polyglot-c-py, 2026-09-10). The first no longer counts. The report does not use the second. Numbers and method:docs/benchmarks/FRONTIER-HARNESS-30-EVAL-REPORT.md, section "数据有效性声明". Test:packages/pi-agent-cli/tests/test_docker_runner_verifier_isolation.py. - A DeepSWE run scored -1 when the agent had committed a file with the name of a hidden test (
pi-agent-cli): the task text tells the agent to work on a new branch and to commit. DeepSWE'sgrader.pyassumes that HEAD is the base commit. It resets the files thattest.patchtouches withgit checkout HEAD -- <file>, and it deletes a file only when HEAD does not have it. A file that the agent had committed under the name of a hidden test (tests/test_multipart_response.pyinhttpx-multipart-response-parsing) stayed,git apply test.patchfailed with "already exists in working directory", and the run scored -1 without any test run. The official flow is not affected: it applies the agent's diff to a fresh container. Nowsetup()records HEAD, andrun_verifier()moves HEAD back withgit reset --mixedbefore the verifier starts. Only HEAD and the index move; the files stay as the agent left them. This applies only to tasks whosetests/hasgrader.pyandconfig.json; Terminal-Bench tasks keep their history (forsanitize-git-repothe new history is the answer). Affected results: one trial. Of the 6 trials of the 100-turn rerun (2026-10-26),httpx-multipart-response-parsingscored -1; a re-grade of its saved workspace with the fix gives F2P 122/122 and P2P 1272/1272. Three other trials of that rerun also had commits (expr-try-catch-errors,katex-multicolumn-array-spans,meriyah-explicit-resource-declarations); a re-grade with the fix gave the same counts as before. A search of all savedverifier_output.txtfiles (the 60-turn DeepSWE trials of 2026-10-16 included) finds this error in that one trial only. Test:packages/pi-agent-cli/tests/test_docker_runner_verifier_head.py. - An extension did not find its own entries with
get_custom_entries(pi-agent-core,pi-agent-harness): the method returned the entries that the session had when the extensions loaded. An entry that an extension wrote withappend_entryin the same session was not in the list. Now the list holds the entries of the session first and then the entries that were written after that, in order. An entry that the session has not written yet has an emptyid. goal-x reads its state only atsession_start, so it was not affected. Audit F7-02. Test:packages/pi-agent-harness/tests/test_harness_extension_state.py. ExtensionAPI.run_asyncraisesRuntimeErrorwhen no event loop runs (pi-agent-core): it calledasyncio.get_event_loop(). With no running loop, Python 3.12 and 3.13 made a loop that never ran (and gave aDeprecationWarning), so the task never ran; Python 3.14 raisesRuntimeError. Now the method usesget_running_loop()and closes the coroutine, and all Python versions raise at once. Behavior change for an extension that called it outside a running loop: it got a task that never ran, and now it gets the exception. No extension in this repository callsrun_async. Audit F7-03. Test:pi_agent_core/tests/test_extension_api_rules.py.- An extension that registers a command name that cannot be used fails to load (
pi-agent-core): the harness finds a command by the text between the/and the first white space. A name that is empty, that holds white space, or that starts with/could never be run, but the clients were told about it.register_commandnow raisesValueErrorfor such a name, asregister_tooldoes for a tool name. Inactivate()this fails the load of that extension and rolls back its other registrations; the other extensions still load. Behavior change: such an extension used to load. Audit F7-04. Test:pi_agent_core/tests/test_extension_api_rules.py. - A directory extension that failed to import stayed in
sys.modules(pi-agent-core): the loader puts the module insys.modulesbefore it runs the file, as the import system does, but it did not take it out when the file raised. The name (_pi_ext_<file name>) is the same for the extension files of all projects, so a half-written module could be found later by that name. Now the entry is taken out, and an older module of the same name is put back. This is also so forsys.exit(). The failure is still infailed, with the same text. Audit F7-05. Test:pi_agent_core/tests/test_extension_loading_rules.py. - The harness logs a warning when an extension tool takes the name of a built-in tool (
pi-agent-harness): the extension tool replaces the built-in tool. This is allowed, and it did not change. But the permission check reads theannotationsof the tool that is in place, so an extension tool that declares itself read-only and is calledbashis not asked about inaskmode, and nothing was logged. Now the harness logs one warning with the tool name and the extension name. Audit F7-06. The harness still sends noToolsUpdateEventwhen a tool is added after the load: nothing in the ACP layer reads that event. Test:packages/pi-agent-harness/tests/test_harness_extension_state.py. - Three notes in the Phase 7 spec are corrected (docs): §3.5 said that
session_startisbefore_agent_start; it is sent once, after the extensions load (§4.3). §3.4 and the docstring ofExecuteFnnow say that the harness callsexecute(tool_call_id, params, signal, on_update)with four positional arguments, and that a function that takes two fails withTypeErrorwhen the tool is called. §14 lists the fields that go into the hash of a journal entry (timeout_msis not one of them). Audit F7-07 to F7-09. - The cleanup of the file queue could keep the temp file of an expired pair (TUI,
pi-file-utils): a pair is a temp file and its<temp>.meta.json, and the age of a pair is theenqueued_atin the sidecar.cleanup_queue_dirdeleted files while it walked the directory. When the walk met the sidecar first, it deleted the sidecar, and then the temp file had no sidecar and was judged by its own modification time, so it could stay until a later sweep. The order of the walk is the order of the file system (by hash on ext4, by creation on tmpfs), so the same code passed on one file system and failed on another. The testcleanup_orphans_uses_sidecar_age_for_pairsfailed on CI after a runner image update. Now the function decides every age first and deletes after that. The same entries are deleted, with the same counts. Test:cleanup_orphans_removes_expired_pairs_whatever_the_listing_order(32 pairs, half with the temp file first and half with the sidecar first).
Known issues
- The
allowlistegress 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, andEgressPolicy.allowed_hostsgoes intorun.jsonand nowhere else. A test on 2026-10-16 reachedexample.org,huggingface.coandhttpbin.orgthrough the proxy. The official list itself hasgithub.com. One agent used this to download the reference solution of its own task, so that run does not count.--egress-mode no-networkrules this out (a task that needsapt-getthen fails).--no-dockerruns share the file system with the agent. Use them for smoke tests only. - Some flags and settings have no effect: in the interactive UI,
--system-prompt-overrideand--rulesdo nothing, and--allowand--denydo not reach the agent.zypi --helpstill lists flags from the upstream project that nobody has checked one by one. On the settings page, the items other than the permission mode may have no effect with the Python agent.remember_tool_approvalsanddefault_selected_permissionwere not tested. [ui.status_line]has nocontextorcostitems with the Python agent: the agent does not tellzypithe size of the context window, the tokens in use or a cost, so these items stay empty, and a script gets nocontext_window.*,cost.total_cost_usd,workspace.branchorworkspace.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-idand--continueget slow with thousands of sessions (TUI,pi-agent-cli): the agent lists its session directory again for each page ofsession/list, so reading all pages costs pages × directory size.--session-idreads 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.--continuetakes 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 secondsession/newwith 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-pyis Alpha (0.2.0): it has no OAuth, MCP resources, prompts, sampling, roots, elicitation ortools/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 emptymcpServerslist (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.zypihas no setting for MCP servers, so only an editor can pass them. The package takes theannotationsof a server as given: in theaskmode, 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: the end-to-end and pseudo-terminal scripts run on Linux (WSL2); the tests of
pi-mcp-pyalso run on Windows. Nobody has started the macOS binary (CI builds it). There is no Windows binary. The Landlock layer of the sandbox was not tested: the kernel of the test machine (5.10) has none.