Repository navigation
fix: airc join defaults to #general, not cwd-derived scope - #104
Merged
Merged
Conversation
Auto-scope-by-git-remote silently put agents in different cwds into different rooms — tab in ~/cambrian/airc landed in #cambriantech, tab in ~/ideem/vHSM landed in #useideem. Result: each agent in its own "private chat room" with no one else, the opposite of the IRC-substrate mental model. Today's "memento went quiet / can't reach the others" experience was downstream of this. Default behavior now matches what every user (human or AI agent) expects: 'airc join' lands in #general regardless of cwd. Per-project rooms are still available via explicit '--room <name>'. The old behavior is opt-in via AIRC_AUTO_SCOPE_ROOM=1 for anyone who actually wanted it. Also: cold-host banner now reads 'No live #X found — hosting fresh' so the agent narrating its tab can't confuse a fresh-host with a self-heal takeover (which already had explicit 'taking over' wording). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adjusts airc join/airc connect default room selection to avoid silently splitting agents into different rooms based on current working directory, aligning with the “IRC substrate” expectation that everyone lands in a shared lobby by default.
Changes:
- Default room for
airc joinwith no args is now always#general(auto-scoping is opt-in viaAIRC_AUTO_SCOPE_ROOM=1). - Updated the auto-scope banner text when opt-in is enabled.
- Changed the room-mode host banner text to clarify “cold host” vs takeover/self-heal scenarios.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1165
to
+1172
| # `airc join` (no args) joins #general. Period. Auto-scope-by-git-remote | ||
| # was a previous default that silently put agents in different cwds into | ||
| # different rooms ('#cambriantech' from one repo, '#useideem' from another), | ||
| # so two agents on the same gh account couldn't see each other and each | ||
| # wound up alone in its own "channel" — the opposite of the IRC-substrate | ||
| # mental model. Per-project rooms are still available via explicit | ||
| # `--room <name>`. AIRC_AUTO_SCOPE_ROOM=1 restores the old behavior for | ||
| # anyone who actually wanted it. |
| @@ -2150,7 +2152,8 @@ json.dump(c, open(os.environ["CONFIG"], "w"), indent=2) | |||
| # substrate framing took effect — emit unconditionally for room mode. | |||
| if [ "$use_room" = "1" ]; then | |||
| echo "$room_name" > "$AIRC_WRITE_DIR/room_name" | |||
Comment on lines
+2155
to
+2156
| echo " No live #${room_name} found on your gh account — hosting fresh." | ||
| echo " Other agents on your gh account who run 'airc join' will auto-join." |
joelteply
added a commit
that referenced
this pull request
Apr 26, 2026
feat(tailscale): default to "just works" + --no-tailscale opt-out flag Reverses my earlier "skip the prompt entirely because Tailscale is optional" choice. Joel's read of the 90% case: "tailscale logs out all the time; default should JUST WORK — if you got it, use it. Otherwise it's a setting/pref." Behavior: - Default: at startup of every airc connect / airc join, if Tailscale is installed but the daemon reports Logged out / NeedsLogin, surface a non-fatal warning and (Mac) auto-foreground Tailscale.app for sign-in. Same-machine and same-LAN substrate paths still work without it; the prompt is for the remote-mesh use case the host has in mind. - Opt-out: --no-tailscale flag on `airc join` / `airc connect`. Sets AIRC_NO_TAILSCALE=1 internally so the existing call sites (status detection, host_address_set tailscale entry, advise_tailscale_if_down) all respect it. Flag is the primary user-facing API; env var is the internal toggle. Files: - airc: tailscale_login_check_or_prompt() function; --no-tailscale flag in cmd_connect's parser; prompt fires AFTER flag parse so opt-out takes effect. Cold-host banner restored to "Hosting #X" wording so scenario_room's assertion + the human-readable "we're hosting" signal both stay intact. - airc.ps1: Test-TailscaleLoginOrPrompt; --no-tailscale flag in Invoke-Connect's parser; same post-parse call shape as bash. - skills/join/SKILL.md: description updated to match the post-#104 default (#general unconditionally), with a Tailscale paragraph documenting the prompt + --no-tailscale opt-out so a Claude agent driving airc knows about both. Verified on this Mac: - AIRC_NO_TAILSCALE=1 → prompt suppressed - Tailscale signed in → prompt suppressed (status output isn't Logged out) - scenario_room: 14/14 still pass after banner wording fix Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
4 of 6 tasks
joelteply
added a commit
that referenced
this pull request
Apr 26, 2026
fix(join): three resume bugs surfaced from a single dogfooding session 1. **Auto-scope re-enabled as default.** PR #104 gated the git-org-derived default room behind AIRC_AUTO_SCOPE_ROOM=1, citing that two tabs in different cwds would silently land in different rooms. The converse bug was worse: two tabs in the SAME project (useideem/authenticator) both fell back to #general and never converged on #useideem — directly contradicting the /join skill contract. Re-default to auto-scope; opt out via AIRC_NO_AUTO_ROOM=1 or `--room general`. Comment captures the trade-off so the next person reverting this knows the history. 2. **Explicit `--room` no longer silently resumes a stale pairing for a different room.** Pre-fix: `airc join --room foo` after pairing into #bar resumed #bar's host blindly; the flag was ignored. User had to manually `airc teardown --flush` first. Post-fix: when --room is explicit AND saved room_name differs, discard CONFIG/room_name/ room_gist_id and fall through to discovery for the requested room. Identity (ssh_key, peer records) survives. 3. **Stale-auth resume in room mode self-heals instead of dying.** Pre-fix: stale SSH keys (host reinstalled, authorized_keys rotated) on a saved room-mode pairing died with "Resume aborted — re-pair required" and demanded `airc teardown --flush` + paste an invite. Post-fix: when there's a saved room_name and gh is available, wipe the stale pair and re-exec with --room <saved> so discovery either finds a live host or we become the new host. The 1:1 invite path (no saved room) keeps its die-loud behavior — there's nothing to fall through to. Hit all three back-to-back in one session on 2026-04-26 (vhsm-2c84 dead host, then auto-scope siloing into #general instead of #useideem, then explicit --room useideem ignored after a part). The bugs compound: each fix surfaces the next. Tests: three new scenarios (auto_scope, room_overrides_resume, stale_auth_room_selfheal) covering the default-on auto-scope + opt-out, the --room override + identity preservation, and the room-mode self-heal path. 14 new assertions, all green. Existing scenario_resume_stale_auth keeps testing the legacy 1:1-invite die-path (still correct for that case). All changes are in the platform-agnostic decision layer — no new platform-specific code, so WSL/Git-Bash-on-Windows/POSIX share the same logic with no divergence. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
3 of 6 tasks
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.
Summary
`airc join` (no args) now joins #general unconditionally. Auto-scope-by-git-remote silently sent agents in different cwds to different rooms — agents on the same gh account couldn't see each other and each wound up alone in their own channel. Opposite of substrate intent.
Per-project rooms still available via explicit `--room `. Old behavior opt-in via `AIRC_AUTO_SCOPE_ROOM=1`.
Also: cold-host banner reads "No live #X found — hosting fresh" to disambiguate from self-heal takeover.
Test plan
🤖 Generated with Claude Code