Repository navigation
Codex Desktop Slack connector keeps stale OAuth link after revoke/reconnect; no reliable hot-swap path for multi-Slack users #19669
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.422.30944
What subscription do you have?
ChatGPT Pro
What platform is your computer?
Darwin 25.4.0 arm64 arm
What issue are you seeing?
Codex Desktop can keep using a stale managed Slack connector OAuth/link state after a user revokes the wrong Slack authorization and reconnects the intended Slack account in ChatGPT Apps.
This makes Slack account switching very difficult for developers who work across multiple Slack workspaces, clients, or businesses. In this case, the only working recovery path required Slack-side revoke, ChatGPT-side disconnect/reconnect, clearing Codex app tool cache, and restarting Codex.
The key symptom was that Codex continued routing Slack tool calls through a stale managed connector link after Slack was revoked/reconnected. The browser-side ChatGPT UI could show Slack as connected while Codex tool calls still failed.
Observed errors during recovery:
HTTP 401: invalid_token
After ChatGPT Settings -> Apps -> Slack -> Disconnect -> Connect, the running Codex session then changed to:
Unknown tool: slack_slack_read_user_profile
Unknown tool: slack_slack_search_channels
Only after moving aside the local Codex app tool cache and fully restarting Codex did the Slack tools refresh and start working again.
What steps can reproduce the bug?
- In Codex Desktop, install/enable the curated Slack app connector.
- Authenticate Slack with the wrong Slack account or workspace.
- Attempt to use Slack from Codex. In my case this initially failed for the target private channel because the wrong Slack identity was connected.
- Revoke the wrong Slack authorization from Slack's app authorization/configuration page.
- Attempt to use Slack from Codex again.
- Observe Codex Slack tools fail with:
HTTP 401: invalid_token
- Reconnect Slack from the browser / ChatGPT app connector UI.
- Observe ChatGPT web can show Slack as connected, but Codex Desktop still fails because its managed connector/tool state is stale.
- In one recovery attempt, ChatGPT-side reconnect changed the Codex error from
invalid_tokento:
Unknown tool: slack_slack_read_user_profile
- Move aside the local app-tool cache:
mv ~/.codex/cache/codex_apps_tools ~/.codex/cache/codex_apps_tools.bak- Fully quit and reopen Codex Desktop.
- Slack tool calls finally refresh and work again.
During debugging, the local tool cache repeatedly regenerated with the same stale Slack connector/link identity. Exact connector/link IDs are omitted from this public report but can be provided privately if useful.
What is the expected behavior?
Codex Desktop should provide a clear, reliable way to:
- disconnect a managed app connector,
- revoke or forget the current connector link,
- force fresh OAuth,
- hot-swap between Slack identities/workspaces,
- refresh the local tool registry without requiring manual filesystem cache moves.
Codex should not continue routing managed Slack tool calls through a stale revoked connector link after reconnect.
When a managed connector returns invalid_token, Codex should guide the user to re-authenticate or automatically invalidate the stale local/remote connector state. The UI should not leave the user in a state where ChatGPT says Slack is connected but Codex tool calls still fail.
Additional information
Workaround found:
- In ChatGPT web: Settings -> Apps -> Slack -> Disconnect.
- Reconnect Slack and approve OAuth for the intended Slack workspace/account.
- Quit Codex fully.
- Move aside:
~/.codex/cache/codex_apps_tools- Reopen Codex.
- Verify Slack tools with
slack_read_user_profileandslack_search_channels.
Business / adoption impact:
This is a retention and adoption risk for developers and teams that rely on Slack as their primary operational channel. Many developers work across multiple businesses, agencies, clients, or internal/external Slack workspaces. If Codex cannot reliably hot-swap or reset Slack connector OAuth, users may lose trust in Codex for day-to-day engineering workflows and fall back to competing coding agents that make account switching clearer.
For teams evaluating Codex, connector reliability is part of the product's credibility. A confusing or fragile OAuth recovery path can block rollout even if the core coding experience is strong.
Suggested fixes:
- Add a Codex Desktop UI action to disconnect/reconnect managed app connectors directly from Codex.
- Add a "forget connector OAuth/link and refresh tools" action.
- Add CLI support for managed Codex app connectors, such as
codex apps logout slack/codex apps login slack. - Automatically invalidate stale connector/tool state when a managed app connector returns
invalid_token. - Support explicit Slack workspace/account selection or hot-swap for users with multiple Slack accounts.
Activity
github-actions commentedon Apr 26, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
tonyholmes69 commentedon May 6, 2026
Also logged in app on ID: 4bb823c2-e534-45a2-891d-e04ba05ed7c4
Gmail plugin also exhibits the same Oauth behaviour ... uninstalling and reinstalling fails to initiate Oauth reauthentication and uses cached credentials. As of this moment I see no way to change accounts on Gmail connector once authenticated.
gabrieljobs-nc commentedon Jul 16, 2026
I reproduced this again on 2026-07-16, and the documented cache/restart workaround no longer recovers the connector.
Environment:
codex-cli0.144.2The Slack app settings currently show Disconnected, but a fresh
slack_list_workspacesinvocation is still routed through the previous managed connector link and returns:Recovery attempts already exhausted:
Across 19 connector invocations, 18 returned the same OAuth error and one hit an MCP startup timeout. The regenerated cache continued to resolve the same stale managed link.
This is independent of a receiver bot and its
xoxb-token. Adding bot scopes cannot affect the connector platform's authorization-code callback, PKCE exchange, token parsing, principal binding, or server-side link persistence.There was also a principal mismatch: the Slack identity selected during reauthorization did not match the owner metadata retained by the managed link.
The backend should inspect at least these paths:
access_tokenand the user token atauthed_user.access_token. A user-search connector must persist and invoke with the nested user token. See Slack's OAuth response documentation.authed_user.idchanges, do not retain the old link owner/session resources.slack_list_workspacessmoke call through the normal credential-resolution path before showing the connector as connected.oauth_token_response_invalid.Suggested regression coverage:
authed_user.access_tokenslack_list_workspacessucceeds through the production resolution pathI have the exact connector ID, link ID, and UTC reproduction timestamp available for a private support/backend lookup; I am intentionally omitting them here. No OAuth codes, tokens, PKCE verifier, client secret, or user PII were captured.
carl-distill commentedon Aug 1, 2026
This is broken for me and I have no idea how to recover :(
ewcolling commentedon Sep 10, 2026
2026-09-10: reproduced on Windows after reconnect, full restart, and a fresh task
I am seeing the same failure class in Codex Desktop 26.903.8094.0 on Windows 11 Pro 10.0.26200 x64.
Current sanitized control matrix:
Recovery already tried:
The result is unchanged. Because two unrelated connectors fail with the same
-32001 Unknown toolresult while Stripe works, this looks like stale or missing server-side tool registration/capability mapping rather than a user authorization or connector-permission problem.Could the connector team please check registry publication/invalidation and wrapper-to-runtime mappings for the Slack and HighLevel app IDs associated with this session? A safe refresh/repair action in the Codex UI would also be valuable. Connector/link identifiers and exact UTC reproduction times can be provided through a private support channel if needed.
No workspace names, account IDs, channel data, OAuth material, or credentials are included here.
thnk2wn commentedon Sep 11, 2026
Reproduced on macOS in Codex Desktop on September 11, 2026 (UTC), using the managed Slack plugin.
A read-only
slack_slack_read_listcall repeatedly produces the UI message “Your Slack connection has expired. Reconnect it before ChatGPT can use it for this request.” After reconnecting, the tool returns:The result has
isError: true. A subsequent read immediately requests reconnect again. Repeated reconnects and a full quit/reopen of Codex did not recover access. Slack itself remains accessible in its desktop and browser clients, although that does not establish the health of the separate connector credential.Local desktop logs confirm accepted
mcpServer/elicitation/requestresponses at 03:12:12 UTC before the full app restart and at 03:17:04 and 03:18:21 UTC afterward. Following the 03:12 acceptance,codex_apps,node_repl, andcua_replrestart and report ready. The available logs/tool results do not expose an underlying Slack HTTP response,missing_scope, orinvalid_autherror, so we cannot establish the root cause or confirm that this is the same stale-link mechanism.Separately, the advertised list read/update tool descriptions refer to
slack_add_list_recordandslack_update_list_record, but those row-editing tools are absent from the tools exposed to this task, including after the restart. List creation, reading, and schema/metadata update tools are advertised. This may be a distinct capability-publication issue.Impact: maintaining an existing collaborative feedback list requires UI automation because connector reads never recover and row-update tools are not exposed. Repeated reconnect prompts also interrupt the task and reset tool sessions.
Could the connector team investigate the post-reconnect credential resolution and provide a safe diagnostic error category or repair path? We have stopped retrying to avoid sending the user through further authentication loops.