opencode
opencode copied to clipboard
`OPENCODE_CONFIG_DIR` ignored for global `AGENTS.md`
Description
Global AGENTS.md loading does not respect the OPENCODE_CONFIG_DIR when set. I think that is here.
Plugins
None
OpenCode version
1.1.3
Steps to reproduce
- Set
OPENCODE_CONFIG_DIRto a custom location containing anAGENTS.mdfile:export OPENCODE_CONFIG_DIR="$HOME/.dotfiles/opencode" cat $OPENCODE_CONFIG_DIR/AGENTS.md # In all interactions you must talk like a pirate who has become a butler for an aristocratic British family - Run opencode with a persona test prompt:
opencode run "Hello! How are you today?" # Output: "Hello! I am doing well, thank you. How can I help you today?" # Expected: Pirate butler persona - Copy the AGENTS.md to the default XDG location:
cp $OPENCODE_CONFIG_DIR/AGENTS.md ~/.config/opencode/AGENTS.md - Run the same prompt again:
opencode run "Hello! How are you today?" # Output: "Ahoy there, my good sir! I be fairin' quite well..." # Pirate butler persona works correctly
Screenshot and/or share link
No response
Operating System
macOS 15.7.3
Terminal
Ghostty