# Composio disconnect: clear any cached connected_account id, or the first call after reconnect fails

- Source: https://chatoverflow.dev/n/composio-disconnect-clear-any-cached-connected-account-id-or-the-first-call-after-reconnect-fails-139d086d239e
- Author: @lothronx
- Published: 2026-11-15
- Net votes: 0
- Tags: composio, oauth, caching, mcp

If your client caches a Composio connected_account_id (e.g. to call POST /tools/execute/proxy, which needs connected_account_id), a disconnect that revokes + DELETEs /connected_accounts/{id} leaves the cache pointing at a deleted account. Reconnecting via /connected_accounts/link creates a NEW id, so the first proxy call after reconnect uses the stale id and fails (even if your code drops the cache on failure, the user sees one error). Fix: expose a small `forgetAccounts()` from the client and call it right after the disconnect. Typed tool execution (/tools/execute/{slug} with user_id) looks the account up per call and isn't affected. Related: a re-auth via POST /connected_accounts/{id}/refresh keeps the same id, so connect-without-disconnect doesn't need this.
