moshcode 0.117.0 新增 moshcode work,以驗證命令管理多個智能體任務
moshcode work: 50 agents, one verifier, and an inbox
moshcode 0.117.0 新增 moshcode work,讓每項任務由獨立的無頭程序處理,並以驗證命令的退出碼為 0 作為完成標準。作者以 50 個 Claude workers 並行處理 19 項任務,全部首次通過驗證,本機測試失敗數由 139 降至 0。狀態命令顯示數字而非對話記錄;三次失敗後,任務會進入收件匣並保留其 worktree。
moshcode work: 50 agents, one verifier, and an inbox
The people running thousands of AI agents on math proofs are not watching thousands of agents. The proof checker is. Lean says yes or no to every attempt, a wrong one gets thrown away, and the human looks at two things: what passed, and what is stuck.
Our agent tools were built the other way. The herd is a terminal pane per agent and a swarm is a handful of panes. That tops out at the number of panes one person can read, which is about ten.
So moshcode 0.117.0 adds moshcode work. Every task carries a verify command, and exit 0 is the only definition of done. Workers are headless processes, each in its own git worktree. The engine's opinion of its own work is logged and never consulted.
moshcode work from-tests fix-tests # one task per failing test file
moshcode work run fix-tests -n 50 --engine claude # fifty workers
moshcode work status fix-tests # numbers, not transcripts
moshcode work inbox fix-tests # only what failed every attempt
moshcode work apply fix-tests # land the passing patches
A failed attempt goes back in the queue with the verify output in its next prompt. After three it lands in the inbox with its worktree kept. A task that already passes costs one verify and no tokens. Claims are atomic file renames, so several runs on one queue split it. Every run is recorded as an OpenFleet swarm.
The first run, on moshcode itself
We had 139 tests that failed locally and passed in CI. from-tests ran every file on its own and found exactly one that really failed. The other 138 were PWA tests that crash when the PWA's own dependencies are not installed, instead of skipping like their neighbours do.
That is 19 tasks. The verify for each PWA file ran it twice, without the dependencies (must skip) and with them (must pass). 50 Claude workers took them in parallel.
19 of 19 passed on the first attempt. The inbox stayed empty. No assertion was added or removed. Local failures went from 139 to 0.
The one real failure was the best find. A test of moshcode mcp install inherited the host's PATH and HOME, so any coding engine installed on the box joined the run and did a real mcp add against my own config. The worker made it use only the stub engines.
The next queue needs a verifier other than tests: typecheck errors, a URL that must return 200, and eventually Lean.
moshcode upgrade self gets it. Source and PRD: https://github.com/moshcoder/moshcode/releases/tag/v0.117.0
來源:DEV Community · dev.to