Skip to content

[BUG] Plugin fails with confusing errors if started with the other oauth plugin's cache files #25

@riatzukiza

Description

@riatzukiza

Bug Description
i seem to be getting this error again in the plugin logs: ERROR 2025-11-19T20:09:23 +1ms service=openai-codex-plugin error=Failed to fetch OpenCode codex.txt: 404 Failed to fetch OpenCode codex.txt from GitHub
[2:12 PM]shuv: this might be bits left over from the other plugin actually
[2:13 PM]shuv: https://github.com/sst/opencode/blob/dev/.opencode/opencode.jsonc
[2:14 PM]shuv: the other codex auth plugin keeps installing whenever i dev against the opencode repo, because they have that .opencode folder with a config file adding "plugin": ["opencode-openai-codex-auth"]
Steps to Reproduce
0. clear all opencode caches ~/.opencode,.cache/opencode

  1. add "plugin": ["opencode-openai-codex-auth"] to your opencode.json
  2. start opencode session, do some work with codex
  3. close opencode
  4. change opencode.json plugin entry to "plugin":["@openhax/codex"]
  5. start opencode

Expected Behavior
User can use codex, but better

Actual Behavior
User get's an error preventing them from using the plugin

Environment

  • opencode version: 1.0.78
  • Plugin version: 0.0.1
  • Operating System: Mac
  • Node.js version:

Logs
If applicable, attach logs from ~/.opencode/logs/codex-plugin/ (enable with ENABLE_PLUGIN_REQUEST_LOGGING=1)

Compliance Checklist
Please confirm:

  • I'm using this plugin for personal development only
  • I have an active ChatGPT Plus/Pro subscription
  • This issue is not related to attempting commercial use or TOS violations
  • I've reviewed the FAQ and Troubleshooting sections

Additional Context
Add any other relevant information.

Metadata

Metadata

Assignees

Labels

authenticationIssues related to OAuth, token management, and cache file conflictsbugSomething isn't workingeffort-mediumMedium effort issues - 4-12 hours of workpriority-highHigh priority issues - breaking bugs or critical functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions