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

background-silent

A deny rule by default: it refuses a background task of the session that has written nothing for advise_minutes (30 unset), and names what to run instead.

What it catches

A background task of the session that has written nothing for advise_minutes (30 unset).

Why

A background task's output file and event notices are the only sign it is working, and one that writes nothing for half an hour is more likely waiting on a stdin nobody feeds, a lock or a prompt than doing slow work: a python3 - reading an unfed stdin sat for eight hours that way. On each shell call of a root session magus reads the session's transcript for the background tasks still running, as background-left does, and measures each one's silence from the latest of its start, its output file's last write and its newest event notice. It reads only the bytes written since its last call, resuming from a checkpoint in the workspace cache, so a transcript of hundreds of megabytes costs a hook call no more than a small one. Past 30 minutes of silence the call is advised, once per task per session; past 60 minutes every shell call that is not a read is refused, naming each task's id, age, silence, command, output file and the TaskStop call that ends it. magus never stops a task itself. The text says what a stop loses: only the process; the output file stays on disk, reads still pass, and a magus run keeps its output ref and history. It names how to pick the work back up, bounded at background-unbounded's ceiling. advise_minutes and deny_minutes set the two thresholds (30 and 60 unset); deny_minutes must be more than advise_minutes. A watcher with an expiry is not judged, since the host ends it. A subagent's tasks are background-left's at its stop. The host's hook input carries no list of background tasks, so the transcript is the record read.

Default and override

By default this rule takes the decision deny. A workspace sets it by name, in its root magusfile, to deny, advise or off:

magus\guard.builtins({"background-silent": "advise"})

A loosening takes effect once it is committed; a tightening applies at once.

Seeing it

A verdict names its rule in brackets, which is how you got here:

deny [background-silent]: ...

A workspace that sets this rule to advise sees advise [background-silent]: ... instead.

magus describe rule background-silent prints the same entry at a terminal, and magus describe rules lists every rule this workspace enforces.

See also

guardrulesbackground-silentdeny
Last updated (61fd39a7)
Glossary

Workspace

The magus root directory that owns a set of projects and shared config; the unit magus operates over. Workspace in full.

Magusfile

The magusfile.buzz that declares a project's targets (as export funs) and binds its spells. Magusfile in full.

Op

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

Buzz

The language magusfiles are written in (the .buzz engine). Buzz in full.

Cache

The content-addressed store magus consults before running a target, so unchanged work is skipped. Cache in full.

CI

An ordinary target you compose yourself with ctx.needs; magus does not hardcode its stages. It is the anchor magus affected ci keys off, and ci strips the rw charm. CI in full.

Agent

A model working through an agent host such as Claude Code, Codex, Cursor or OpenCode. magus treats an agent as one more caller of its CLI, MCP tools and console, held to the same checks as a person. Agent in full.

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. Session in full.

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. Run in full.

Conventions

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