Repository navigation
feat: identify sender agents and verify tailnet hosts - #58
Merged
Merged
Conversation
…magicdns # Conflicts: # README.md # session_peer.py
This was referenced Sep 15, 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.
Summary
Messages sent from Codex previously omitted a usable sender identity, and SSH-backed commands did not verify a known Tailscale peer's current MagicDNS name. This change emits agent-qualified
From:and reply targets for Claude and Codex, resolves known online peers throughtailscale status --json, and routes SSH to the verified FQDN while preserving the caller's SSH config alias and host-key lookup.The test modules now live under
tests/, with CI and local discovery updated accordingly. Root-levelsession_peer.py,install.sh, and the frozen compatibilitycc_peer.pyremain in place because raw installs, self-update URLs, packaging, and migration compatibility treat them as public paths.Closes #57
Type
Checklist
python3 session_peer.py list --agent codexworks locallypython3 session_peer.py list --host <Tailscale IP>works over SSH--dry-runresolves the current Codex thread without posting anythingValidation
python3 -m unittest discover -s tests— 174 passed after merging currentmainpython3 -m unittest discover— 174 passedpython3 -m compileall -q cc_peer.py session_peer.py testsuv build— wheel and sdist built successfullysubmitted: falseHostName; JSON returned canonicalhostand originalsshHostVerified against
macOS 26.6.2 arm64, Python 3.14.7, and a live Tailscale SSH peer.
Notes
SSH keeps the supplied destination as its config alias, prepends
HostName=<verified MagicDNS FQDN>, and retainsHostKeyAlias=<supplied hostname or IP>. This lets existingHost,User,Port,IdentityFile, andknown_hostssettings continue to apply while the network destination uses the current MagicDNS identity. A peer reported offline fails before SSH; a destination absent from the tailnet map stays a normal SSH target.The branch includes current
maincommit25ae1d3from #56. Its multi-home Codex safeguards and JSON metadata are preserved alongside the sender/MagicDNS behavior; the remote dispatch integration test now isolates Tailscale status from the mocked Codex queue subprocess.