Skip to content

fix(join skill): pre-flight diagnose runs SILENTLY, not as narrated debug session - #353

Merged
joelteply merged 1 commit into
canaryfrom
fix/join-skill-silent-diagnose
Apr 30, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/join-skill-silent-diagnose

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Caught minutes after #352 landed. The agent dutifully followed #352's "Pre-flight diagnose" instruction, narrated Bash(gh api rate_limit) + Token is actually fine — gh api rate_limit returns 4860/5000 remaining. gh auth status is misreporting (the issue #341 case). Proceeding with join. to the user, and produced exactly the "looks like a bug" output a Carl typing /join shouldn't see.

What changed in the skill text

Before (added by #352): the agent was told to pre-flight gh api rate_limit to disambiguate before falling through to "real auth failure" — and to narrate that diagnose. Result: Carl sees what looks like the agent debugging itself.

After (this PR): don't pre-flight at all. Just run airc join. Only react to airc join's OWN auth-message output, and even then react minimally:

airc join says… agent does
GitHub rate-limited — retry in 5-15 min (token is fine) tells user verbatim, does nothing else (cmd_connect.sh #344 already disambiguated)
gh auth invalid — run 'gh auth login -h github.com' first runs gh auth login -h github.com -s gist -p https -w silently, surfaces only the device-code line, retries
gh CLI not installed installs + auths, one short line

The principle is now stated explicitly in the skill: Carl running /join should see airc events + outcomes, not auth-handling internals. Internal disambiguation = silent. User-actionable result = one short sentence.

Why we don't need the rate-limit pre-flight at the skill level

cmd_connect.sh's preflight (added in #344) already does the gh api rate_limit probe BEFORE deciding to die. It dies with the right message — either "rate-limited; wait" or "token invalid; re-auth". The skill should trust that and react to the message, not re-do the probe.

Caught from

Joel's two-tab cross-machine test on the QA rig — second Claude tab pulled the new skill (#352), ran /join, and surfaced the misreport-debug to the user. Joel: "to a user it looks like a bug."

Test plan

  • Fresh Carl tab where gh is healthy → /join proceeds with no gh api rate_limit chatter; user sees airc join events directly
  • Fresh Carl tab where token is genuinely revoked → airc join dies with "gh auth invalid" → agent silently runs the login flow, surfaces ONLY the device-code line, retries on success
  • Fresh Carl tab during a secondary rate limit → airc join dies with "GitHub rate-limited" → agent tells user verbatim, does not re-probe

🤖 Generated with Claude Code

…ebug session

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: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant