Repository navigation
Conversation
…wning app-server The provider spawned `zcode app-server --stdio` per turn and minted its own credentials, duplicating what the zcode CLI already owns and skipping the user-level daemon. T3 now attaches to `zcode serve`: it reads the daemon status file for the port and ingress token, starts the launcher detached only when no daemon is running, and streams the v4 conversation channel. Channel calls map onto the existing adapter surface and interactions resolve through `resolveInteraction`. Account-config pushing and the credential module are gone; the daemon owns the exchange.
A resumed session advertises its models under snapshot.settings.model.available, but subscribeSession parsed the model object itself, so availableModels stayed empty. The next send then omitted reasoningLevel, which GLM-5.3 requires. Parse the available list and cover the resumed send in the adapter test.
panudetjt
force-pushed
the
t3/zcode-serve
branch
from
November 12, 2026 03:21
fd2fdc9 to
be69234
Compare
Owner
Author
|
The |
Owner
Author
|
Superseded by upstream pingdotgg#34713, which carries pingdotgg#33684 plus this migration on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on pingdotgg#33684 (
feat/provider-zcode). Follow-up to Discussion pingdotgg#34215; provider idea in pingdotgg#33685.Problem
The ZCode provider spawns
zcode app-server --stdioand plays the CLI's host half, so T3 Code has to read the CLI's encrypted credential store and mint project access tokens through Z.AI's business endpoints itself.zcode servealready owns that exchange in vendor code, on the same long-running surface the desktop app uses.Fix
The provider now attaches to
zcode serveinstead of spawning a host per turn.~/.zcode/server/run/status.jsonand the ingress token, requests a host capability, and connects to/ws/host. It startszcode servedetached only when no daemon is healthy, and never owns or stops a shared daemon.zcode-session.createSession,zcode-agent.resumeSession/sendPrompt/readSession/setMode/compactSession).subscribeConversationV4plusonDynamicConversationFrame), filtered byconversation/<sessionId>.resolveInteraction.provider/updateAccountConfig, theinteraction/requestProviderRuntimeHeadershandler, andzcodeRequestAuth.ts; the daemon owns credentials end to end.session/subscribe, so the next send still carries the model's reasoning level (separate commit).launchArgsis forwarded tozcode serve.Testing
vp test run packages/provider-zcode apps/server/src/orchestration-v2/Adapters/ZcodeAdapterV2.test.ts— 70 passedvp run check:changed— pass (typecheck 42 packages, lint, fmt, knip, tests)zcode3.17.2 / provider v0.17.1 running as a shared user daemon (pid unchanged across the whole pass): provider status, GLM model picker, streaming turn, AskUserQuestion, steering, interrupt,/compact, and resume after a T3 server restart.Reasoning level is required for account:.../GLM-5.3after a restart. The adapter parsedsettings.modelinstead ofsettings.model.available, soavailableModelswas empty on resume. Covered by the resume case in the adapter test, which fails without the fix.Evidence
Walkthrough video (53s)
Made with DeepSeek V4.1 Flash in T3 Code (OpenCode harness).