Skip to content

Reserve agent URL names and add opt-in public profiles - #2186

Merged
asim merged 2 commits into
mainfrom
agent-public-names
Nov 22, 2026
Merged

asim merged 2 commits into
mainfrom
agent-public-names

Conversation

@asim

@asim asim commented Nov 22, 2026

Copy link
Copy Markdown
Member

Closes #2185.

An agent link shared from Malten now identifies one agent across accounts. URL names are reserved server-wide, independently of display names and owner-scoped mail tags. Display names may repeat, changing a label leaves the URL stable, built-in/route names are reserved, and deleted names remain reserved to prevent link takeover.

The first roster resolution migrates the complete stored roster into an atomically saved reservation index. Existing reservations win; otherwise oldest records (ID tie-break) keep the unsuffixed name. Existing candidate names are protected before assigning suffixes. Internal IDs, conversations and email tags remain unchanged. Colliding legacy integrations must adopt their newly assigned URL; ambiguous old names/former email tags no longer resolve differently per account. Owner-scoped opaque IDs remain supported.

Edit agent now shows its reserved address and an opt-in Public profile checkbox. Guests and non-owners see only the published name and description. Owners retain their chat. Private profiles return 404; sign-in does not grant strangers execution access. Underlying userdb records stay private, including prompts and credentials. Existing agents remain unpublished.

Validation: tests cover migration/collisions, concurrent creation, stable URLs after rename, deletion reservations, built-in names, publication/unpublication, escaping, underlying record privacy and rejected cross-account HTTP execution. Agent/userdb/server tests, build, vet and diff checks pass. The full short suite passes except service/browser: this environment denies Chromium socket/ptrace operations. The responsive browser layout check hits the same startup restriction, so visual desktop/mobile verification remains for CI/review. Not deployed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T18:47:02.370087Z 7879107 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78791075ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread agent/names.go
} else if !os.IsNotExist(err) {
return nil, err
}
records, err := userdb.Snapshot(ns, collection)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Initialize reservations before editing or deleting existing agents

After an upgrade, reservations are initialized lazily by URL lookup or agent creation, but neither UpdateAgent nor RemoveAgent initializes them before mutating existing records. A direct save/delete request to /agents/data before the first lookup can therefore rename the tag before its original URL is reserved, or delete the record before it enters this snapshot. A subsequently created agent can claim the old URL, violating the stable-address and permanent-reservation guarantees. Run the migration before destructive roster mutations, or initialize it before accepting those requests.

AGENTS.md reference: AGENTS.md:L756-L757

Useful? React with 👍 / 👎.

Comment thread agent/slug.go Outdated
}
if a.Tag != "" {
return a.Tag
reserved, err := names()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reuse the reservation index instead of migrating on every lookup

On instances with many agents, every Slug call now reloads both JSON stores, sorts the complete server-wide roster, and converts every record twice—even when all reservations already exist. ClientAgents calls Slug for every owned agent, and Home's agentsCard then calls Path for those agents again, multiplying this global migration work per rendered page while holding namesMu. This makes ordinary navigation increasingly expensive as unrelated accounts add agents. Cache the initialized index and update it during roster mutations rather than rerunning the migration for each generated link.

AGENTS.md reference: AGENTS.md:L390-L393

Useful? React with 👍 / 👎.

@asim
asim merged commit 10ec0c9 into main Nov 22, 2026
3 of 5 checks passed
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.

Provide a public profile for agents linked from other apps

1 participant