[Bug] Built-in sub-agent explore doesn't work
Description
When a model tries to use the explore sub-agent, the console shows the error Subagent 'explore' not found.
The problem appears to be that explore.md isn't being packaged, and therefore isn't installed. I'm not an npm expert, but it seems like adding source/subagents/built-in/ to the files array in package.json would fix the problem.
I confirmed that the file doesn't exist on my system. Adding the file to nanocoder/agents causes the agent to appear in /agents list when it didn't before.
Environment
- OS: macOS 27
- Node version: v26.8.1
- Nanocoder version: 1.30.0 (installed via Homebrew)
- Provider: Lemonade 11.9.0 on Ubuntu
- Model: Qwen3.8-Flash-Next-GGUF-UD-IQ4_XS
Steps to Reproduce
- Load a model and give it a prompt that uses the explore agent. Something like "explore the project directory" should work.
- See the error
Logs/Screenshots
(base) 13:54 bfoz@mini:~% find $(brew --cellar)/nanocoder -name "*.md" | grep -i agent
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/source/app/prompts/sections/subagents.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/Agent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/ProxyAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/MockAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/RetryAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/undici/docs/docs/api/Agent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/undici/docs/docs/api/ProxyAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/undici/docs/docs/api/SnapshotAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/undici/docs/docs/api/MockAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/undici/docs/docs/api/RetryAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/@agentclientprotocol/sdk/README.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/cheerio/node_modules/undici/docs/docs/api/Agent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/cheerio/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/cheerio/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/cheerio/node_modules/undici/docs/docs/api/ProxyAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/cheerio/node_modules/undici/docs/docs/api/SnapshotAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/cheerio/node_modules/undici/docs/docs/api/MockAgent.md
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/node_modules/cheerio/node_modules/undici/docs/docs/api/RetryAgent.md
(base) 13:55 bfoz@mini:~% find $(brew --cellar)/nanocoder -name "explore*"
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/dist/commands/explorer.js.map
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/dist/commands/explorer.d.ts.map
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/dist/commands/explorer.d.ts
/opt/homebrew/Cellar/nanocoder/1.30.0/libexec/lib/node_modules/@nanocollective/nanocoder/dist/commands/explorer.js
Workaround
Manually adding explore.md seems to work (on a Mac).
curl -o ~/Library/Preferences/nanocoder/agents/explore.md https://raw.githubusercontent.com/Nano-Collective/nanocoder/main/source/subagents/built-in/explore.md
I can confirm I'm also missing the explore.md sub-agent file on macOS with the same versions.
I'm not sure if this is also an issue but I don't have the ~/Library/Preferences/nanocoder/agents/ folder already created.
% ls -lah ~/Library/Preferences/nanocoder/
total 456
drwxr-xr-x@ 5 user staff 160B Sep 16 17:14 .
drwx------+ 398 user staff 12K Sep 16 18:33 ..
-rw-r--r--@ 1 user staff 216K Sep 16 18:29 .nano-coder-history
-rw-r--r--@ 1 user staff 501B Sep 16 17:14 agents.config.json
-rw-r--r--@ 1 user staff 806B Sep 16 18:27 nanocoder-preferences.json
Confirmed, diagnosis in the report is right.
source/subagents/built-in/ isn't in the files array in package.json, so explore.md never ships. getBuiltInAgentsDir() resolves to ../../source/subagents/built-in from dist/, which silently resolves to nothing on a real install — hence Subagent 'explore' not found with no other signal.
Plan:
- Copy built-in agent
.mdfiles intodist/subagents/built-in/at build time (same pattern ascontributors.json), so the dist path is the real one. - Harden the resolver, warn instead of failing silently when the dir is missing.
- Tests: resolver unit test + a packaging test asserting
explore.mdis in thepnpm packoutput, so this can't regress. - Verify end to end from the packed tarball in a clean install.
Happy to take this one.. @akramcodez, can you assign it to me? 🙏
Picking this up - a fix will follow shortly.
It looks like this is fixed on main: source/subagents/built-in is now in the files array in package.json, so explore.md should ship in the next release. Can this be closed once that release is out?
sure @addyCooks go for it 👍
When I upgraded to 1.31.0, I got a warning message about the included explore.md conflicting with the copy I had put in nanocoder/agents. I removed the copy and the sub-agent still works. So it looks to me like the fix has shipped.
Fixed in 40020735: built-in subagents are now included in the published package. Confirmed working on 1.31.0.
Closing as part of a backlog tidy-up. Reopen it if anything here is still broken.