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
.claudedirectory. These operations involve copying asset files and merging configuration intosettings.json, which are intended administrative tasks for setting up the hook environment. - [INDIRECT_PROMPT_INJECTION]: The
agent-return-guard.mjshook 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_messagefield 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.jsonusing Node.js filesystem modules. It has no network access. - Sanitization: The tool uses character length to estimate token counts and sanitizes the
agent_typeinput to generate safe filesystem slugs (alphanumeric and dashes only).
Audit Metadata