Skip to content

Conversation

@shoaibansari5398
Copy link

@shoaibansari5398 shoaibansari5398 commented Jan 16, 2026

What does this PR do?

Fixes #8868
Description
This PR addresses issue #8868 by adding debug logging to the configuration loading process. This helps diagnose environment-specific issues where agents or commands might not be loaded correctly from discovered directories.

Changes
Added debug logs in src/config/config.ts to track:
Configuration directories discovered (including OPENCODE_CONFIG_DIR, .opencode, and home directory).
The number of agents, commands, modes, and plugins loaded from each directory.
Failures during agent or command loading.
Added a regression test (packages/opencode/test/config/issue-8868.test.ts) that reproduces the user's setup with a .opencode/ directory to ensure configurations are loaded as expected.

How did you verify your code works?

Verification
I verified these changes by running the new regression test:

Ran bun test packages/opencode/test/config/issue-8868.test.ts.
Confirmed that the test passes and that the expected debug logs would be generated in a real scenario.

)

- Add debug logging to track directories discovered for config scanning
- Add logging for agents/commands loaded from each directory
- Add regression test reproducing user's setup with .opencode/ directory
- Helps diagnose environment-specific loading issues
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agents and Commands are not shown

1 participant