agent-return-setup

Pass

Audited by Gen Agent Trust Hub on Aug 14, 2026

Risk Level: SAFECOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The skill uses Bash and Node.js to install, configure, and verify hook files within the .claude directory. These operations involve copying asset files and merging configuration into settings.json, which are intended administrative tasks for setting up the hook environment.
  • [INDIRECT_PROMPT_INJECTION]: The agent-return-guard.mjs hook implements a feedback loop that injects instructions back into the agent's turn history when a response is blocked for being over budget. This is a form of indirect injection where the tool's output influences the agent's next action.
  • Ingestion points: The hook processes the last_assistant_message field from the subagent stop event payload.
  • Boundary markers: Feedback messages are explicitly prefixed with "Directive from the agent-return guard, not user data" to help the agent distinguish system-level constraints from human user input.
  • Capability inventory: The hook performs file writes to the .claude/reports/ directory and reads configuration from .claude/agent-return.json using Node.js filesystem modules. It has no network access.
  • Sanitization: The tool uses character length to estimate token counts and sanitizes the agent_type input to generate safe filesystem slugs (alphanumeric and dashes only).
Audit Metadata
Risk Level
SAFE
Analyzed
Aug 14, 2026, 06:23 PM
Security Audit — agent-trust-hub — agent-return-setup