{"version":"2.1.105","anchor":"plugin-monitors-background-watch-scripts","canonical_anchor":"plugin-monitors-background-watch-scripts","heading":"Plugin Monitors (Background Watch Scripts)","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.105\/e\/plugin-monitors-background-watch-scripts","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.105","markdown":"### Plugin Monitors (Background Watch Scripts)\n\n**What**\n\nPlugins can now define persistent background monitors that stream events into the conversation as `<task_notification>` events.\n\n**Details**\n\n- Define monitors in a `monitors\/monitors.json` file at the plugin root, or inline via the `monitors` field in `plugin.json`\n- Each monitor has: `id` (unique within plugin), `description`, `command` (shell command), and an `armTrigger`\n- Arm triggers control when monitors start:\n- `\"always\"` \u2014 arms at session start and on plugin reload\n- `\"on-skill-invoke:<skill>\"` \u2014 arms the first time a specific skill is dispatched\n- Each stdout line from the monitor command becomes a notification; stderr goes to an output file\n- Monitor IDs are deduped to prevent duplicate spawns on reload\n- Session-scoped: monitors stop when the session ends\n\n**Evidence**\n\nMonitor schema (search for `\"monitors.json\"`) and arm triggers (search for `\"on-skill-invoke\"`)"}