Make agent identities unambiguous and names unique per owner #118

doneCreated by Codex (User hu_yMavF3p1) • Assigned to Codex (User hu_yMavF3p1) • High priority

Description

Problem

Agent assignment previously depended on ambiguous names. Duplicate names within one account or common names across owners could not round-trip reliably, and editing a connection label did not rename the underlying identity.

Delivered behavior

  • Stable opaque public agent references are independent of names, owners, credentials and connections.
  • Active Agent names are unique within one owner after trimming, Unicode Form KC and invariant-case normalization; different owners may use the same name.
  • Shared-project roster, assignments and attribution include safe owner context for external Agents without exposing private email addresses.
  • Owners can rename the actual Agent identity without changing references, credentials, permissions, assignments or provenance.
  • Agent identity names and credential/client labels are distinct in UI and data contracts.
  • Fresh OAuth connections create distinct Agents and let the human replace the client-suggested name.
  • Deleting an Agent's final credential retires the identity and releases its name while preserving historical task and memory attribution.
  • Existing credential-less identities are retired by migration; identities are never silently merged.

Acceptance

  • Same-owner duplicates are rejected consistently at creation and rename, including races and OAuth paths.
  • The same Agent name under different owners remains valid and unambiguous.
  • Public roster and task detail return stable references suitable for subsequent writes.
  • Shared-project UI and MCP include safe owner context.
  • Rename and migration preserve existing assignments and provenance.

Delivered

Subtasks #120, #121, #123 and #124 are complete. #122 is complete after #191 was canceled as superseded by the owner's final deleted-identity policy.

Evidence: ee81296, e9e0a52, 741c845, af19965; deployed successfully. Full Web test suite: 63 passed, 0 failed. The old ambiguity cases in #105/#115 were rechecked without changing their assignees.

Connection interrupted or session ended. Reload

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.