agents-skills-feedback-loop
Pass
Audited by Gen Agent Trust Hub on Oct 17, 2026
Risk Level: SAFECOMMAND_EXECUTIONPERSISTENCEINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: Several scripts (append_learning.py, consolidate.py, bulk_wire.py, install_capture_hook.py) and the capture hook (learnings_capture.py) use subprocess to execute local commands, manage files, and invoke the AI model. These are standard operations for development and automation tools.
- [PERSISTENCE]: The install_capture_hook.py script modifies global configuration files (~/.claude/settings.json and ~/.codex/hooks.json) to register a session-end hook. This is the documented mechanism for enabling automatic learning capture.
- [INDIRECT_PROMPT_INJECTION]: The automated capture hook (assets/learnings_capture.py) processes untrusted session transcripts to extract learnings. It mitigates potential injection attacks by:
- Disabling all tools (--tools "") during the reflection model call to prevent the model from executing actions based on transcript content.
- Using a dedicated recursion guard (SENTINEL env var) to prevent infinite loops (fork bombs) caused by the reflection call triggering the hook.
- Running redaction logic (append_learning.py) on the extracted content before writing it to the filesystem to remove sensitive data like API keys.
- Ingestion points: assets/learnings_capture.py reads the session transcript from a path provided by the agent platform.
- Boundary markers: The reflection prompt uses clear headers such as 'SESSION TRANSCRIPT (trimmed):'.
- Capability inventory: The hook invokes the claude CLI and then executes append_learning.py to perform local file writes.
- Sanitization: Tool-free reflection ensures the model cannot interact with the environment, and a multi-pattern regex engine redacts credentials and PII.
Audit Metadata