Repository navigation
This is a minor release. It adds mid-turn steer and the /btw side chat, adds skills as /skill:<name> slash commands, adds replay_reasoning to send the thinking back to a gateway, builds the agent program with pinned versions, fixes Auto for Git Bash on Windows, fixes three faults of the steer and cancel code, and moves the repository to zy1233/zycode. All eight Python packages and the TUI move to 1.2.0.
Added
- Mid-turn steer and the
/btwside chat (pi-agent-cli,pi-agent-harness, TUI, VS Code extension): two new items on the ACP wire of zycode,pi/session/steer(X9) andpi/session/btw(X10), with their notificationspi/queue_updateandpi/btw_update(register:docs/specs/2026-11-05-acp-extension-registry.md; design:docs/specs/2026-11-26-pre-refactor-steer-and-btw-design.md; #157). Only a client that opts in uses them (zypiand the VS Code extension do; the agent announces both ininitialize). Steer: while a turn runs, the user can send one more message. The agent keeps it in the steer queue ofAgentHarnessand shows it to the model at the next turn boundary. A tool that runs is not stopped. A steer that arrives after a cancel is refused (aborting). A steer that the model has not seen when the run ends (an error,max_turns, a stop hook, a cancel) is dropped beforeprompt()returns, andpi/queue_update(clearedByAbort,clearedSteerIds) tells the client, so that the client can put the text back in the draft and nothing reaches a later prompt. When the run has already ended, the agent answersidle, and the client sends the text as a normal prompt./btw <question>: a side chat. The agent answers from a read-only copy of the session with no tools, also while a turn runs, and it writes nothing to the chat file. It sends the whole context (the system prompt, the user and assistant text, and the tool results cut to 4000 characters) to the model of[btw].model, which can be another provider with another key. The new[btw]table ofagent.tomlhasmodel(empty: the model of the session),thinking(off, the default, orinherit) andtimeout_seconds(5 to 600, default 120). A client that did not opt in does not see/btwin the command list, and a literal/btw ...prompt gets a short notice and runs no turn. In the VS Code extension, the Send button is Steer while a turn runs, the queued steers show above the message box, and/btwopens a side panel with follow-up questions, Stop, and Esc to close it. An agent without the two items leaves the extension as it was. Tests:packages/pi-agent-cli/tests/test_steer_and_btw.py,vscode/test/steer-and-btw.test.ts, the unit tests ofpi-acp-lib, andtui/crates/codegen/pi-pager/tests/python_agent_e2e.rs. Three faults in the steer code are in Fixed. This entry was missing when 1.2.0 was tagged. It was added on 2026-11-27, after the release, and the text of the GitHub Release was made again from this section. - Skills as
/skill:<name>slash commands (pi-agent-cli,pi-agent-harness): the agent lists every loaded skill in the ACPavailable_commands_updateasskill:<name>, with the description of the skill and an<args>hint. It does so also when no extension registers a command, and also for a skill withdisable-model-invocation(only the user can call such a skill).AgentHarness.prompt("/skill:<name> [args]")turns the text into the prompt of the skill (format_skill_invocation), so a client needs no skill menu of its own. An extension command with the same nameskill:<name>wins over the skill, in the list and when it runs. The chat list and the replay of a loaded chat show the line that the user typed (/skill:<name> [args]), not the text of the skill; the newskill_invocation_commandreads that line back from the stored text, and the model reads the same text as before (#152). replay_reasoning: send the thinking back to a gateway (pi-agent-core,pi-agent-cli,pi-dynamic-workflows):Model.replay_reasoningand the keyreplay_reasoningin[model]and in each[[models]]entry (never inherited; a value that is nottrueorfalseis dropped with a note). When it istrueand thinking is on (Model.reasoningand a level other thanoff), a request to aprovider = "openai"gateway (or aprovider = "deepseek"gateway) carries the thinking of each earlier assistant message asreasoning_content, in the shape that DeepSeek's own API gets (an empty string for a turn with no thinking, plain-textcontent). Before,provider = "openai"kept the streamed thinking for the client but sent none of it back. A model that thinks across tool calls then lost its own line of thought and worked out the same conclusions again in every turn (a session of the VS Code extension spent 79 % of 39 minutes in 29 large thinking turns). It is opt-in, because the OpenAI API and some gateways refuse an unknown field of a message. When an endpoint answers 400 or 422 and namesreasoning_content, before the first chunk,langchain_streamasks again at once without the thinking; when that works, the agent sends no thinking to that(base_url, model_id)until the process restarts, and logs a warning that names the setting. Any other error is not taken for a refusal. DeepSeek's own API still gets the thinking back by itself and is never asked again without it. Verified with fake servers, and once with a real gateway (the result is at the end of this item).scripts/probe_reasoning_replay.pyis the check to run against another gateway (with your own key inREAL_LLM_API_KEY): it runs a small task withreplay_reasoningoff and on, in which the model keeps two numbers in its thinking across a tool call, and it reports whether the gateway takes the field (with the raw text of the error when it does not), whether the agent recovers, and whether the model uses the thinking it gets back. The same task is areal_llmtest,pi_agent_core/tests/test_real_llm_replay.py. Result (2026-11-26): the project owner ran the probe against a local OpenAI-format gateway with a real model (provider = "openai", thinkinghigh; four calls of the script, 28 runs: 14 with replay on and 14 with replay off). The gateway tookreasoning_contentin all 14 runs with replay on (no 400 or 422; in one run the value was an empty string, for a turn with no thinking). 18 runs gave a clean memory result: with replay on, the model gave its own two numbers back in 10 of 10 runs; with replay off, in 0 of 8 runs (it gave other numbers). In the other 10 runs the test could not run: the first thinking of the model had no number in 7 runs and no thinking at all in 2 runs, and in 1 run only one of the two numbers matched, which can be chance. Still not verified: the error text of a gateway that refuses the field (this gateway took it every time, so the refusal path ran only against fake servers); a gain in a real session (the task of the probe has two to four turns: the last turn had about 130 characters of thinking with replay on and about 250 with replay off, mean over the 14 pairs, and a run took 0 to 1 s less, a hint and not a measurement); other gateways and models (the run does not show which provider answered behind the gateway).
Changed
-
New version numbers (all eight Python packages, TUI):
pi-agent-core-lc,pi-agent-harness-lc,pi-agent-cli-lc,pi-web-access-py,pi-goal-x-py,pi-dynamic-workflows-py,pi-codemode-py,pi-mcp-py, and the TUI crates (pi-pager-bin,pi-version, andtui/Cargo.lock) move to1.2.0.pi-agent-core-lc,pi-agent-harness-lcandpi-agent-cli-lcpin each other with==1.2.0, and all five extension packages raise their workspace floors to>=1.2.0. -
The agent program is built with pinned versions, the LangChain packages have an upper bound, and a test reads the private LangChain methods that the adapters use (
pi-agent-core,packaging/agent): thebuildjob ofagent-binaries.ymlnow installs withpip install -c packaging/agent/constraints.txt. The file pins the 74 packages that the build pulls in (PyInstaller too), with one resolution for the five platforms (uv pip compile --universal, Python 3.12). Before, each build took the newest version of every dependency on the day of the build, so the same commit made a different program on a different day, and nobody had tested the mix (on 2026-11-27 that wasopenai3.60 andlangchain-core1.8, where the development environment hadopenai2.54 andlangchain-core1.5).packaging/agent/constraints.inhas the list of packages, the command that makes the file again, and a check that every pin has a wheel for each of the five platforms. The first run of that check found thatcryptography49 and later have no macOS x86_64 wheel (PyPI hasarm64wheels only), so thedarwin-x86_64build would have compiled it with Rust; the build now hascryptography<49.langchain-core,langchain-openai,langchain-anthropicandlangchain-deepseeknow have the upper bound<2:pi_agent_core/adapters/overrides private methods ofChatOpenAIandChatDeepSeek(_get_request_payload,_convert_chunk_to_generation_chunk, and it calls_convert_input), and a release that changes one of them could drop the thinking of the model with no error. The newpi_agent_core/tests/test_langchain_private_api.pyreads these signatures and fails with the name of the method;scripts/tests/test_agent_constraints.pychecks that the pins, the install step,constraints.inand the bounds of thepyproject.tomlfiles agree.ci.ymlnow installs thedeepseekextra, so the tests ofChatDeepSeek(test_deepseek_replay.pyand others) run in CI and are not skipped.langchain-mcp-adaptershas no upper bound on purpose:pi-mcpcalls two public functions of it (create_session,load_mcp_tools) and overrides none of its classes. The other jobs, and apip installby a user, have no pins. Checked on 2026-11-27:uv pip install --dry-runfinds wheels for the pins on the five targets, and the Windows build with the pins passed the smoke test, the ACP contract tests and the frozen sandbox tests. The Linux and macOS builds run only in CI. -
The GitHub repository is now
zy1233/zycode(metadata, docs,vscode,web, release):zy1233/pi-pythonwas renamed on 2026-11-27. The repository id did not change, and the old address redirects (web pages,git, release downloads), so an old link, clone or download still works. This change puts the new address in the places that name it: theHomepage,Repository,IssuesandChangelogentries of the eightpyproject.tomlfiles (they reach PyPI with this release), the READMEs that PyPI shows, the two READMEs of the repository,vscode/package.json, the README and the changelog of the extension,vscode/agent-assets.json(the place where the bundled agent is downloaded from), the site (web/), the install commands in the docs, the user agent ofscripts/auto_eval.py, and the title of a GitHub Release (zycode <tag>; it waspi-python <tag>). The names that users depend on do not change: the PyPI package names, the module names and the home folder~/.pi-python. The trusted publishers of Open VSX and of the Marketplace were made again for the new name (record invscode/RELEASING.md), and Cloudflare keeps the repository ofzycode-webby its id (web/README.md). Checked on 2026-11-27: the Cloudflare build ofzycode-webfor the first commit after the rename succeeded (the live site has the new link and no old one), and a dry run of theVS Code extensionworkflow built the five VSIX files with the agent downloaded fromzy1233/zycode. Not verified: a publish to Open VSX or to the Marketplace after the rename (a dry run does not call a registry), and the pages of the packages on PyPI (they change with this release).
Fixed
-
Auto asked about every path of the project when the Bash tool is Git Bash (
pi-agent-cli): Git Bash and MSYS2 on Windows read/c/work/appasC:\work\app, and the model writes the project folder that way (cd /c/work/app && git log). Auto read the same text as\c\work\app, a folder that is not there, so each path of the project looked like a path outside it (path.outside_project). In one session of the VS Code extension on Windows, 84 of 85 decisions of Auto were asks. The session now gives the rules the mount points of the shell of the Bash tool (one for each drive for Git Bash and MSYS2; none for thebash.exeof WSL, for Cygwin, for a shell that is not known and for a host that is not Windows). The rules turn a path word that starts with a mount point into the folder of the mount before they resolve it (any path word,cd,git -C). Every other rule applies to the result as before (the protected set, the secret names, the project trust), a..above the mount point asks (path.mount_dotdot), and the paths ofwriteandeditare paths of the host and do not change.AutoContexthas the new fieldshell_mounts, and the check of the context says when the folder of a mount is not absolute.scripts/auto_mutation_check.pynow runs on Windows too. -
A steer could be lost, and a cancel from an earlier turn could end the next prompt (
pi-agent-harness,pi-agent-cli): three faults in the steer and cancel code of #157, found by an architecture audit. Each fault has a regression test (packages/pi-agent-harness/tests/test_harness_agent.py,packages/pi-agent-cli/tests/test_steer_and_btw.py) that fails on the code before this change: 5 of the 8 new tests fail there, and the other 3 are controls that pass before and after. (1) The agent loop takes the steers out of the queue at the end of a turn. Whenmax_turnsor a stream error then ended the run before the loop showed the steers to the model, the harness did not report them: the text of the user was lost, and the client got nopi/queue_updatewithclearedSteerIds. The harness now keeps an entry for each steer untilmessage_startshows it to the model (orabort()reports it). A run that ends reports every steer that the model never saw, in the order of the calls ofsteer(). The limitmax_turnsworks as before; only the report is new. (2) The harness found its steers byid(message)and held no reference to the message, so CPython could give the id of a freed steer to a later message. The entry now holds the message,steer_id_for()andis_steered_message()also test that it is the same object, and the agent gives a message to Auto only when its role isuser(invariant 9b: Auto gets text of the user, never the text of a tool). The fault needed a stale entry, and fault (1) made one, so it was rare (3 of 300 runs in a test of the audit). (3)begin_abort()raised a counter, and a prompt ended as aborted while the counter was above zero. That also hit a prompt that came after a cancel, when theabort()of the cancel was still sending notifications (a slow client). Thatabort()also waited for the next run to end, sois_abortingstayed true for all of it, andpi/session/steergotreason: "aborting". A prompt now notes the number of cancels when it begins, and ends as aborted only for a cancel that comes after that.abort()waits only for the run (or the idle) that it saw when it began.