Skip to content

Distinguish AIRC process from Claude Monitor - #496

Merged
joelteply merged 1 commit into
canaryfrom
fix/join-attach-monitor
May 5, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/join-attach-monitor

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

  • add airc join --attach so Claude Code /airc:join creates a real visible Monitor stream when a background/daemon AIRC process already owns transport
  • rename user-facing status from monitor / monitor health to airc process / transport health
  • keep attach display-only in airc_core.log_tail, so it tails local messages.jsonl without spawning duplicate bearers or owning transport
  • update join/resume skills and targeted tests for the new terminology

Validation

  • bash -n airc lib/airc_bash/cmd_connect.sh lib/airc_bash/cmd_status.sh lib/airc_bash/cmd_doctor.sh
  • .venv/bin/python -m py_compile lib/airc_core/log_tail.py
  • git diff --check
  • real shared continuum scope: AIRC_HOME=/Users/joelteply/Development/cambrian/continuum/.airc ./airc status
  • real shared continuum scope: AIRC_HOME=/Users/joelteply/Development/cambrian/continuum/.airc ./airc join
  • real shared continuum scope: AIRC_HOME=/Users/joelteply/Development/cambrian/continuum/.airc ./airc join --attach stayed alive as local display stream
  • ./airc doctor --tests solo_mesh_warns
  • ./airc doctor --tests inbox
  • ./test/integration_smoke.sh status_agrees_with_send
  • ./airc doctor --tests monitor_liveness_process_evidence
  • ./airc doctor --tests status (skipped local-pair-only scenario as expected post-feat(bearer): Phase 3c — drop SshBearer + Tailscale wholesale (#269) #281)

Note

I initially ran several shell integration scenarios in parallel and monitor_liveness_process_evidence failed because the harness cleanup races on /tmp/airc-it-*. Rerunning that scenario alone passed. The serial result is the meaningful one for this harness.

Copilot AI review requested due to automatic review settings May 5, 2026 00:15
@joelteply
joelteply merged commit 79a1f87 into canary May 5, 2026
8 checks passed
@joelteply
joelteply deleted the fix/join-attach-monitor branch May 5, 2026 00:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an “attach” mode for airc join so Claude Code can create a persistent, visible Monitor stream even when a background/daemon AIRC process already owns transport for the scope. It also updates user-facing status terminology to distinguish the AIRC process from underlying transport health, and adjusts docs/skills/tests accordingly.

Changes:

  • Add airc join --attach, which tails the local messages.jsonl (display-only) instead of spawning duplicate transport/bearers.
  • Rename airc status output terminology from “monitor / monitor health” to “airc process / transport health”.
  • Update join/resume skills plus integration tests to match the new terms and attach behavior.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/airc_bash/cmd_connect.sh Adds --attach flag handling and local-stream attach exec path.
lib/airc_core/log_tail.py New Python module to tail local messages.jsonl for attach sessions (display-only).
lib/airc_bash/cmd_status.sh Renames status labels and health header to “airc process” and “transport health”.
lib/airc_bash/cmd_doctor.sh Updates one doctor health fix hint to reference “AIRC process”.
skills/join/SKILL.md Updates Claude Code Monitor wrapper to use airc join --attach and terminology.
skills/resume/SKILL.md Updates wording to match renamed “AIRC process” terminology.
test/integration.sh Updates integration assertions/sections to match renamed status output.
test/integration_smoke.sh Updates smoke scenario to assert “airc process … running” instead of “monitor … running”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

--attach|-attach)
# UI attach mode: if a daemon/background airc process already
# serves this scope, keep that single transport owner and attach
# this terminal/Claude Monitor to the local messages log.
Comment thread lib/airc_core/log_tail.py
import json
import os
import secrets
import sys
Comment thread lib/airc_core/log_tail.py
Comment on lines +77 to +80
channel = str(msg.get("channel") or "").lstrip("#")
subscribed = _read_channels(config_path)
if subscribed and channel and channel not in subscribed:
continue
Comment thread lib/airc_core/log_tail.py
Comment on lines +42 to +55
def run(home: str, my_name: str) -> int:
log_path = os.path.join(home, "messages.jsonl")
config_path = os.path.join(home, "config.json")
nonce = secrets.token_hex(4)
contract_printed = False
inode = None
f = _open_at_eof(log_path)
try:
inode = os.fstat(f.fileno()).st_ino
except OSError:
pass

print("airc: attached to local message stream for this scope", flush=True)
while True:
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.

2 participants