self-managed-context

Pass

Audited by Gen Agent Trust Hub on Nov 30, 2026

Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [COMMAND_EXECUTION]: The skill enables the agent to execute shell commands to modify a local file (/tmp/.live_ctx/LIVE_CTX_MAIN.txt) that mirrors its active context window. This capability is used for in-place updates and manual eviction of tokens as part of the self-management protocol.
  • [INDIRECT_PROMPT_INJECTION]: The skill's design involves re-ingesting model-edited text as future context, creating a surface for indirect prompt injection. The harness mitigates this by pinning the system prefix and folding all model-written roles (except assistant) to user to prevent the model from claiming system authority.
  • Ingestion points: The mirror file is read back and parsed into the message list in SKILL.md and harness-protocol.md.
  • Boundary markers: The system uses [[CTX_TURN n role=...]] headers as delimiters.
  • Capability inventory: Uses run_shell, write_file, and read_file to manage the context mirror.
  • Sanitization: Implements role folding and pinned prefixes to ensure authoritative instructions remain unchanged.
  • [DYNAMIC_EXECUTION]: The implementation includes a startup monkeypatch for the SGLang serving stack to enable Suffix Cache Reuse (SCR), which optimizes compute by relocating cached states after context edits. It also mentions applying RL patches for strategy optimization.
  • [EXTERNAL_DOWNLOADS]: The skill references and utilizes implementation code from the official Facebook Research GitHub repository.
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 30, 2026, 07:34 PM