context-canary

Monitor AI interactions for context degradation using name and turn counter signals.

Updated Jun 21, 2026
One-click install
npx skills add https://github.com/apexradius/agentic-os --skill context-canary
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-canary
Source: https://github.com/apexradius/agentic-os/tree/main/skills/context-canary
Command: npx skills add https://github.com/apexradius/agentic-os --skill context-canary

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill detects the degradation of context in AI interactions, signaling when the AI is no longer effectively attending to earlier instructions, which can lead to loss of context, instruction drift, or compaction loss.

Core Features & Use Cases

  • Context Canary: Installs a silent canary signal at the start of sessions to detect degradation of context.
  • Trip Protocol: Provides a protocol for handling trips (missing canary signals), including checkpointing and re-installing the canary.
  • Use Case: When an AI user detects that the AI has stopped using their name as expected, the context-canary skill can be used to detect if the AI has lost context and initiate a recovery protocol.

Quick Start

Use the context-canary skill with the 'Sam' name to monitor context degradation during an AI interaction.

Frequently Asked Questions about context-canary

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect context degradation in long AI interactions?

A context canary detects context loss by requiring the AI to include a specific name and turn counter in every response. If the AI stops including this signal, it indicates the ongoing context and earlier instructions have degraded.

When should I monitor AI context safety in high-stakes sessions?

Monitor AI context safety during long or high-stakes sessions where instruction drift or compaction loss poses a significant risk. This ensures the AI adheres to ongoing context and earlier instructions without degradation.

How do I recover context when an AI stops following instructions?

Recover context when an AI stops following instructions by triggering a trip protocol. This protocol handles missing canary signals through checkpointing and re-installing the canary to restore adherence.

What is instruction drift and how does a canary signal prevent it?

Instruction drift occurs when an AI stops attending to earlier instructions during long sessions. A canary signal prevents it by embedding a required name and turn counter in responses, alerting you when context is lost.

Can I use context monitoring for compaction loss in AI agents?

Yes, you can use context monitoring for compaction loss in AI agents. The canary signal detects when the agent no longer effectively attends to earlier instructions and initiates a recovery protocol.