fix(aside): run the probe deadline through a function so zsh can detect Aside - #2848
Closed
welchsteven wants to merge 1 commit into
Closed
welchsteven wants to merge 1 commit into
welchsteven wants to merge 1 commit into
Conversation
…ct Aside
The BROWSER SETUP probe stored its deadline wrapper as a string and ran it as
a bare word:
_T="gtimeout 30" # or "timeout 30", or "perl -e alarm(shift);exec(@argv) 30"
$_T aside repl ...
zsh does not word-split unquoted parameter expansions, so it looks for one
command literally named "gtimeout 30", fails, and prints ASIDE_NOT_RUNNING
against a healthy Aside. Every browse-family skill then falls back to $B, and
zsh users (the macOS default shell) lose their real signed-in sessions.
The deadline is now a _gs_bounded() function passing "$@", which needs no word
splitting and behaves the same in zsh, bash and sh. The two string-preserving
fixes both regress someone: ${=_T} is zsh-only and breaks POSIX sh, and eval
breaks the stock-macOS path. The perl fallback string only works when it is
word-split and never re-parsed, so eval turns it into "syntax error near
unexpected token '('" in every shell, including bash users on a stock Mac who
detect Aside correctly today. Inside the function the perl program is quoted,
and the deadline is verified to fire (alarm 2 vs sleep 10: exit 142 after 2s).
The failure branch now captures the probe output and prints PROBE_OUTPUT,
so "No browser window is open for account ..." (Aside running, profile signed
out or windowless) is distinguishable from the app being down. Rule 2 already
asked agents to quote the probe output verbatim; the old grep -q discarded it.
test/aside-driver.test.ts asserted the buggy strings verbatim, which is how the
bug survived. It now asserts the function form and guards against the string
form returning. Regenerated with gen:skill-docs; the three ship goldens get the
same block by surgical replacement.
Refs garrytan#2842, garrytan#2824.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
This was referenced Sep 14, 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.
Why (in your own words)
On macOS the default shell is zsh, and agent harnesses usually run their shell tool as zsh too. Under zsh, the BROWSER SETUP probe reports
ASIDE_NOT_RUNNINGon every run, even with Aside installed, running and signed in, so every browse-family skill silently falls back to$Band the user loses their real logged-in sessions. The probe stores its deadline as a string (_T="gtimeout 30") and runs$_T aside repl …, and zsh doesn't word-split that, so it searches for a single command namedgtimeout 30. This PR makes the deadline a small_gs_bounded()function instead. A function passing"$@"needs no word splitting, so it behaves the same in zsh, bash and sh. It also makes the failure branch print why it failed, so a signed-out or windowless Aside is no longer reported as "not running".Relationship to #2824
#2824 (@AntonioVitalic) diagnosed the same bug first and fixes the common case, zsh with Homebrew
gtimeout. I'm opening this as an alternative because itsevalform regresses stock macOS. The perl fallback stringperl -e alarm(shift);exec(@ARGV) 30only works when it is word-split and never re-parsed, andevalre-parses it, so the probe hitssyntax error near unexpected token '('in every shell. That includes bash users on a stock Mac who detect Aside correctly today (matrix below). Happy for this to be folded into #2824, or closed in its favour if it adopts the function form.Fixes #2842.
Live evidence
macOS 26.6.2, zsh 5.9, Aside CLI 1.26.906.1630, Aside signed in.
The bug, reproduced:
The fix:
All three probes on a stock-macOS PATH (
/usr/bin:/bin:/usr/sbin:/sbinplus~/.local/bin: nogtimeout, notimeout, only/usr/bin/perl), plus the Homebrew case. #2824 was rebuilt by hand from its diff, not run from its branch:origin/maineval)What
grep -qhides on #2824's stock-macOS path:The perl deadline inside the function really fires:
The new diagnostic, captured live while the Aside profile was signed out.
grep -qused to throw this away, although rule 2 already told agents to quote it:Tests:
Scope
scripts/resolvers/aside.ts(the probe and theASIDE_NOT_RUNNINGguidance);test/aside-driver.test.ts(it asserted the buggy strings verbatim, which is how the bug survived; it now asserts the function form and guards against the string form coming back); 20 SKILL.md files regenerated withbun run gen:skill-docs; the three ship goldens, updated only in the probe block because no script regenerates them.browse/SKILL.mdunder zsh, bash and sh against a real, signed-in Aside, on both the Homebrew PATH and a stock-macOS PATH, then driving a real page throughaside repl.timeoutbranch (no Linux machine; it has the same shape as thegtimeoutbranch), Windows, or the paid evals. The full free suite shows 17 failures in 8 files. None of those files reference the resolver or the generated docs, and two of them, re-run on a cleanorigin/maintree, failed the same way.Liveness proof (required)
Checklist
GSTACK PRtyped live into a real surface (not edited onto the image)🤖 Generated with Claude Code