opencode icon indicating copy to clipboard operation
opencode copied to clipboard

opencode reads agents.md from parent directories

Open eislambey opened this issue 3 weeks ago • 5 comments

Description

When launching opencode in a directory, it searches for and reads an agents.md file located two levels up in the directory hierarchy.

OpenCode version

1.0.208

Steps to reproduce

  1. Go to a project directory, e.g., ~/Projects/my-cool-project
  2. Ensure there is no agents.md file in this directory
  3. Place an agents.md file in ~/
  4. Run opencode from ~/Projects/my-cool-project
  5. Observe that opencode reads the configuration/content from ~/agents.md

Screenshot and/or share link

https://opncd.ai/share/aMV0hXIo

Operating System

Fedora 43

Terminal

Gnome Terminal

Note: No .git folders exist in both directories.

eislambey avatar Dec 30 '25 22:12 eislambey