← Files Context HandoffARCHIVED FILE

hooks/hooks.json

1.22 KB · Oct 2, 2026 · 00:30 UTC

↓ Download file

{
  "description": "Detect context compaction and keep the safe handoff workflow active until continuity is restored.",
  "hooks": {
    "SessionStart": [
      {
        "matcher": "^compact$",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"$PLUGIN_ROOT/hooks/context_health.py\"",
            "commandWindows": "py -3 \"%PLUGIN_ROOT%\\hooks\\context_health.py\"",
            "timeout": 5,
            "statusMessage": "Checking context continuity",
            "additionalContextLimit": 900
          }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"$PLUGIN_ROOT/hooks/context_health.py\"",
            "commandWindows": "py -3 \"%PLUGIN_ROOT%\\hooks\\context_health.py\"",
            "timeout": 5,
            "additionalContextLimit": 900
          }
        ]
      }
    ],
    "SessionEnd": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"$PLUGIN_ROOT/hooks/context_health.py\"",
            "commandWindows": "py -3 \"%PLUGIN_ROOT%\\hooks\\context_health.py\"",
            "timeout": 3
          }
        ]
      }
    ]
  }
}

SHA-256: 989ecd9d4775faaf4c3816acdd18dbe7cc8dc30d732ce0bbc1f42bd4ae95fab7