Significant-Gravitas/AutoGPT · error · ValueError
Organization is already a team org
Error message
Organization is already a team org
What it means
Error "Organization is already a team org" thrown in Significant-Gravitas/AutoGPT.
Source
Thrown at autogpt_platform/backend/backend/api/features/orgs/db.py:423
where={"id": org_id},
data={"deletedAt": datetime.now(timezone.utc)},
)
async def convert_personal_org(org_id: str, user_id: str) -> OrgResponse:
"""Convert a personal org to a team org.
Creates a new personal org for the user so they always have one.
Existing resources (agents, credits, store listings) stay in the
team org — that's the point of converting.
If new personal org creation fails, the conversion is rolled back.
"""
org = await prisma.organization.find_unique(where={"id": org_id})
if org is None:
raise NotFoundError(f"Organization {org_id} not found")
if not org.isPersonal:
raise ValueError("Organization is already a team org")
# Step 1: Flip isPersonal on the old org
await prisma.organization.update(
where={"id": org_id},
data={"isPersonal": False},
)
# Step 2: Create a new personal org for the user
try:
slug_base = f"{_sanitize_slug(org.slug)}-personal-1"
# Fetch user name for display
user = await prisma.user.find_unique(where={"id": user_id})
display_name = user.name if user and user.name else org.name
await _create_personal_org_for_user(
user_id=user_id,
slug_base=slug_base,
display_name=display_name,View on GitHub (pinned to 9c8bb5550f)
Solutions
- No action needed; the organization is already a team org.
- Refresh the organization state before retrying the conversion.
When it happens
Trigger: Thrown at autogpt_platform/backend/backend/api/features/orgs/db.py:423 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/937edb6b92448312.
Report an issue: GitHub.