Skip to content

LoopMe: Three blocking issues — API access entitlement, OAuth org routing, probe auth 401 #6054

Description

Overview

LoopMe (org org_01KEC0X42PGV55T5N0GTQDAC6X, contact: mykola.danyliuk@loopme.com) has three blocking issues. Their agent passed all 6 tracks on 3.1 on 2026-07-03 and has been degraded since 2026-07-04. Mykola has done exceptional code-level analysis across multiple escalations — the blockers are well-understood, they just need Brian's authority or DB access to action.


Blocker 1: Commercial decision — does Founding Member entitle API-tier access?

Escalations: #464, #465, #468

is_api_access_tier is a derived boolean: membership_tier ∈ API_ACCESS_TIERS AND subscription_status ∈ {active, past_due, trialing}. API_ACCESS_TIERS = {individual_professional, company_standard, company_icl, company_leader}. Founding Member is not in that set.

Question for Brian: Does Founding Member entitle API-tier read access under their bespoke terms?

If yes, two implementation paths (neither is side-effect-free):

  1. UPDATE organizations SET membership_tier = 'company_icl' WHERE id = 'org_01KEC0X42PGV55T5N0GTQDAC6X' — one-field change but re-labels Founding Member as a paid tier, may affect billing/badge logic
  2. Code change: add Founding Member tier value to API_ACCESS_TIERS

Precedent check needed: What membership_tier is set on other comparable founding-era orgs (e.g. Scope3, Adzymic)? Do their org keys resolve is_api_access_tier: true?

Note: #463 was prematurely resolved — "engineering to flip the flag" was written before #464/#465 established there is no flag.


Blocker 2: DB band-aid — OAuth credential under wrong WorkOS org

Escalation: #474

resolveOwnerAuth JOINs on mp.workos_organization_id = ac.organization_id. The OAuth credential for https://platform.loopme.ai/mcp/seller was stored under the wrong org — the JOIN fails.

Immediate fix (unblocks heartbeat while code fix deploys):

UPDATE agent_credentials
SET organization_id = 'org_01KEC0X42PGV55T5N0GTQDAC6X'
WHERE agent_url = 'https://platform.loopme.ai/mcp/seller';

Code fix also needed: OAuth callback is routing credentials to wrong org even when initiated via ensureAgentContextId(ownerOrg). The dashboard Authorize button uses getAuthInfoByOrgAndUrl instead of ensureAgentContextId(ownerOrg) — separate bug.

Also: offline_access fix (#5823) merged but token issued before merge didn't benefit — credential expired ~24h post-auth with no refresh.


Blocker 3: Periodic compliance probe still 401ing after #5823

Escalation: #469

auth-status shows has_valid_oauth: true but discovery/health/compliance probes return 401 oauth_required ~1 min after token storage. diagnose_agent_auth returns "No likely failures."

  • MCP Inspector completes full OAuth flow and calls tools/list successfully
  • Token decodes to aud: ["https://platform.loopme.ai"], iss: https://login.loopme.com/ — correct shape
  • Issue is isolated to resolveProbeAuth → findOrgWithSavedAuth path, which [codex] Fix durable OAuth probe auth and feed schema #5823 didn't touch
  • Agent is healthy; problem is AAO-side probe credential injection

Summary of actions needed

# Action Owner
1 Commercial decision: Founding Member → API access? Brian
2 DB: update ac.organization_id for LoopMe agent Brian / eng
3 Code: fix OAuth callback org routing Eng
4 Code: fix resolveProbeAuth credential injection Eng

Related escalations

#464, #465, #468, #469, #474

Metadata

Metadata

Assignees

No one assigned

    Labels

    admin-toolInternal tools for AAO staffbugSomething isn't workingclaude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.needs-wg-reviewBlocked on a working-group decision — surface in WG meeting agendaspriority:P0Immediate priority: user/revenue/security/reliability bug to work now

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions