fix(sessions): give derived Remote Control names a real, useful host suffix#128
Open
defangdevs wants to merge 2 commits into
Open
fix(sessions): give derived Remote Control names a real, useful host suffix#128defangdevs wants to merge 2 commits into
defangdevs wants to merge 2 commits into
Conversation
lionello
requested changes
Jul 21, 2026
defangdevs
force-pushed
the
fix/remote-control-name-empty-host
branch
2 times, most recently
from
July 22, 2026 09:31
27c2680 to
4dbffab
Compare
Auto-derived Remote Control names are "<user>-<session>@<host>". Two things made <host> unhelpful: - When remoteControlHost/fqdnOrHostName was empty the supervisor fell straight back to the live kernel hostname, which on a cloud box is the internal, non-routable fqdn (ip-10-x-x-x.<region>.compute.internal) — useless for identifying or reaching the box in the Claude apps. - The AWS image named the seeded "main" session after the CloudFormation stack, so it never reflected the box's public address either. Add services.agent-box.remoteControlHost and, when it is empty, fall back to the box's public web.domain (sslip.io on AWS, custom DNS on bare metal) before the kernel hostname. The AWS template now sets remoteControlHost to the public sslip.io host, so every session — the seeded "main" and any added at runtime — is named after the address the box is actually reached at. Also drop the "main" special case (review feedback): the derived name is now uniformly "<user>-<session>@<host>", so "main" becomes "<user>-main@<host>" rather than a bare "<user>@<host>". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GfaHqHJWLGiS78pvGzoyjP
The add-session form's name input was already optional (blank auto-derived
a name from the agent CLI). Remove the field entirely and always
auto-name: users rarely care what a session is called — they rename at
runtime via /rename — so an autogenerated "<agent>" / "<agent>-<hex>" is
one less thing to invent, and it is the only naming path now.
- Both add-session forms (the settings-page manager and the HOME tabbed
workspace) lose the name <input>; only the agent + working-directory
fields remain.
- The /sessions/add handler ignores any submitted "name" and always calls
gen_session_name(). Autogen guarantees a unique key, so the invalid-name
400 and the duplicate-name 409 (accidental-overwrite guard, issue 100)
branches are now unreachable and are removed.
- tests/sessions.nix: drive add-session by agent alone and assert the
auto-derived names ("claude" when free, then a random suffix), instead
of client-supplied names.
modules/agent-box.nix is regenerated from the .in + src sources.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wx9PVLmDbzS35JCN5N85i6
defangdevs
force-pushed
the
fix/remote-control-name-empty-host
branch
from
July 22, 2026 14:30
4dbffab to
121a7fc
Compare
lionello
approved these changes
Jul 22, 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.
Problem
Auto-derived Remote Control session names are
<user>[-<session>]@<host>. Two bugs made<host>useless:@—<host>came fromconfig.networking.fqdnOrHostName, evaluated at build time. On the AWS imagenetworking.hostNameis unset, so that string is empty and the name rendered as the literalagent@(bare trailing@).agent-devs@ip-10-42-1-151.eu-central-1.compute.internal) — no use for identifying or reaching the box in the Claude apps.Changes
services.agent-box.remoteControlHost(defaults tofqdnOrHostName). The AWS template sets it to the CloudFormation stack name, so boxes — and runtime-added sessions, which getremoteControlName: null— are identifiable as<user>[-<session>]@<stack>.web.domain(sslip.io on AWS, custom DNS on bare metal) — the address you actually reach the box at — before the live kernel hostname. The kernel hostname remains only as a last-resort guard so a name is never a dangling@.Net effect: a box with no explicit
remoteControlHostis now named after its public address (agent-devs@18.196.53.37.sslip.io) instead of an internal EC2 fqdn.Testing
tests/sessions.nix: withremoteControlHostunset, asserts the supervisor bakes the publicweb.domaininto the derived name.remoteControlHost=""+ web enabled (the lazyweb.enable && …guard avoids reading the defaultlessweb.domainwhen web is off), and that the generated supervisor script bakeshost=box.test.🤖 Generated with Claude Code