Observe and operate agents
Combine evidence, bounded retries, safe tool access, secrets management and escalation.
Keep the minimum useful evidence
The infographic lists a structured plan, commit and pull-request history, workflow results, artifacts and review outcomes. Together these help explain what happened and why a result was accepted or rejected.
Preserve necessary logs and reports using a controlled retention policy. Record decisions and metadata rather than indiscriminately logging prompts, credentials or sensitive tool output.
Design for imperfect execution
Bound retries and distinguish transient failures from invalid requests or missing authorization. Repeated failure should trigger escalation, not an endless loop. Prepare a rollback approach for high-impact changes.
Keep capability narrow
Explicit tool allowlists, restricted MCP access and minimal workflow permissions reduce the blast radius. Secrets belong in protected mechanisms, not instructions or committed files. Pass only what is needed to the relevant environment.
The hook JSON and permission fragments in the image are conceptual; their event schema and runtime behavior are not a universal implementation. Use the current hooks reference and test fail-closed behavior before relying on a control.