Skip to content

feat: support configurable non-Claude runtimes#663

Open
stakeswky wants to merge 1 commit intoqwibitai:mainfrom
stakeswky:fix/issue-80-multi-runtime
Open

feat: support configurable non-Claude runtimes#663
stakeswky wants to merge 1 commit intoqwibitai:mainfrom
stakeswky:fix/issue-80-multi-runtime

Conversation

@stakeswky
Copy link
Copy Markdown

Closes #80

Summary

This PR adds configurable multi-runtime support so NanoClaw is no longer hard-wired to Claude only.

What changed

  1. Added runtime config in group container config:
    • containerConfig.runtime?: 'claude' | 'codex' | 'gemini' | 'opencode'
  2. Added runtime resolver/utilities (src/agent-runtime.ts):
    • normalize + validate runtime
    • preserve backward compatibility (claude fallback)
    • runtime-specific secret allowlist
  3. Host runner updates:
    • pass selected runtime into container input (src/index.ts)
    • load runtime-specific credentials from .env (src/container-runner.ts)
  4. Container runner updates:
    • keep existing Claude Agent SDK path for claude
    • add CLI execution path for codex / gemini / opencode
  5. Container image updates:
    • installs @openai/codex, @google/gemini-cli, opencode-ai
  6. Docs/tests:
    • added tests for runtime resolution and secret mapping
    • documented runtime selection in README + SPEC

Backward compatibility

  • If containerConfig.runtime is missing or invalid, NanoClaw defaults to claude.
  • Existing deployments continue to behave exactly as before.

Validation

  • npm run build
  • npm test ✅ (302 tests passing)

@jackbravo
Copy link
Copy Markdown

I'm trying to install with this PR. Is there an equivalent to running opencode and then /setup? I guess that is missing, no?

@stakeswky
Copy link
Copy Markdown
Author

Great question — for this PR there isn’t a dedicated -style wizard for yet.\n\nCurrent equivalent is:\n1. Configure for the target group\n2. Provide the runtime credentials in (as documented by runtime secret mapping)\n3. Start/restart NanoClaw normally so the container picks up the runtime\n\nSo yes, the Claude-style guided setup flow is still missing for non-Claude runtimes right now. I’ll track this as follow-up UX work so onboarding for can be as smooth as Claude .

@stakeswky
Copy link
Copy Markdown
Author

Thanks for flagging this — yes, your understanding is correct.

For this PR there is currently no non-Claude equivalent of running opencode + /setup.

Current path is manual:

  1. set containerConfig.runtime: "opencode" for the group
  2. provide runtime credentials in .env (per runtime secret mapping)
  3. restart NanoClaw so container runtime config is reloaded

So the guided onboarding flow is still Claude-specific today. We should add a follow-up onboarding/setup flow for codex/gemini/opencode to close this gap.

@jackbravo
Copy link
Copy Markdown

nevermind. I see that opencode supports claude skills as well. But they are not loaded by default. I think we just need to modify the readme for tools that support claude skills. In my case, on openrouter, I just needed to run /skills, then select setup and then it proceeded with the installation.

@stakeswky
Copy link
Copy Markdown
Author

Thanks for confirming, and great catch 🙏\n\nYou’re right that the current README could make the Claude-skills path clearer for non-Claude runtimes. I’ll follow up by tightening the docs around:\n- which runtimes support Claude skills\n- default loading behavior\n- a quick-start example for OpenRouter users\n\nAppreciate you validating this flow in real usage.

@Andy-NanoClaw-AI Andy-NanoClaw-AI added PR: Feature New feature or enhancement Status: Needs Review Ready for maintainer review labels Mar 5, 2026
@qwibitai qwibitai deleted a comment from TomGranot Mar 9, 2026
@gavrielc
Copy link
Copy Markdown
Collaborator

gavrielc commented Mar 9, 2026

@stakeswky This would be really cool to support. How well has it been tested? It looks a bit simple - amazing if it works but I think it needs stress testing to confirm.

Also, I'm not sure configurable selection of runtime is the right way to go. This requires a unified interface but the underlying agents don't all support the same feature set.

I think to get the full benefit of each agent, the user needs to choose the agent they want to run and have an installation that's customized for that agent and gets all the benefits.

Open though to being convinced otherwise if there are clear and common use cases where you need to have different agents runtimes in the same installation

@Andy-NanoClaw-AI Andy-NanoClaw-AI added Status: Blocked Blocked by merge conflicts or dependencies Status: Needs Review Ready for maintainer review and removed Status: Needs Review Ready for maintainer review Status: Blocked Blocked by merge conflicts or dependencies labels Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Feature New feature or enhancement Status: Blocked Blocked by merge conflicts or dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support runtimes and providers other than Claude/Anthropic (aka support opencode, codex, gemini, etc)

4 participants