Repository navigation
fix(zcode): re-add ZCode support with prompt-unwrap and resume-keep fixes - #1049
Closed
26018gongyuan-boop wants to merge 1 commit into
Closed
26018gongyuan-boop wants to merge 1 commit into
26018gongyuan-boop wants to merge 1 commit into
Conversation
…ixes DietrichGebert#1040 dropped ZCode because it could not be tested. Field debugging on ZCode 3.x (Windows) found the two behaviors that made it look broken, both now fixed and live-verified: - ZCode renders a slash command as a markdown link, so UserPromptSubmit prompts arrive as [$ponytail](path) args; the mode tracker now unwraps that form. Bare /ponytail, @Ponytail and $ponytail pass through unchanged. - ZCode resumes its runtime right after a slash-command prompt, firing SessionStart(resume) that reset a just-switched level to the default within seconds; activate now reads the hook payload's source and, on ZCode only, keeps the live level across resume/compact. Other hosts keep their long-standing reset behavior. Restores the isZcode detection, the strict-JSON output branch (DietrichGebert#798), the hook test and the INSTALL/portability rows removed by DietrichGebert#1040.
Owner
|
Thanks! I removed ZCode in #1040 because I can't test it myself, and I only keep hosts I can verify. |
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.
Follow-up to #1040, which dropped ZCode because it could not be tested. ZCode 3.x
has now been debugged end-to-end on Windows with live hook instrumentation; the two
behaviors that made it look broken are fixed and live-verified, so this restores
ZCode as a supported host with those fixes on top.
What was wrong on ZCode
/ponytail ultraas[$ponytail](<skill path>) ultrain the UserPromptSubmit payload, so thetracker's
^[/@$]ponytailmatch never fired and level switches silently didnothing. The tracker now unwraps that form — gated on
isZcode, so a[ponytail](url)link pasted at the start of an ordinary prompt on ClaudeCode / Codex / other hosts stays silent exactly as before.
and resumes the session right after a slash-command prompt, firing
SessionStart(resume) seconds after the tracker wrote the new level; activate's
unconditional
setMode(getDefaultMode())then reset it to the default. activatenow reads the hook payload's
sourceand, on ZCode only (resume/compact), keepsthe live flag. Other hosts keep their long-standing reset behavior — verified
byte-identical per host and stdin shape against 552acd5.
Restored from #1040
isZcode detection (ZCODE_APP_VERSION), the strict-JSON output branch (#798), the
ZCode hook test, and the INSTALL.md / docs/agent-portability.md rows.
Notes
(Bug: Claude Code freezes indefinitely on Windows after installing Ponytail #443/UserPromptSubmit hook still hangs to full timeout on Windows — #443 fix's setTimeout is unref'd #790) and exits only after stdout flushes (Windows pipe truncation guard);
covered by a new self-exit test in tests/hooks-windows.test.js.
started from inside a ZCode terminal inherit ZCODE_APP_VERSION and are detected
as ZCode.
assertion; fails identically on 552acd5, passes on Linux CI). Everything else
passes: 127/128 locally including the restored + new ZCode cases, hooks-windows
10/10, pi-extension 28/28.