Can't exit OpenCode when I get ConfigInvalidErrors #2807

Closed
opened 2026-02-16 17:37:19 -05:00 by yindo · 4 comments
Owner

Originally created by @petter on GitHub (Nov 12, 2025).

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

Originally created by @petter on GitHub (Nov 12, 2025). ### 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 <img width="1165" height="796" alt="Image" src="https://github.com/user-attachments/assets/f67689c3-4035-47dd-b8bb-f1a8a0abce1e" /> ### Operating System macOS 15.3.2 ### Terminal Ghostty
yindo added the opentuibug labels 2026-02-16 17:37:19 -05:00
yindo closed this issue 2026-02-16 17:37:20 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 12, 2025):

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

  • #4245: Both report the same issue where OpenCode TUI becomes unresponsive to exit commands (Ctrl+C, /exit, /quit) when configuration errors occur during startup, both using OpenCode 1.0.61

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

@github-actions[bot] commented on GitHub (Nov 12, 2025): This issue might be a duplicate of existing issues. Please check: - #4245: Both report the same issue where OpenCode TUI becomes unresponsive to exit commands (Ctrl+C, /exit, /quit) when configuration errors occur during startup, both using OpenCode 1.0.61 Feel free to ignore if none of these address your specific case.
Author
Owner

@lenhanpham commented on GitHub (Nov 12, 2025):

Got exactly the same annoying bug

Image
@lenhanpham commented on GitHub (Nov 12, 2025): Got exactly the same annoying bug <img width="1882" height="1007" alt="Image" src="https://github.com/user-attachments/assets/ad5464c6-f096-47f5-9da3-f347d5b3eef6" />
Author
Owner

@OpeOginni commented on GitHub (Nov 12, 2025):

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

https://github.com/user-attachments/assets/5a6ffc00-039f-4e57-a39b-04795cc1e339

@OpeOginni commented on GitHub (Nov 12, 2025): I could replicate the issue and made a potential fix, would look like this. https://github.com/user-attachments/assets/5a6ffc00-039f-4e57-a39b-04795cc1e339
Author
Owner

@rekram1-node commented on GitHub (Nov 18, 2025):

Image

fixed on latest

@rekram1-node commented on GitHub (Nov 18, 2025): <img width="852" height="550" alt="Image" src="https://github.com/user-attachments/assets/d712fad9-eaca-4ffd-92a2-25c6ada9ed12" /> fixed on latest
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2807