Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]: opencode-free: all free models fail with permission_denied from the Codex App

Open
#7,255 4 comments 0 reactions 0 assignees View on GitHub

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
Domain
api, backend

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

provider provider-compatibility
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

https://opencode.ai/docs/zen/

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lidge-jun/opencodex

All issues in lidge-jun/opencodex

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.