Guides, local models and sandbox commands: follow-ups from the factory-dev walkthrough #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dario/mlx-serve"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-ups from walking through the guides of #25 and from the first runs with a local model in the
factory-devsandbox.Guides (review of #25 and the walkthrough)
oc-mlx).<n>,<pr>) instead of concrete issue and pull request numbers.factory-devallows any shell command ("allowed_shell": ["*"]):go testandjust checkalready run agent-written code, so the list stopped little. The harness denials (git push,curl,wget, web tools) still apply.docs/tokens.md.sbxactually prints, what an existing secret or sandbox means, what recreating the sandbox deletes and how to check for unpushed work first, what the setup checks print, where the config lives.Local models and the sandbox
just mlx-serve: serves a profile's mlx-lm model on the host (model and port fromfactory.json), installs mlx-lm with uv and downloads the model on first use, offline, from an empty directory, on loopback.just sandbox: enters a sandbox (creating it the first time) and serves the local models its roles use while you are inside.just sandbox-update: installs a new factory binary andfactory.jsoninto the running sandbox and keeps its runs.just sandbox-recreate: rebuilds, recreates the sandbox and enters it.Fixes
exec format error, because--ignore-scriptsleft its placeholderbin/opencode.exe. The kit now copies the platform package's binary over it, as OpenCode's postinstall does, and the build fails unless the result is an ELF binary. The setup check runsopencode --version.factory-linuxfrom the manual build.Test evidence
just check: passes.uv, mlx-lm andsbx: start, readiness wait, cleanup on exit, an existing server left alone, a dying server reported. On a Mac:just sandbox-update, which printed the newfactory version. Not yet confirmed on a Mac:just mlx-serveandjust sandboxwith the uv install,sandbox-recreate, and the kit build with the OpenCode fix.Open questions
sbx envis experimental upstream; the recipes depend on it.🤖 Generated with Claude Code
- Set the forge token as a sandbox secret; where the host keeps it doesn't matter. - The model step covers both profiles: Claude Code with a subscription, or OpenCode with a local model (oc-mlx). - Issue and pull request numbers in commands are placeholders (<n>, <pr>). - factory-dev allows any shell command ("*"). In this sandbox the allow list stopped little, since go test and just check already run agent-written code. The harness denials (git push, curl, wget, web tools) still apply. - Forge-specific credential details moved to tokens.md, in a new "In a Docker Sandbox" section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>