Repository navigation
fix(join skill): auto-trigger gh auth login instead of dumping a manual command on the user - #352
Merged
Merged
Conversation
Carl on the other tab tried /join, hit 'gh auth invalid', and saw the agent dump 'Run this in the prompt: ! gh auth login -h github.com -s gist' back at them. Joel had to close Claude and re-auth manually. install.sh already does this auto-trigger when stdin is TTY (via #339); the skill just had stale text saying "install + 'gh auth login'" without telling the agent to RUN it. Updated /join SKILL.md section 1: - Spell out the auto-trigger pattern explicitly: agent runs `gh auth login -h github.com -s gist -p https -w` itself via Bash. -h/-p/-w skip every interactive prompt; -w uses browser device code; gh blocks until the user completes auth in the browser → Bash blocks with it → success returns → agent continues to airc join. - Note device-code-line surfacing — Bash output buffering can hide it if the agent isn't deliberately quoting it back to the user. - Add the rate-limit-vs-real-auth pre-flight (mirrors the cmd_connect.sh fix from #344): probe `gh api rate_limit` first; if reachable, the token is fine and gh is misreporting a secondary-rate-limit 403 as 'token invalid'. Tell the user to wait, not re-auth. Doc-only — no code change. The skill text is the agent's runtime prompt; updating it changes behavior on the next /join invocation across every Claude Code session that picks up the new skill. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
3 tasks
joelteply
added a commit
that referenced
this pull request
Apr 30, 2026
…ebug session (#353) Previous fix (#352) added a 'pre-flight diagnose' step that the agent narrated to the user — Carl typing /join saw 'running gh api rate_limit ... token is actually fine ... issue #341 case ... proceeding with join'. That looks like a bug. The diagnose should be a silent gate, not a story the user sits through. Reframed the section: don't pre-flight at all. Just run airc join. If airc itself surfaces a gh-auth message (rate-limited / token invalid / auth invalid), react minimally: - 'rate-limited' → tell user verbatim, do nothing else (airc already disambiguated via #344's cmd_connect.sh pre-flight; re-probing is redundant and chatter) - 'token invalid' → run 'gh auth login -h github.com -s gist -p https -w' silently, surface only the device-code line for the user, then retry - 'gh missing' → install + auth, one short line, proceed The principle stated explicitly: Carl running /join should see airc events + outcomes, not auth-handling internals. Internal disambiguation silent; user-actionable result one short sentence. Joel caught this on the 2-tab cross-machine test minutes after #352 landed — the agent dutifully followed #352's instructions, ran the narrated pre-flight, and produced exactly the "looks like a bug" output Carl shouldn't see. Co-authored-by: joel <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced Apr 30, 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.
Carl on a fresh tab tried
/join, hitgh auth invalid, and saw the agent dump:Joel had to close Claude and re-auth manually. install.sh already does the auto-trigger when stdin is TTY (via #339) — the skill just had stale text saying "install +
gh auth login" without telling the agent to RUN it.Change
Updated
skills/join/SKILL.mdsection 1:gh auth login -h github.com -s gist -p https -witself via Bash. The-h/-p/-wflags skip every interactive prompt;-wuses the browser device code; gh blocks until the user completes auth in the browser → Bash blocks with it → success returns → agent continues toairc join.First copy your one-time code: XXXX-XXXXline if the agent isn't deliberately quoting it back to the user.gh api rate_limitfirst; if reachable, the token is fine and gh is misreporting a secondary-rate-limit 403 as 'token invalid'. Tell the user to wait, not re-auth.Why it's doc-only
Skills are markdown — the file IS the agent's runtime prompt. Updating it changes behavior on the next
/joininvocation across every Claude Code session that picks up the new skill (viaairc updateor fresh install). No code change needed.Caught from
Joel's two-tab cross-machine test on the QA rig — second Claude tab tried /join, told user to re-auth, user had to close Claude. The skill should mirror what install.sh already does.
Test plan
/jointriggersgh auth loginautomatically; user clicks browser link; auth completes; airc join proceeds — no "close Claude and re-run" friction/joinsays "GitHub rate-limited, wait 5-15 min" instead of triggering an unneeded re-auth🤖 Generated with Claude Code