magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit

Services diagnostics

Codes in the MGS5xxx range flag problems with long-running service ops: services that will run as separate processes when they look like they should be one shared instance, and (later) op invocations that contradict their declared kind. Magus raises them at run time (as a typed DiagnosticError) and, where applicable, as a magus doctor health check so the gap is visible before the work runs.

Codes

  • MGS5001: near-duplicate services that will run as separate processes.
  • MGS5002: a service op detaches, breaking foreground supervision.
  • MGS5003: a command op runs a watcher and never exits.

MGS5004 was retired in 2026-09. It refused --detach when no server was running to hand the run to; --detach now starts the run as its own session writing to a log file, and needs no server. The number is not reused.

servicesdiagnosticserror codesMGS5xxxservice opdoctorsharing
Last updated (8b20a199)
Earlier changes on this page (3)

Full history ↗ · Blame source ↗

Glossary

Op

A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target). See operations.

Service

A long-running or shared process magus manages across runs, distinct from a one-shot target. See services.

Server

The background process a person starts with magus server start. It serves MCP, the console, background jobs and the warm knowledge graph, and adopts nested magus calls into one pool. See server.

Health

The at-a-glance server state derived from the pool: healthy when the pool is reporting, degraded when it reports an error, down when there is no pool. The dashboard color-codes each state. See server.

Session

An agent host's conversation, by the id the host delivers to its hooks. magus never mints one: a record with no session is unattributed, and the OS user it carries says whose account ran it.

Invocation

One magus process's recorded facts (the targets it finished, their outcomes, the lease it acted as, and the session it ran in when a host delivered one), kept in a repo-scoped store every worktree shares. magus session lists them; the store prunes itself by last-fact age.

Run

One target executing under one magus invocation, such as magus run test web or magus affected ci. A run keeps its captured output behind an output reference. Every magus run is a run whether or not any job asked for it; see Job for how the two relate.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.