Skip to content

Web UI: New Session creates in wrong project, /project/init returns HTML, Settings missing Projects tab, Auto-accept toggle broken #31272

Closed as not planned

Description

@huy-victor

Description

Four issues in the Web UI when OpenCode is accessed via browser (not desktop app):

  1. "New Session" button creates session in wrong project — clicking New Session from homepage defaults to the first non-global registered project instead of the project the user is working in. Workaround: navigate to specific project's session URL first, then click New Session.

  2. POST /project/init returns HTML instead of JSON — API endpoint that should register a new project returns the SPA HTML page, making programmatic project registration impossible.

  3. Settings page missing Projects tab — Web UI Settings has no way to add/manage projects. Only desktop TUI can do this.

  4. Auto-accept permissions toggle broken — The toggle in Web UI Settings > Agent cannot be enabled; clicking has no effect (desktop TUI works fine).

OpenCode version

Latest from npm (opencode-ai), version 1.16.2

Steps to reproduce

  1. Start server: opencode web --port 4096 --hostname 0.0.0.0
  2. Open browser at http://127.0.0.1:4096/
  3. Click "New Session" on homepage — session created in wrong project
  4. Settings page: check for Projects tab (missing), try toggle Auto-accept (broken)
  5. API: curl -X POST http://127.0.0.1:4096/project/init -H "Content-Type: application/json" -d "{\"directory\":\"D:\\\path\\\to\\\workspace\"}" — returns HTML

Operating System

Windows 11

Terminal

Windows Terminal (not relevant — these are Web UI bugs)

Plugins

None — vanilla opencode-ai npm install

Activity

  1. github-actions commented on Jun 7, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • This issue does not use one of the required issue templates (Bug Report, Feature Request, or Question). Please re-submit using the appropriate template so all required fields are captured consistently.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. added
    needs:complianceThis means the issue will auto-close after 2 hours.
    and removed
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Jun 7, 2026
  3. github-actions commented on Jun 7, 2026

    @github-actions
    Contributor

    Thank you for updating the issue! It now follows the contributing guidelines and includes all the necessary information. The needs:compliance label has been removed.

  4. github-actions commented on Aug 7, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions