Cannot Load or Override Config File on macOS (Warp Terminal) #3183

Closed
opened 2026-02-16 17:39:01 -05:00 by yindo · 3 comments
Owner

Originally created by @nonisolated on GitHub (Nov 28, 2025).

Description

Hi! I’m trying to load a custom opencode config file, but the app seems to ignore it.
At first, I tried modifying the config values directly, and when that didn’t work, I attempted to explicitly set the config path using OPENCODE_CONFIG. However, the model and keybinds still don’t change.

What I tried

I created different config file names and locations:

~/.config/opencode/opencode.json
~/.config/opencode/config.json 

I also tried various ways of setting OPENCODE_CONFIG:

export OPENCODE_CONFIG=/Users/username/.config/opencode/opencode.json
export OPENCODE_CONFIG=/.config/opencode/opencode.json
export OPENCODE_CONFIG=~/.config/opencode/opencode.json

My config file:

{
  "$schema": "https://opencode.ai/config.json",
  "model": "anthropic/claude-sonnet-4-5",
  "keybinds": {
    "input_newline": "none"
  }
}

Expected behavior
• The model should switch to anthropic/claude-sonnet-4-5.
ctrl + j should stop inserting a newline because input_newline is set to "none".

Actual behavior
• The model always loads as GPT-5-mini, which I previously selected using /model.
ctrl + j still inserts a newline even though input_newline is set to "none".

It looks like the config file is never read or applied.

OpenCode version

v1.0.119

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS 26.1

Terminal

Warp

Originally created by @nonisolated on GitHub (Nov 28, 2025). ### Description Hi! I’m trying to load a custom opencode config file, but the app seems to ignore it. At first, I tried modifying the config values directly, and when that didn’t work, I attempted to explicitly set the config path using **OPENCODE_CONFIG**. However, the model and keybinds still don’t change. **What I tried** I created different config file names and locations: ``` ~/.config/opencode/opencode.json ~/.config/opencode/config.json ``` I also tried various ways of setting OPENCODE_CONFIG: ``` export OPENCODE_CONFIG=/Users/username/.config/opencode/opencode.json export OPENCODE_CONFIG=/.config/opencode/opencode.json export OPENCODE_CONFIG=~/.config/opencode/opencode.json ``` My config file: ``` { "$schema": "https://opencode.ai/config.json", "model": "anthropic/claude-sonnet-4-5", "keybinds": { "input_newline": "none" } } ``` **Expected behavior** • The model should switch to **anthropic/claude-sonnet-4-5.** • **ctrl + j** should stop inserting a newline because input_newline is set to **"none"**. **Actual behavior** • The model always loads as **GPT-5-mini**, which I previously selected using /**model**. • **ctrl + j** still inserts a newline even though **input_newline** is set to **"none"**. It looks like the config file is never read or applied. ### OpenCode version v1.0.119 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System macOS 26.1 ### Terminal Warp
yindo added the opentuibug labels 2026-02-16 17:39:01 -05:00
yindo closed this issue 2026-02-16 17:39:01 -05:00
Author
Owner

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

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

  • #4758: Custom instruction files in opencode.jsonc not being loaded - indicates config file reading issues in v1.0
  • #4399: OPENCODE_CONFIG_DIR does not read custom config file - similar config loading problem with environment variables
  • #3610: OPENCODE_CONFIG_DIR broken when only world-readable - config file loading issues
  • #3849: Keybind: ctrl+j stopped working in 1.0 - specific keybind configuration problem with ctrl+j
  • #4046: Shift-return does not input newline since 1.0 - keybind configuration issues in v1.0

These issues suggest there may be a broader problem with config file loading and keybind application in v1.0 on macOS. Feel free to ignore if your specific case differs.

@github-actions[bot] commented on GitHub (Nov 28, 2025): This issue might be a duplicate of existing issues. Please check: - #4758: Custom instruction files in opencode.jsonc not being loaded - indicates config file reading issues in v1.0 - #4399: OPENCODE_CONFIG_DIR does not read custom config file - similar config loading problem with environment variables - #3610: OPENCODE_CONFIG_DIR broken when only world-readable - config file loading issues - #3849: Keybind: ctrl+j stopped working in 1.0 - specific keybind configuration problem with ctrl+j - #4046: Shift-return does not input newline since 1.0 - keybind configuration issues in v1.0 These issues suggest there may be a broader problem with config file loading and keybind application in v1.0 on macOS. Feel free to ignore if your specific case differs.
Author
Owner

@ariane-emory commented on GitHub (Nov 28, 2025):

If you put a deliberately invalid config file at ~/.config/opencode/opencode.jsonc (make up some imaginary properties or just put straight-up invalid JSON), what happens? If opencode is reading the bad config file, that should cause it to crash on startup, so trying that would at least let you know whether or not it's reading the file at all.

@ariane-emory commented on GitHub (Nov 28, 2025): If you put a deliberately invalid config file at `~/.config/opencode/opencode.jsonc` (make up some imaginary properties or just put straight-up invalid JSON), what happens? If opencode is reading the bad config file, that should cause it to crash on startup, so trying that would at least let you know whether or not it's reading the file at all.
Author
Owner

@nonisolated commented on GitHub (Nov 28, 2025):

If you put a deliberately invalid config file at ~/.config/opencode/opencode.jsonc (make up some imaginary properties or just put straight-up invalid JSON), what happens? If opencode is reading the bad config file, that should cause it to crash on startup, so trying that would at least let you know whether or not it's reading the file at all.

I followed your suggestion and created an intentionally invalid config file. That helped me track down part of the problem.
It turns out I needed to specify the model as "github-copilot/claude-sonnet-4.5" because I’m using GitHub Copilot.
I also changed "input_newline" to "ctrl+l", and that worked as well.

However, "shift+enter" / "shift+return" still doesn’t work. When I set:
"input_newline": "shift+enter,shift+return"
nothing happens when pressing those keys.

These combinations work in Claude Code and Copilot CLI when I use them in Warp, so I expected them to behave the same way here.

@nonisolated commented on GitHub (Nov 28, 2025): > If you put a deliberately invalid config file at `~/.config/opencode/opencode.jsonc` (make up some imaginary properties or just put straight-up invalid JSON), what happens? If opencode is reading the bad config file, that should cause it to crash on startup, so trying that would at least let you know whether or not it's reading the file at all. I followed your suggestion and created an intentionally invalid config file. That helped me track down part of the problem. It turns out I needed to specify the model as "github-copilot/claude-sonnet-4.5" because I’m using GitHub Copilot. I also changed "input_newline" to "ctrl+l", and that worked as well. However, "shift+enter" / "shift+return" still doesn’t work. When I set: `"input_newline": "shift+enter,shift+return"` nothing happens when pressing those keys. These combinations work in Claude Code and Copilot CLI when I use them in Warp, so I expected them to behave the same way here.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3183