[Bug]: opencode-free: all free models fail with permission_denied from the Codex App
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start by reading the fix in #4136 and the related Zen free-tier handling in #4121, then trace the opencode-free provider’s /v1/chat/completions request path and its credential or header handling. Use the reported redacted 403 errors and compare with successful opencode-go requests; done means free models return completions through the Codex App. The issue does not name source files or tests.
Written by the indexing model from the issue text.
Description
Client or integration
Codex App
Provider or upstream service
opencode-free (https://opencode.ai/zen/v1)
OpenCodex version
2.86.0 (npm global @bitkyc08/opencodex; OpenCodex desktop app on macOS)
Endpoint or capability
/v1/chat/completions via the opencode-free provider (every free model tried; failures captured for opencode-free/ll-alpha-free)
Current behaviour
Using OpenCodex as the provider proxy in front of the Codex App, every opencode-free model fails with permission_denied. The error appears on the first message, for every free model tried, so the entire free tier is unusable through OpenCodex. Proxy logs show 12 consecutive 403 permission_denied failures (headers-only / credential-rejected) on 2026-10-16; redacted evidence in the comments.
Expected behaviour
opencode-free models should return a normal completion (cost 0) from the Codex App through OpenCodex, as they did after the fix in #4136.
Minimal redacted request or reproduction
# Standard request shape sent by the Codex App through the local OpenCodex proxy.
# Exact outgoing request was not captured; this is the reproducible shape.
curl http://127.0.0.1:<port>/v1/chat/completions \
-H "Authorization: Bearer <REDACTED>" \
-H "Content-Type: application/json" \
-d '{"model":"<any opencode-free model>","messages":[{"role":"user","content":"hi"}]}'
Reproduces on every free model, on the first message, with no special configuration.
Actual response or error
The Codex App surfaces exactly permission_denied for every opencode-free model; no response is generated. Proxy-side records confirm: upstream HTTP 403, error code permission_denied, failure stage headers-only, failure cause credential-rejected (see redacted log excerpt in the comments). The raw upstream response body was not logged. For reference, the same gate in #4121 returned MissingSessionID / "OpenCode's free tier can only be used in OpenCode", so this may be the same Zen free-tier check surfacing under a different client-side error string.
Upstream documentation
Suggested mapping or implementation notes
Possibly related to #4121 (Zen free-tier gate rejecting non-OpenCode clients, fixed by #4136). A comment there from 2026-09-14 (OpenCodex 2.54.0) reported the upstream gate still triggering on some free routes; this report suggests it now affects all free models from the Codex App. Control: opencode-go requests from the same proxy returned 200 on 2026-10-12, so the failure is specific to the opencode-free provider.
Checks
- I searched existing provider and compatibility issues.
- The request and response were redacted.
- The expected behaviour is based on an upstream specification or a concrete client requirement.
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.3k
- Avg merge
- 8h 20m
- Merged PRs (30d)
- 672
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lidge-jun/opencodex
-
account-pool enhancement needs-design proxy
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
lidge-jun/opencodex#6737 · 1 comment ·
Maintainers usually reply within 1 day
-
account-pool bug needs-design service
Difficulty 4/5 3-5 days Newbie friendliness 48/100
lidge-jun/opencodex#7312 · 1 comment ·
Maintainers usually reply within 1 day
-
Anthropic cache prefixes are rewritten during compaction and image overflow in long Codex turnsPossibly taken A pull request linked to this issue is open or already merged. Openbug provider
Difficulty 5/5 Over a week Newbie friendliness 35/100
lidge-jun/opencodex#7307 · 1 comment ·
Maintainers usually reply within 1 day
-
Add a `perch-cli` provider that runs the official Perch CLI, like `claude-cli`Possibly taken A pull request linked to this issue is open or already merged. Openenhancement provider tools
Difficulty 4/5 3-5 days Newbie friendliness 25/100
lidge-jun/opencodex#7306 · 1 comment ·
Maintainers usually reply within 1 day
-
bug proxy tools
Difficulty 3/5 1-2 days Newbie friendliness 72/100
lidge-jun/opencodex#7298 · 2 comments ·
Maintainers usually reply within 1 day
All issues in lidge-jun/opencodex
Similar issues
-
bug priority: P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
wayfinder:task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug customer-reported data-plane question Service Attention Storage
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Azure/azure-rest-api-specs#47397 · 2 comments ·
Maintainers usually reply within 1 day
-
Claude thinking budget can shrink capped Haiku responses to 2,048 tokensPossibly taken @DavyMassoneto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
diegosouzapw/OmniRoute#17109 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
paperclipai/paperclip#16785 ·
Maintainers usually reply within 1 day