Repository navigation
fix(skills): survive missing unzip and missing temp dir on Windows - #807
Merged
Merged
Conversation
Skill installs shell out to `unzip`, which stock Windows doesn't have, and download the zip into a temp dir that isn't guaranteed to exist — so every Windows run silently loses its skill (agent path) or dies at install (wizard-native path). The verbose log lives in the same maybe-missing temp dir, so those runs leave no log either. - extract with the first tool that works: unzip → tar (bsdtar on Windows 10+/macOS reads zip) → PowerShell Expand-Archive (win32 last resort) - create the temp dir before curl downloads the skill zip - create the log directory on first write failure instead of dropping every log line silently - make the failure observable: `wizard: skill install failed` analytics event from downloadSkill (both paths), captureException on the agent's install_skill tool path (previously invisible), and error_detail + platform on the wizard-native WizardError so error tracking can separate missing-tool failures from network failures Generated-By: PostHog Code Task-Id: bcb96bcb-e37f-421d-841d-738647c73b8e
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
…g them When a log write still fails after the mkdir retry there's no log file to complain in — captureException once per process (source: log-file-write, with log_path + platform). Dynamic import of analytics because it logs through this module; a static import back would be a cycle. Generated-By: PostHog Code Task-Id: bcb96bcb-e37f-421d-841d-738647c73b8e
Generated-By: PostHog Code Task-Id: bcb96bcb-e37f-421d-841d-738647c73b8e
This was referenced Jul 6, 2026
sarahxsanders
approved these changes
Jul 6, 2026
sarahxsanders
left a comment
Collaborator
There was a problem hiding this comment.
tested on my windows PC
sarahxsanders
marked this pull request as ready for review
July 6, 2026 21:32
gewenyu99
enabled auto-merge (squash)
July 6, 2026 21:37
gewenyu99
added a commit
that referenced
this pull request
Jul 7, 2026
… capture-and-continue on skill install failure Reworks three pieces of this PR per review: 1. rm .posthog-events.json shouldn't be fence-blocked (it isn't on anthropic): Bash sits in BASE_ALLOWED_TOOLS, so the claude-agent-sdk auto-approves it and canUseTool is never consulted — the install/build allowlist only ever bites on pi, where this rm was the #1 denial. wizardCanUseTool now allows exactly `rm [-f] [./].posthog-events.json` (after the operator checks, so chaining still dies), and the "don't delete it" prompt note is gone. The pi host-side cleanup stays as a safety net. 2. The read-before-write pi note treated a self-inflicted problem as a harness fence: pi's write/edit have NO read requirement (verified in pi 0.79.8 source — write is mkdir+writeFile, edit fuzzy-matches oldText; no read tracking exists). The wizard's own shared prompt line ("You must read a file immediately before attempting to write it, even if you have previously read it") is what sent agents to read nonexistent paths. That line now states the accurate rule — read existing files before editing/overwriting; never read a path that doesn't exist yet — and the pi note is deleted. 3. install_skill failure no longer halts. A freestyled integration beats an outright failure, but the run must be measurable: new [SKILL-INSTALL-FAILED] signal, STEP 2 tells the agent to emit it and continue from its own knowledge (noting the missing skill in the setup report), and both harnesses capture a `wizard: agent continued without skill` event with the detail — complementing the tool-level `wizard: skill install failed` event from #807. Generated-By: PostHog Code Task-Id: bcb96bcb-e37f-421d-841d-738647c73b8e
This was referenced Jul 7, 2026
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.
Windows machines often have no unzip. Sometimes the temp folder does not exist. Skill installs failed, and the failures were invisible.
Changes: