Repository navigation
Codex Desktop keeps stale app connector link after reauth-required 401 until codex_apps cache is cleared #24675
Description
Summary
Codex Desktop on macOS kept using a stale app connector link after a Linear connector started returning 401 Reauthentication required. Restarting Codex and removing/re-adding the Linear plugin did not fix it. Moving aside the local Codex app/tool discovery cache forced regeneration and made the connector work again.
Environment
- Codex Doctor:
v0.134.0 - Platform: macOS arm64
- Connector: Linear installed as a Codex Desktop app/plugin connector
- Linear was not configured as a CLI MCP server, so
codex mcp listdid not show Linear
Symptoms
A read-only Linear connector tool call failed with:
401: "Server returned 401: 'Reauthentication required'"
Restarting Codex Desktop did not help.
Removing and re-adding the Linear plugin did not help.
What Fixed It
Moving aside the local Codex app/tool discovery cache caused Codex to regenerate connector tool metadata. After that, the same read-only Linear tool call succeeded.
The relevant local cache files were under:
~/.codex/cache/codex_apps_tools/*.json
~/.codex/cache/codex_app_directory/*.json
Before cache regeneration, the Linear tool metadata referenced one opaque link_* connector link. After cache regeneration, it referenced a different opaque link_* connector link, and calls succeeded.
Expected Behavior
When an app connector returns 401 Reauthentication required, Codex Desktop should either:
- invalidate/regenerate the cached connector tool metadata automatically,
- expose a reconnect/reauth action in the plugin/app UI, or
- clear the relevant app connector cache when the plugin is removed/re-added.
Actual Behavior
The stale connector link survived:
- full Codex Desktop restart,
- Linear plugin remove/re-add,
- and retrying the same connector call.
The only working recovery was manually clearing/moving aside the app/tool discovery cache.
Workaround
Move aside the app/tool discovery cache and restart/retry Codex Desktop:
mkdir -p ~/.codex/cache/app-connector-cache-backup
mv ~/.codex/cache/codex_apps_tools/*.json ~/.codex/cache/app-connector-cache-backup/ 2>/dev/null || true
mv ~/.codex/cache/codex_app_directory/*.json ~/.codex/cache/app-connector-cache-backup/ 2>/dev/null || trueThis appears to force Codex to fetch fresh connector metadata.
Notes
This may be related to broader Desktop/app connector auth-refresh behavior, but the specific issue here is that stale codex_apps discovery metadata retained an invalid connector link even after restart and plugin reinstall.
Activity
github-actions commentedon May 27, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
jfima commentedon May 28, 2026
I confirm this is real crap, it really annoys me, thank you for already reporting this bug
jfima commentedon May 28, 2026
I’m seeing what looks like the same issue with the Linear Codex app/plugin.
Setup:
linear@openai-curated~/.codex/plugins/cache/openai-curated/linear/c6c214fdasdk_app_69a089a326dc8191b32a3f2553f5be2cSymptoms:
The Linear tools are discovered and available in the session.
Calling
mcp__codex_apps__linear._list_teamsreturns:401: "Server returned 401: 'Reauthentication required'"Removing and reinstalling the plugin works locally:
codex plugin remove linear@openai-curatedcodex plugin add linear@openai-curatedbut it does not fix auth.
I tried the cache workaround:
~/.codex/cache/codex_apps_tools/~/.codex/cache/codex_app_directory/The cache files were regenerated, but Linear still fails with the same 401.
Important detail: the regenerated cache still contains the same Linear link id:
link_69ebf2fff8cc8191a42ae4b585c191f6And the regenerated app directory still reports Linear as:
isAccessible: falseSo in my case, clearing the local
codex_appscache does not create a fresh usable auth/link state. It seems the stale or broken Linear app authorization is persisted server-side, or the app remains inaccessible even after local cache regeneration.The ChatGPT app page for Linear only shows
Connect, but the connect flow does not successfully restore access for Codex Desktop.rubyisbeautiful commentedon May 28, 2026
The same behavior happens with Microsoft Teams plugin, but the workaround suggested by @boundsj did not fix it. Using Codex desktop app, version 26.519.81530 (3178) on Mac OS.
scottbaggett commentedon May 28, 2026
I can confirm this is also happening to me on Version 26.519.81530 (3178) MacOS. @boundsj workaround also does not work for me.
breukr commentedon May 29, 2026
Also happening to me, workaround doesn't work unfortunately.
czpython commentedon May 31, 2026
This is a major blocker as I reference linear on practically all prompts.
The workaround above didn't work for me, what does work is to just use mcp for now:
and this prompt on
~/.codex/AGENTS.mdelliottscott774 commentedon May 31, 2026
Can confirm that @czpython's workaround worked for me. Removing the plugin, installing the Linear MCP server, and updating
AGENTS.mdallowed Codex to connect to Linear successfully.One issue I ran into: Codex would repeatedly fail to find the Linear MCP server and stop execution. Changing:
mcp__linear__.*to:
mcp__linear.*resolved the issue, and Codex now finds the server consistently.
Versions
elvc commentedon May 31, 2026
I can confirm the exact same behavior and the workaround doesn't work unfortunately.
randygrok commentedon May 31, 2026
Same here
grnbtqdbyx-create commentedon May 31, 2026
mohit0749 commentedon Jun 2, 2026
same here
s5unanow commentedon Jun 3, 2026
Same issue
cubesnyc commentedon Jun 3, 2026
same issue
pardhaponugoti commentedon Jun 3, 2026
Running into the same issue myself, and the workaround does not work
mericksters13 commentedon Jun 3, 2026
I am encountering the same issue, any updates from the team yet?
elvc commentedon Jun 3, 2026
I wonder if the team is aware at all. Might need to tag maintainers or send /feedback
MRL-00 commentedon Jun 4, 2026
The Linear team are aware, I have let them know on x.com. But I believe this issue exists on the ChatGPT/Codex side.
https://x.com/nzmrldev/status/2062062441283076192?s=20
abexiong commentedon Jun 4, 2026
I was able to fix this same issue. Got Linear reconnected with Codex.
Below is what I did.
(NOTE: you'll need to insert your computer name in two of the places)
If you copy and paste the following into codex and ask it to adjust it to your situation, that will be more precise to your situation.
I found the important difference from the GitHub issue: in that report, the fix worked when Codex regenerated a different link_* connector ID. On your machine, after the cache reset and restart, Codex regenerated the same Linear link ID again. So the local cache reset happened, but Codex is still being handed the same bad Linear connection record.
Source: #24675
The next thing to try is a harder reset:
In Codex, disconnect Linear.
Fully quit Codex with Cmd+Q.
In Linear’s website, revoke/remove the OpenAI/Codex authorized app, not just disconnect in Codex.
In Terminal, remove the local Linear plugin and extra cache:
cp ~/.codex/config.toml ~/.codex/config.toml.linear-debug.bak
/Users/yourcomputername/Desktop/Codex.app/Contents/Resources/codex plugin remove linear@openai-curated
mkdir -p ~/.codex/cache/app-connector-cache-backup-20260604-linear-hard-reset
mv ~/.codex/cache/codex_apps_tools/.json ~/.codex/cache/app-connector-cache-backup-20260604-linear-hard-reset/ 2>/dev/null || true
mv ~/.codex/cache/codex_app_directory/.json ~/.codex/cache/app-connector-cache-backup-20260604-linear-hard-reset/ 2>/dev/null || true
mv ~/.codex/cache/codex_apps_server_info/*.json ~/.codex/cache/app-connector-cache-backup-20260604-linear-hard-reset/ 2>/dev/null || true
Reopen Codex.
Reinstall Linear:
/Users/yourcomputername/Desktop/Codex.app/Contents/Resources/codex plugin add linear@openai-curated
Connect Linear again from Codex.
Use Try in chat and ask it to search for (a Linear file name).
One extra clue: Codex lists both Linear and Linear (Legacy) in the app directory. When reconnecting, choose the normal Linear app, the one that says “Plan and build products,” not Legacy.
codex doctor says your core Codex auth/network are fine, so this is specifically a Linear app-connector auth/link problem, not your whole Codex login.
Let me know if this works for you.
elvc commentedon Jun 4, 2026
Just updated the Codex desktop app and reconnect/re-auth the official linear plugin. It is working for me now. I guess they just fixed it.
itsjavi commentedon Jun 8, 2026
Not working for me even after reconnecting/re-auth in the latest Codex version. I tried everything and the only solution that worked was to turn off the plugin and use the MCP server directly as mentioned @czpython with the fix of @elliottscott774
mahtabnejad90 commentedon Jun 10, 2026
This is still an issue on app version
Version 26.608.12217 • Released Jun 9, 2026christielenn commentedon Jun 15, 2026
This is still a problem in the most recent Codex version 26.609.41114