Repository navigation
pi-python v1.0.0
This is 1.0.0, the first stable release of zycode. All seven Python packages and the TUI go to 1.0.0.
One change can break a set-up that works today: zypi no longer starts python -m pi_agent_cli when you set nothing. It starts zycode-agent. Changed has the details and the one-line fix. Added has the standalone bundle (zypi and zycode-agent in one archive), zypi --setup, a zypi binary for Linux aarch64, and four changes in the agent: usage_update, the max thinking level, auto_compact and the stop reason max_turn_requests. Known issues says what nobody tried yet.
Added
- The agent tells an ACP client how full the context window is:
usage_update(pi-agent-cli): a model inagent.toml([model]or an entry of[[models]]) can havecontext_window, a whole number of tokens. A window belongs to one model, so it is never inherited. A value that cannot be used is dropped, and a note says so at the start of the session. When the model has a window, the agent sendsusage_update(usedandsize) after a turn, after a compaction, aftersession/loadandsession/resume(only when the count is still true), and after a change of model. It never sendscost, because the agent has no price table.usedis the count that the provider gave, plus an estimate for the tool results. After a compaction it is an estimate for the messages that remain. A model with nocontext_windowgets no update: the 128,000 tokens of the core are a placeholder, not a window. Compaction now uses the declared window, with limits that fit small windows (before, it used the placeholder). The VS Code extension already reads the update and shows a Context row.zypiignores it (see Known issues). Tests:packages/pi-agent-cli/tests/test_context_usage.py. Design:docs/specs/2026-11-13-agent-context-usage.md(#131). - The
maxthinking level (pi-agent-core,pi-agent-cli):thinking_level = "max"is a seventh level, abovexhigh. DeepSeek V4, OpenAI GPT-5.6 and later, Anthropic adaptive models, Kimi K3 and GLM 5.x have it as their highest effort. The OpenAI format (gateways too) sendsreasoning_effort = "max", andxhighstill sends"high". DeepSeek's own API getsreasoning_effort = "max", as it does forxhigh. Anthropic gets the budget ofxhigh(budget_tokens = 40000), because a budget has no step above it.maxis open for every model. A model that does not take it answers with an error, and the agent lowers nothing. A test checks that each of the three tables names every level, because a level that a table lacks sends no parameter, and the model then silently does not think. Record:docs/specs/2026-11-16-thinking-max-and-turn-limit.md(#131). auto_compactand the stop reasonmax_turn_requests(pi-agent-core,pi-agent-cli):auto_compact = true | falseis a new optional key at the top ofagent.toml. The key wins. When it is not set, compaction is on for a model that has a declaredcontext_windowand formax_turnsof 30 or more, and off in the other cases (before, onlymax_turnsof 30 or more turned it on). After a change of model, the rule decides again.auto_compact = truefor a model with no window assumes 128,000 tokens. When the loop reachesmax_turns, the stop reason is nowmax_turn_requests(before:end_turn). Any other error is stillend_turn. The text of the error has one source:MAX_TURNS_MESSAGEinpi_agent_core/types.py. The VS Code extension shows "The turn ended: max_turn_requests." andzypisays "done" (#131).- The VS Code extension can offer
max(vscode/): the Thinking menu listsmax, but only for an agent of version 1.0.0 or later (MAX_LEVEL_SINCEinsrc/core/thinking.ts), because an older agent readsmaxasoffand says nothing. The extension reads the version from theinitializeanswer of the agent. This release is not an extension release. The extension bundles the agent thatvscode/agent-assets.jsonpins (0.9.1 today), so the menu changes only when an extension release moves the pin (#131). - Terminal setup command
zypi --setup: Added--setupflag tozypito directly launch the agent's interactive setup dialog in the terminal to configure the provider, model, and API key before running interactive sessions. - Combined standalone bundles (
zycode-<target>-<version>.tar.gz):packaging/agent/build.pyhas a new option--bundle-from-archive, and theAgent binariesworkflow uses it after theReleaseworkflow. It packszypi(thezypi-*file of the Release) andzycode-agent(the agent archive of the same platform) at the root of one archive (mode0755). A bundle exists forlinux-x86_64,linux-aarch64anddarwin-aarch64, and the step fails when it cannot make one of the three. The user needs no Python. - Linux aarch64 TUI binary in release workflow: Added
build-tui-linux-armjob to.github/workflows/release.ymlonubuntu-24.04-armto build and publishzypi-linux-aarch64. - A design record for the Omarchy Linux Agent menu (docs):
docs/specs/2026-11-15-omarchy-agent-pr.mdhas the patch that adds zycode (zypi) to the Agent menu of Omarchy Linux, with the mise declaration and the test notes. The patch is a draft: see Known issues.
Changed
- Behaviour change:
zypistartszycode-agent, and no longer falls back topython -m pi_agent_cli(TUI):zypilooks forzycode-agent(zycode-agent.exeon Windows) next to its own executable (a symlink is followed), and then onPATH. The order is:PI_AGENT_COMMAND, then[agent].command(inagent.tomlorconfig.toml), thenPI_PYTHON(only when it is set and not empty; it runspython -m pi_agent_cli), thenzycode-agent. Before,zypiranpython -m pi_agent_cliwhen you set nothing. If you installed the agent withpip install pi-agent-cli-lcand you run a standalonezypi, setPI_PYTHONto the Python that haspi-agent-cli-lc, or setPI_AGENT_COMMAND, or use the bundle (see Added), which has both programs. - Version 1.0.0 for every package: all seven Python packages (
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-mcp-py) and the TUI crates (pi-pager-bin,pi-version) go to1.0.0. The first three change their classifier fromDevelopment Status :: 4 - BetatoDevelopment Status :: 5 - Production/Stable. The four extension packages never had aDevelopment Statusclassifier, and they still have none. The README, the docs and the site name 1.0.0 as the current release. - A
thinking_levelthat is not a level is stilloff, and a note says so (pi-agent-cli): it wasoffwith no word, so a typo looked likeoff. The note comes at the start of the session (#131). agent.example.tomlhas new example values (pi-agent-cli):max_turns = 200(it was 50) andcontext_window = 1000000(it was 128000). The default ofmax_turnsin the code is stillNone(no limit) (#131).- Refusal message for
zypi --oauthupdated to direct users tozypi --setup. - Updated spawn error messages to guide placing
zycode-agentnext tozypior settingPI_AGENT_COMMAND/PI_PYTHON.
Known issues
The known issues of 0.9.0 still hold, except where an item below says otherwise.
zypiignoresusage_update(TUI): the agent sends it now, butzypihas no code that reads it. Thecontextitem of[ui.status_line](a known issue of 0.9.0) stays empty, and so doescost.zypidoes not fail on the update only becausetui/Cargo.tomlturns on the featureunstableofagent-client-protocol, and the pager has a catch-all arm for the updates that it does not use. Do not remove that feature without a new check (#131).- The count in
usage_updateis partly an estimate (pi-agent-cli): the tool results of a turn, and the whole count after a compaction, are estimates (4 characters for 1 token, which is too low for CJK text). The next model call gives an exact number. A window that is too small can show more than 100 %. A change to a model with no window leaves the old numbers on the client, because ACP cannot clear them (#131). maxwas not sent to a real provider (pi-agent-core): the tests use scripted models and a fake OpenAI-format server. Nobody sentreasoning_effort = "max"to a real gateway or to api.openai.com, and nobody tried the Anthropic path (langchain_anthropicis not in the dev environment). The documentation of Anthropic says that Claude 4.7 and later refuse the budget form that the agent sends. This is not verified. Adaptive thinking witheffortis not built (#131).- A client may show
max_turn_requestsas a failure: the VS Code extension shows a line of notice, andzypisays "done". Nobody checked another client (#131). - The
maxitem of the VS Code menu was not tried in a real VS Code window with a real agent of 1.0.0 (vscode/): the tests use a fake agent that reports a version. A released extension has six levels. For a user who writesmaxinagent.toml, its menu showsoff, and a note says that the agent does not knowmax. For the 1.0.0 agent that note is wrong. Nothing breaks (#131). - Nobody ran
zypifor Linux aarch64 or macOS arm64 by hand: CI builds them. The macOS binary is not signed and not notarized. The Linuxzypineeds glibc 2.39 or newer. - The Omarchy patch is a draft with two defects that are not fixed:
docs/specs/2026-11-15-omarchy-agent-pr.mdhas a patch for the Agent menu of Omarchy Linux, and a draft PR in the Omarchy fork has the same patch. A review found two defects. The mise declaration resolveslatestto the oldest release, and the agent idzycodeis not the name of a command (the command iszypi). Do not send the patch to Omarchy before both are fixed.