carlos / platform Public

copy: agent login by link (Luna review, Paul's delegation)

Approved by Luna under Paul's 2026-10-25 delegation; emptyOrDash row declined (shared helper).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 604922f7801dde4bf75179fa22b347374e6ecd97 parent 7611b05
4 files changed, +13 −13
  • auth.go +5 −5
  • docs/site/cli.md +1 −1
  • internal/console/signincopy.go +4 −4
  • internal/console/templates/cli_approve.html +3 −3
diff --git a/auth.go b/auth.go
index ba6f7d6cb..3559b4e9a 100644
--- a/auth.go
+++ b/auth.go
@@ -722,7 +722,7 @@ func agentLabel(env func(string) string, fallback string) string {
var loginWaitCap = maxLoginWait
// errLoginGaveUp is pollLogin running out of time, not the console's verdict.
-var errLoginGaveUp = errors.New("gave up waiting for approval — run this again when you're at a browser")
+var errLoginGaveUp = errors.New("gave up waiting for approval. run this again when you're at a browser")
// loginExpiredMsg is the draft copy for a code that ran out its own life.
const loginExpiredMsg = "that login code expired before it was approved; start again with carlos auth login --no-wait"
@@ -754,11 +754,11 @@ func pollLogin(ctx context.Context, c *consoleClient, base, deviceCode, label st
case "pending":
continue
case "denied":
- return terminalLoginError{errors.New("the console says that login was denied — nothing was issued")}
+ return terminalLoginError{errors.New("the console says that login was denied. nothing was issued")}
case "expired":
- return terminalLoginError{errors.New("that login code expired before it was approved — run this again")}
+ return terminalLoginError{errors.New("that login code expired before it was approved. run this again")}
case "unknown":
- return terminalLoginError{errors.New("the console does not recognise this login — run this again")}
+ return terminalLoginError{errors.New("the console does not recognise this login. run this again")}
case "approved":
if poll.Token == "" {
return errors.New("the console approved the login but returned no token")
@@ -860,7 +860,7 @@ func authLogin(out io.Writer, args []string) error {
return fmt.Errorf("starting the login at %s: %w", base, err)
}
if start.DeviceCode == "" || start.UserCode == "" {
- return fmt.Errorf("%s did not return a login code — is that a CARLOS console?", base)
+ return fmt.Errorf("%s did not return a login code. is it the right console?", base)
}
// The ready-made ?code= link is printed (Paul's ruling R1). Typing a code
// into a bare page is no help to an agent, whose human often reads the
diff --git a/docs/site/cli.md b/docs/site/cli.md
index f1d627498..120249d93 100644
--- a/docs/site/cli.md
+++ b/docs/site/cli.md
@@ -51,7 +51,7 @@ the platform holds itself to, and a command that broke it would be a bug.
### carlos auth
-Logs this terminal in to a console. `carlos auth login` prints a link to
+Signs the agent or terminal in to a console. `carlos auth login` prints a link to
open and a short code. Open the link in a browser already signed in to that
console, check that the page shows the same code, and approve. The browser
does not have to be on this machine, so this works over SSH. The token lands
diff --git a/internal/console/signincopy.go b/internal/console/signincopy.go
index 3bd0dc990..36a4634a4 100644
--- a/internal/console/signincopy.go
+++ b/internal/console/signincopy.go
@@ -56,15 +56,15 @@ var signinCopy = map[string]string{
// retires it.
var agentLoginCopy = map[string]string{
"cli.title": "Approve a sign-in",
- "cli.lede": "{label} is asking to use {console} as you.",
+ "cli.lede": "A machine calling itself {label} is asking to use {console} as you.",
"cli.unnamed": "An unnamed agent or terminal",
- "cli.check": "Does your agent show this code?",
+ "cli.check": "Does your agent or terminal show this code?",
"cli.not_me": "If you didn't just ask an agent or terminal to log in, press That wasn't me.",
"cli.started": "Started {ago} ago.",
"cli.started_now": "Started just now.",
- "cli.link_unknown": "That link's code has expired or was already used. Ask your agent to start the login again.",
+ "cli.link_unknown": "That link's code has expired or was already used. Start the login again from your agent or terminal.",
"cli.signin_prompt": "Sign in to connect your agent or terminal.",
- "cli.approved": "Connected. Go back to {label}; it carries on by itself.",
+ "cli.approved": "Connected. Go back to {label}. It carries on by itself.",
"cli.open_apps": "Open your apps",
"cli.denied": "Nothing was issued. That sign-in can't be approved now; if it wasn't yours, whoever started it got nothing.",
"cli.settings_link": "agents and terminals",
diff --git a/internal/console/templates/cli_approve.html b/internal/console/templates/cli_approve.html
index 92227e70f..e89d33430 100644
--- a/internal/console/templates/cli_approve.html
+++ b/internal/console/templates/cli_approve.html
@@ -6,14 +6,14 @@
<p class="tile-value"><code>{{.Request.UserCode}}</code></p>
<p><strong>{{.CLIText "cli.check"}}</strong></p>
<div class="banner">
- <p><strong>Terminal</strong> {{emptyOrDash .Request.Label}}
- <span class="small">— this name was supplied by the machine asking. Trust
+ <p><strong>Agent or terminal</strong> {{emptyOrDash .Request.Label}}.
+ <span class="small">This name was supplied by the machine asking. Trust
it only if it matches the machine in front of you.</span></p>
<p><strong>From</strong> {{emptyOrDash .Request.RemoteAddr}}{{if .Place.Text}}, {{.Place.Text}}{{end}}
{{- if .Place.Attribution}} <span class="small">(<a href="{{.Place.AttributionURL}}">{{.Place.Attribution}}</a>)</span>{{end}}</p>
<p class="small">{{.StartedText}} Expires {{fmtTime .Request.ExpiresAt}}</p>
</div>
-<p>Approving gives that terminal your identity — every account you belong to —
+<p>Approving gives that agent or terminal your identity, including every account you belong to,
for {{.Days}} days. You can revoke it at any time from
<a href="/settings">{{.CLIText "cli.settings_link"}}</a>, and a note goes to your
Keymail inbox the moment it is issued.</p>