PromptBase
PromptBase SelectGet Select
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
(claude-5-5-sonnet)
Token size
4,074
Example input
[Describe the AI agent, its purpose, connected tools, permissions, workflows, and systems it can access.]: AI coding agent connected to GitHub, PostgreSQL, and deployment tools. [Describe what happened, when it started, what was expected, what actually occurred, and whether the problem is ongoing.]: During database cleanup, the agent deleted live customer records. [Paste relevant logs, actions, alerts, timestamps, error messages, audit records, or observations. Write "Unknown" if unavailable.]: SQL execution logs, database audit trail, and agent transcript. [Describe business-critical systems, operational restrictions, existing containment measures, responsible teams, recovery requirements, or specific concerns.]: Preserve evidence, prevent further writes, and evaluate safe recovery.
Example output
# AI Agent Incident Response Report HIGH PRIORITY — Unverified Containment ## 1. Incident Brief An AI coding agent reportedly deleted live customer records from a PostgreSQL database while performing a cleanup operation. | Field | Assessment | | -------------------- | -------------------------------------------------------------------- | | Incident | Suspected unauthorized production data deletion | | Current State | UNDETERMINED | | Priority | HIGH | | Recovery Gate | NOT READY | | Affected Environment | PostgreSQL; AI agent connected to GitHub and deployment tools | | Evidence Confidence | Preliminary — incident reported, records not supplied | | Immediate Decision | Prevent additional destructive writes and preserve forensic evidence | | Escalation | Incident commander, database administrator (DBA), application owner | ### Reported facts and uncertainties The supplied description identifies a database cleanup task, suspected deletion of live customer records, and three evidence sources: SQL execution logs, database audit trails, and an agent transcript. However, the actual records have not been provided. Consequently, the deletion, its scope, and its persistence remain independently unverified. Material unknowns include: - Whether the agent can still execute database writes. - Which SQL statements executed and committed. - Which customers, tables, and dependent records were affected. - Whether affected data can be recovered through backups or PostgreSQL point-in-time recovery (PITR). - Whether downstream services have processed or propagated the changes. ### Immediate containment decision The responsible operator should pause the affected agent workflow and its scheduled or delegated executions, preserving its current transcript and execution identifiers where feasible. A DBA should restrict the agent's database write capability using the narrowest effective control. If the credential is shared with production services, evaluate those dependencies before revocation. Do not initiate an unverified production restore. ## 2. Incident Reconstruction & Exposure ### A. Evidence-backed timeline | Time | Actor / Event | Evidence Status | Consequence | | ------- | --------------------------------------------- | --------------- | ------------------------------------ | | Unknown | Database cleanup requested | REPORTED | Authorized task initiated | | Unknown | AI agent performed database operations | REPORTED | Execution details unknown | | Unknown | Customer records reportedly deleted | REPORTED | Actual database changes unverified | | Unknown | SQL and audit records identified as available | REPORTED | Potential forensic sources | | Present | Containment effectiveness unknown | UNKNOWN | Additional writes cannot be excluded | The expected workflow was legitimate database cleanup without deletion of live customer records. The suspected failure path is: Cleanup request Reported Agent constructs database action SQL and decision path not yet inspected PostgreSQL execution and commit Not independently verified Possible customer-data loss Scope and persistence unknown The decisive distinction is between an agent proposing a destructive statement, the database accepting it, the transaction committing, and records actually disappearing. ### B. Impact and exposure map | Asset / Boundary | Observed Impact | Potential Exposure | Evidence Gap | | ----------------------- | ------------------------ | -------------------------------------------- | ------------------------------------- | | Customer database | Deletion reported | Missing customer records | SQL, commit evidence, row identities | | Related tables | Unknown | Cascading deletions or broken relationships | Constraints and audit records | | Agent database identity | Database access reported | Additional destructive operations | Effective privileges and sessions | | Application services | Unknown | Failed workflows, missing customer data | Application logs and integrity checks | | GitHub and deployment | No impact demonstrated | Additional mutations if reachable | Agent tool activity | | Backups and replicas | Unknown | Recovery limitations or replicated deletions | Backup inventory, PITR status | Database permissions establish potential reach, not proof of additional changes. ## 3. Containment Decision Plan | Priority | Recommended Action | Responsible Role | Completion Evidence | | -------- | -------------------------------------------------------------------------- | ------------------ | ------------------------------------------ | | P0 | Pause the affected autonomous workflow and recurring triggers | Agent operator | No active or newly started executions | | P0 | Restrict the agent's destructive database access | DBA / Security | Effective privileges and sessions verified | | P0 | Preserve available SQL logs, audit records, transcripts, and configuration | Incident responder | Evidence inventory and integrity records | | P1 | Verify actual committed changes and affected records | DBA | Reconciled transaction and impact report | | P1 | Protect recoverable backups and relevant WAL history from expiration | Backup owner / DBA | Recovery sources and retention confirmed | | P1 | Check downstream jobs and dependent systems for propagation | Application owner | Affected integration inventory | ### Operational cautions Pausing the agent may interrupt legitimate automation. Database credential changes may also affect applications if they use the same identity. Avoid broad production shutdowns when targeted restrictions adequately contain the incident. Preserve existing audit and recovery materials before disruptive changes whenever feasible. During active destructive activity, prioritize preventing further harm. Do not delete forensic records, execute speculative corrective SQL, or revoke shared credentials without evaluating critical dependencies. ### Evidence preservation register | Evidence ID | Required Artifact | Current Status | | ----------- | ----------------------------------------------------- | ------------------------ | | E-01 | Exact SQL statements, parameters, execution results | Identified, not supplied | | E-02 | PostgreSQL audit and transaction records | Identified, not supplied | | E-03 | Agent transcript, tool requests and tool responses | Identified, not supplied | | E-04 | Database role permissions and connection history | Not established | | E-05 | Backup inventory and WAL recovery availability | Not established | | E-06 | Database integrity and customer-record reconciliation | Not established | Evidence should retain source identifiers, timestamps with timezones, provenance, and integrity metadata when available. Sensitive customer content and credentials should be redacted from shared investigative copies. ## 4. Cause, Recovery & Prevention ### A. Cause assessment No root cause is confirmed. | Hypothesis | Status | Verification | | --------------------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------- | | Agent generated an incorrectly scoped `DELETE` or similar statement | HYPOTHESIS | Compare transcript, SQL parameters, database execution and committed effects | | Agent held broader database privileges than its cleanup task required | HYPOTHESIS | Inspect effective role grants and intended task authorization | | Sensitive database changes lacked an effective approval boundary | HYPOTHESIS | Inspect approval policy and execution evidence | | Agent retried or repeatedly executed a destructive operation | HYPOTHESIS | Correlate tool calls, transaction IDs, scheduler events and timestamps | Prompt injection, credential compromise, or malicious intent are not established by the description. Those possibilities should only be investigated further if supporting signals emerge. The review must separate the initiating error from enabling conditions such as excessive privileges or ineffective approval enforcement. ### B. Recovery gate NOT READY Production restoration is not authorized by the available evidence. Recovery requires the following conditions to be established: 1. Containment — destructive activity has stopped, and the relevant permissions or execution paths are controlled. 2. Impact — affected records, relationships, and downstream changes are identified. 3. Recoverability — a valid backup or other recovery source is proven usable. 4. Safe reconstruction — restoration is tested in an isolated environment before production changes. 5. Validation — record integrity, affected application workflows, authorization boundaries, and regression checks pass. 6. Approval — the responsible incident and database owners authorize production restoration. For PostgreSQL, evaluate PITR only after confirming the required base backup and continuous WAL availability. Restore into an isolated database to establish the recoverable pre-incident state. Compare that state against the current production database and legitimate changes made after the incident. A full production rollback could otherwise destroy valid newer data. The preferred strategy is the smallest verified recovery that restores affected records and relationships without overwriting unrelated legitimate changes. ### C. Targeted safety and liveness tests | Test | Passing Condition | | --------------------- | --------------------------------------------------------------------- | | Unauthorized deletion | Agent cannot delete protected customer data | | Approved cleanup | Legitimate permitted cleanup still works | | Permission boundaries | Database role cannot exceed authorized task scope | | Retry safety | Repeated executions do not introduce destructive or duplicate effects | | Recovery integrity | Restored records and relevant relationships reconcile | | Monitoring | Unexpected destructive operations produce actionable alerts | Recovery must demonstrate both safety and liveness: unauthorized changes are prevented, while legitimate work can resume without permanent blocking or uncontrolled retries. ### D. Postmortem and corrective work The postmortem should establish the committed changes, actual data impact, responsible execution path, containment effectiveness, and recovery outcome. Corrective work should be proportional to demonstrated causes. If overbroad privileges are confirmed, restrict the existing database role. If the approval boundary failed, repair that boundary. If a retry loop caused repeated execution, correct its existing trigger or retry logic. Reuse existing PostgreSQL permissions, agent controls, audit records, and deployment safeguards rather than building redundant infrastructure. Assign every correction an accountable role and observable verification criterion. ## 5. Final Response Directive ### RESPONSE VERDICT Contain the affected agent's production write capability and preserve evidence before attempting data recovery. The reported loss of live customer records warrants HIGH-priority handling, but current containment, committed impact, and recoverability remain unverified. ### NEXT 3 ACTIONS ### 1 Contain the execution path Owner: Agent operator and DBA Pause the affected workflow and prevent additional destructive writes. Complete when sessions, effective restrictions, and relevant triggers have been verified. ### 2 Reconstruct committed impact Owner: Incident responder and DBA Correlate agent transcripts, SQL execution records, audit trails, and database state. Complete when committed effects and material uncertainties are documented. ### 3 Validate an isolated recovery Owner: DBA and application owner Establish recovery sources, test restoration outside production, and reconcile affected data. Complete when documented integrity and application checks pass. ### DO NOT PROCEED WITH - Unverified bulk restoration or destructive corrective SQL against production. - Re-enabling the affected agent's original write privileges before correcting the demonstrated failure boundary. - Deleting logs, transaction evidence, or recovery sources. - Treating the incident as closed solely because the agent has stopped. ### DECISION-CHANGING EVIDENCE The most important evidence is the actual executed SQL with transaction outcomes, proof of effective containment, the affected record inventory, and the availability of a validated recovery source. Until those are established, the incident remains unresolved and production recovery is not ready for authorization.
Claude

Agent Incident Response Planner

Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
CLAUDE-5-5-SONNET
Tested icon
Guide icon
4 examples icon
Free credits icon
Investigate AI agent failures, unauthorized actions, or data exposure. Reconstruct incident timelines, trace affected systems, prioritize containment, establish safe recovery gates, and generate evidence-backed postmortems with actionable fixes.
...more
Added 2 weeks ago
Report
Browse Marketplace