Skip to content

skills+integrations: /repair skill, port-collision warning, error-class docs - #20

Merged
joelteply merged 1 commit into
mainfrom
feat/skills-repair-and-port-collision
Apr 16, 2026
Merged

joelteply merged 1 commit into
mainfrom
feat/skills-repair-and-port-collision

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Today's bug tour crammed years of user pain into one day: port-7547 collision between two hosts on the same Tailscale IP, memento silently paired with the wrong host for hours, stale-auth resume looping invisibly, and the docs said "try teardown and re-pair" without `--flush` — the exact wrong advice.

The code fixes landed in #17 (auth-error surfacing), #18 (resume auth probe), and the port-collision diagnosis. This PR aligns docs + skills with the new reality so future users and agents don't hit the same footguns.

New

  • /repair skill — nuclear one-command re-pair: reconstructs the saved invite from config, runs teardown --flush && connect. Takes optional invite argument if you need to repair onto a new host.

Updated skills

  • /connect — paste invite VERBATIM including :port; troubleshooting covers the resume-auth-probe case + wrong-host-on-shared-machine
  • /teardown — explicit rule for when to use --flush (the half-measure is a footgun)
  • /resume — documents the auth probe + follow the repair command from stderr
  • /invite — warns to include the port when non-default
  • /send — replaced misleading "try teardown and re-pair" with the three actual error classes (auth / network / pending-cap) and correct repair for each

Updated integrations

All six (claude-code, cursor, generic, openai-codex, opencode, windsurf) now document:

  • Auth vs network error distinction
  • Repair sequence
  • Port-collision symptom
  • Lifecycle markers ([joined], [left], [QUEUED], [DRAINED], [AUTH FAILED])

Why now

After today's hotfixes, the error messages the code prints are correct. But the docs a user reads first still had the broken-by-default guidance. A user following old docs would follow the wrong repair path and stay broken.

… docs

Today's production story crammed years of user pain into one day: two
hosts fighting over port 7547, memento paired with the wrong host for
hours, sends that "succeeded" into a different mesh, resume silently
retrying forever on stale auth. The code fixes landed in #17/#18; this
PR fixes the DOCUMENTATION + SKILLS so future users/agents don't
rediscover the same footguns.

## New skill: /repair

One-command nuclear re-pair. Reconstructs the saved invite string
from config, then runs `airc teardown --flush && airc connect <invite>`.
Replaces the error-prone "teardown (forgot --flush) + resume (silent
auth fail)" dance that bit memento today. Takes optional invite argument
to repair onto a new host (useful when you discover you were on the
wrong mesh).

## Updated skills

- /connect: paste invite VERBATIM including `:port` — trimming silently
  pairs with whoever's on default 7547. Troubleshooting section now
  covers the resume-auth-probe failure mode + the wrong-host-on-shared-
  machine case.

- /teardown: explicit --flush vs plain-teardown decision rule. "Rule of
  thumb: if anything about your pairing feels uncertain, use --flush."

- /resume: documents the new auth probe. Failure mode now says follow
  the repair command verbatim from the stderr output.

- /invite: warns to include the port in the pasted string when non-default.
  Tells the user to call out `:7548` explicitly so the recipient doesn't
  trim it.

- /send: replaced the misleading "try teardown and re-pair" guidance.
  Now lists the three exit-class behaviors (auth fail / network queue /
  pending cap) with the correct repair for each.

## Updated integrations

All six integration READMEs (claude-code, cursor, generic, openai-codex,
opencode, windsurf) now document:
- Auth vs network error distinction on send failure
- `/repair` or equivalent nuclear re-pair sequence
- Port-collision symptom ("peers look right but nobody responds — check
  host name in `airc peers`")
- New lifecycle markers ([joined], [left], [QUEUED], [DRAINED], [AUTH FAILED])
  in the generic JSONL protocol doc

## Why this matters

The error-class evidence and the re-pair sequence existed in the code
after today's hotfixes, but the user-facing docs still said "try teardown
and re-pair" with no --flush — which is EXACTLY the wrong advice. A user
following the old docs would land right back in the broken-by-default
state that cost us hours.

Refs #17, #18, #19, and the airc-96dd / vhsm-2c84 port collision on
[email protected] — 2026-04-15 eval.
@joelteply
joelteply merged commit 98a4c97 into main Apr 16, 2026
1 check passed
@joelteply
joelteply deleted the feat/skills-repair-and-port-collision branch April 16, 2026 00:22
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