You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cli): flat builds point commands at plugin folders they do not ship #1162
A flat build (aidd translate --to <tool>) rewrites ${CLAUDE_PLUGIN_ROOT}/<path> in a plugin's MCP and hook commands to <out>/<path>, but it copies only agents/, skills/ and hooks/. A command that names any other folder, for example an MCP server under bin/ or a script under scripts/, points at a file the build never wrote.
Affected file(s)
cli/src/contexts/translate/application/strategies/flat-build-strategy.ts (resolveSuffixToFlatPath, which returns the suffix unchanged for any other folder)
Expected behaviour
Every path a shipped command names exists in the flat output: the referenced folder is copied next to the others.
Observed behaviour
The path is rewritten, the folder is not copied, and the command fails at runtime on the target tool. The rest of the plugin still works, so nothing reports it.
AI tool
Other: every flat host (Codex, Kilo, OpenCode, and the others built through the flat strategy).
OS
macOS, Linux, Windows.
Additional context
Failing the build on such a reference was considered and rejected: it would break a third-party plugin whose other surfaces work today.
No plugin in this repository references such a folder today.
Fixed on next. A bug sweep re-checked this against the current code after the CLI convergence (#1253).
Evidence: flatCommandFiles in build-flat.ts copies each folder a hook or MCP command names to //, and flatPluginRootAbsolute points the command at it. A probe on the real Kilo and OpenCode flat contracts, with .mcp.json naming ${ROOT}/bin/server.js, wrote plug/bin/server.js and plug/scripts/check.sh and produced the command /out/plug/bin/server.js. Existing tests cover it: engine.flat-extra-folders.unit.test.ts (hooks and MCP, stub contract) and disk-sink.edges.unit.test.ts and flat-mcp-writer.plugin-root.unit.test.ts (real codex, kilo, opencode). Mutation: dropping the configArtifact branch of foldsFlatMcp turned 6 of those tests red (2 files); restored. I also tried a Kilo hook that goes through the bridge, but my probe emitted no bridge file, so that case is unverified. The issue's observed case is MCP and hook-command folders.
Closing as fixed. Reopen with a reproduction if it still happens on a build from next.
Activity
blafourcade commentedon Nov 25, 2026
Fixed on
next. A bug sweep re-checked this against the current code after the CLI convergence (#1253).Evidence: flatCommandFiles in build-flat.ts copies each folder a hook or MCP command names to //, and flatPluginRootAbsolute points the command at it. A probe on the real Kilo and OpenCode flat contracts, with .mcp.json naming ${ROOT}/bin/server.js, wrote plug/bin/server.js and plug/scripts/check.sh and produced the command /out/plug/bin/server.js. Existing tests cover it: engine.flat-extra-folders.unit.test.ts (hooks and MCP, stub contract) and disk-sink.edges.unit.test.ts and flat-mcp-writer.plugin-root.unit.test.ts (real codex, kilo, opencode). Mutation: dropping the configArtifact branch of foldsFlatMcp turned 6 of those tests red (2 files); restored. I also tried a Kilo hook that goes through the bridge, but my probe emitted no bridge file, so that case is unverified. The issue's observed case is MCP and hook-command folders.
Closing as fixed. Reopen with a reproduction if it still happens on a build from
next.