Skip to content

session: automatic titles fail with 403 FreeTierError when using free models #58521

Closed as duplicate

Description

@jgpeparedes

Summary

Session titles never generate on OpenCode 2.1.4 when the only available models are the free opencode models: the internal title request is rejected with 403 FreeTierError, so sessions stay unnamed.

Environment

  • opencode version: 2.1.4 (npm @opencode/cli, channel latest)
  • OS: Windows Server 2022, Windows_NT 10.0.20348 (win32 x64)
  • Terminal: VS Code integrated terminal (TERM_PROGRAM=vscode, COLORTERM=truecolor)
  • Shell: cmd.exe (C:\Windows\system32\cmd.exe)
  • Install/channel: npm/nvm global install, release build
  • Active plugins: local global plugin ~/.config/opencode/plugins/session-title.js (workaround described below); ~/.opencode/plugins/graphify.js

Reproduction

  1. Use a fresh OpenCode 2.1.4 install with no authenticated providers, so only the free opencode models are available (opencode auth list reports "No authenticated integrations").
  2. Create a session and send one message, for example opencode run "hola".
  3. Inspect the session: opencode api get "/api/session?limit=5" shows an empty title.
  4. Force regeneration: opencode api patch /api/session/<id> --data '{"title":""}'. The title stays empty.
  5. Reproduce the failing request directly: opencode run --standalone --agent title "hola" fails with the FreeTierError below, while the same model with the build agent succeeds.

Expected Behavior

The session receives a generated title (for example "Saludo inicial"), the same way it does with paid or authenticated providers.

Actual Behavior

The title request fails with HTTP 403:

{"type":"error","error":{"type":"FreeTierError","message":"OpenCode's free tier can only be used from within OpenCode. Download it at https://opencode.ai and keep building."}}

No title is stored, and the session UI shows no error, so the only symptom is unnamed sessions.

Additional Context

  • Captured through a local reverse proxy in front of https://opencode.ai/inference/openai/v1: the primary build request carries 12 tools and returns 200; the title request carries no tools at all and returns 403 with the body above.
  • Sessions created on 2026-10-21/22 with big-pickle and mimo-v2.6-flash-free did get titles, so this looks like a change in the free-tier gate rather than in the title code.
  • Config-level attempts that do not help:
    • agents.title.permissions = [{ "action": "*", "resource": "*", "effect": "allow" }] fixes opencode run --agent title ... (that request then includes tools) but not the internal session title path.
    • Injecting a dummy tool through a model body.tools override: the tool reaches the wire (toolsCount: 1) but the request is still rejected with 403, so tool presence alone is not what the gate checks.
  • What does work: POST /api/session/{id}/generate with {"prompt": "..."} returns generated text with the same free model, and ctx.session.generate from a plugin behaves the same. I used that in a ctx.session.hook("title", ...) plugin that sets event.result, which restores titles without issuing the failing request.
  • Frequency: 100% reproducible with free models on Windows; there is no authenticated provider on this machine to compare against.

Activity

  1. opencode-agent commented on Oct 23, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report and the proxy capture. I think this is a duplicate of #58176.

    That issue has been reproduced on 2.1.x with only the free opencode/* models. The automatic title request is sent, but the free tier rejects it with the same 403 FreeTierError, and the error is swallowed, so the session stays untitled and nothing appears in the UI or logs. It also uses the same checks you did: opencode run --standalone --agent title fails while --agent build works, and PATCH title: "" leaves the title empty.

    Possible duplicates and related issues, ordered by likelihood:

    Your findings would help in #58176, so please add them there:

    • injecting a dummy tool via body.tools still gets the 403, so tool presence alone isn't what the gate checks;
    • agents.title.permissions fixes only the opencode run --agent title path;
    • your plugin workaround (ctx.session.generate plus ctx.session.hook("title", ...)), which could help others until this is resolved.

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.

  2. opencode-agent commented on Oct 24, 2026

    @opencode-agent
    Contributor

    Closing this as a duplicate of #58176. We waited a day in case your problem turned out to be different, and haven't heard back.

    #58176 has been reproduced. On 2.1.x with only the free opencode/* models, the automatic title request has no tools and is rejected with 403 FreeTierError. The error is dropped without being shown, so sessions stay untitled.

    Please add your extra findings to #58176:

    • a dummy tool sent through body.tools still gets the 403;
    • agents.title.permissions fixes only the opencode run --agent title path;
    • your ctx.session.generate plus ctx.session.hook("title", ...) plugin workaround.

    If this turns out to be a different problem after all, reply here and we can reopen it. Thanks again for the detailed report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions