CodexGuild

Guides

Agent training

Every mistake CodexGuild stops becomes a lesson. Your coding agents start the next session with the lessons from their own mistakes, and one agent's hallucinated package warns every agent on CodexGuild.

Coding agents make the same mistakes over and over: a package name that doesn't exist, a version that was never published, rm -rf on a path that may be empty, a peek into ~/.codex/auth.json. CodexGuild's checks already stop them. Agent training turns what they stop into lessons, so the agent stops trying.

It is a loop with four steps:

  1. Catch. Package checks and the command guard stop the mistake.
  2. Remember. CodexGuild records what was caught for your account: the kind of mistake and, for packages, the name.
  3. Teach. At the start of every session, codexguild_sync hands your agent the lessons from the last 30 days, in plain words, with the package names it got wrong.
  4. Measure. Dashboard → Training shows what was caught, per day and per kind, and how often the same mistake came back on another day. That is the number lessons are meant to bring down.

Lessons, not fine-tuning: nothing about your model changes. Your agent gets the right context at the right time, in any harness that runs CodexGuild.

What gets caught

KindCaught byWhat the agent learns
Package that doesn't existpackage checkcheck every new dependency first; never install a name from memory
Version never publishedpackage checktake versions from the registry, not from memory
Malicious or squatted packagepackage checkstop, tell the user, rotate credentials if it was installed
Look-alike package namepackage checkcopy names exactly from the official docs
Data-destroying commandcommand guarddry-run, back up, never rm -rf with a variable that may be empty
Credential file readcommand guardnever open agent login files; ask the user
Weakened checkscommand guardfix what the check reports instead of turning it off

Only package names and the guard's decision (blocked or asked) are recorded. The command line, file paths and code never leave your machine: the guard sends {kind, decision} and nothing else.

The network: one agent's mistake warns every agent

Agents hallucinate the same package names again and again, and attackers register those names with a malicious install script. This is called slopsquatting. A registry only sees a package once it is published; CodexGuild sees the names agents try before anyone registers them.

  • When your agent tries a package that doesn't exist, the name is counted across CodexGuild without your account.
  • Once agents on three or more accounts tried the same name, every agent that checks it is told it is a common hallucination, and agents whose stack uses that ecosystem get the list at session start.
  • If such a name is published afterwards, every package check blocks it as a likely slopsquat and explains why. A name that becomes widely used (50,000+ weekly npm downloads) is downgraded to a warning: a real project may have taken it.

The three-account minimum keeps private package names private: a name only your company uses never reaches anyone else. Turn Warn other agents about hallucinated packages off in Dashboard → Training to stop contributing; past counts carry no account and can't be traced back. Network warnings are third-party data and reach the agent inside the untrusted-content wrapper.

Plans

FreeGuardProTeam
Network warnings (hallucinated names, likely slopsquats)yesyesyesyes
Lessons from your agents' own mistakes—yesyesyes
Lessons from the whole team's mistakes———yes
Training dashboardyesyesyesyes

On Free, mistakes are still counted (the dashboard shows them) and the agent is told how many were caught; lessons start on the Guard plan. The live levels are served at GET /v1/plans (features.training).

Setup

Nothing extra. If your agent runs codexguild_sync at session start and the guard hook is installed (Connect), training is on. Guard reports need @codexguild/mcp 1.18.0 or newer; package mistakes are recorded by the server with any version.

REST

MethodPath
POST/training/mistakesguard report {events: [{kind, decision}]} (agent key; not metered)
GET/training/summarythe dashboard's numbers, lessons and network counts (signed in)
PATCH/training/settings{shareMistakes} (signed in)

Package checks (POST /packages/check) return network: {accounts, firstSeenAt, registeredAfter} when the network knows the name. Full shapes: API reference.