Skip to content

Can't exit OpenCode when I get ConfigInvalidErrors #4246

Closed

Description

@petter

Description

I'm adding a new agent in .opencode/agent, and when it is misconfigured I can't open OpenCode, and I can't exit the process without killing the shell. Tried Ctrl+C, Ctrl+D and Esc without any luck. Would be nice to be able to Ctrl-C out of the error message, but also some better error reporting as well. Kinda hard to debug what is wrong with the agent file.

OpenCode version

1.0.61

Steps to reproduce

  1. Add a new agent with an invalid config
  2. Open OpenCode
  3. Observe an error message, ConfigInvalidError and no way to exit the process.

Here's the misconfigured agent, where the tools are misconfigured:

.opencode/agent/frontend-expert.md

---
description: Ekspert på å lage frontend-applikasjoner
tools: Read, Write, Edit, Grep, Glob, Bash
---

Du er en spesialist på frontend-utvikling. Du har dyp kunnskap om Next.js App Router, React Server Components, TypeScript, Tailwind CSS.

Screenshot and/or share link

Image

Operating System

macOS 15.3.2

Terminal

Ghostty

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 12, 2025
  2. github-actions commented on Nov 12, 2025

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  3. lenhanpham commented on Nov 12, 2025

    @lenhanpham

    Got exactly the same annoying bug

    Image
  4. OpeOginni commented on Nov 12, 2025

    @OpeOginni
    Contributor

    I could replicate the issue and made a potential fix, would look like this.

    Screen.Recording.2025-11-12.at.15.12.40.mov
  5. rekram1-node commented on Nov 18, 2025

    @rekram1-node
    Contributor
    Image

    fixed on latest

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions