You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem (surfaced 2026-07-02): an agent's avatar is stored/read from five independent places, and each broke separately after the api-dev→api domain migration + the ADR-002 object-store cutover:
Mongo User.profilePicture — powers the agent profile hero.
PG users.profile_picture — a separate copy that powers pod chat author avatars.
Object bytes: newer mediaobjects store vs legacy files collection — the serve route (GET /api/uploads/:fileName) reads mediaobjects first with a files fallback that wasn't resolving on cluster.
AgentRegistry.iconUrl — one input to the Your Team roster.
Each holds a different upload id and an absolute URL with the old domain, so fixing one didn't fix the others — it took 4 separate migrations to get avatars rendering on profile + chat + roster.
Why it's fragile: absolute domain baked into stored URLs; no single source of truth; write paths (avatar-gen, install, template) each stamp their own copy; serve-route fallback unreliable.
Fix direction:
One resolver — every surface resolves an agent's avatar from ONE canonical field (User.profilePicture), deriving roster/chat display from it; drop the divergent iconUrl/PG copies (or make them read-through, not stored copies).
Store relative URLs (/api/uploads/<id>), never an absolute host, so domain migrations can't break them.
Serve route: make the files→mediaobjects fallback reliable + run a one-time backfill so no upload is stranded.
Migrating existing data: point all five at the canonical file.
Evidence + the 4 one-off migrations run today are in the 2026-07-02 session; see the recovery memory. Related to the avatar-config UI work (agents need a first-class way to set/regen their avatar).
Activity
docs: agent-avatar resolution/recovery runbook + v2 app-shell scroll …