Your AI automation worked beautifully on the happy path. Then it reached production: tickets were updated with the wrong status, CRM records silently failed, support drafts leaked customer data, and finance started asking about the token bill.

The model usually is not the only problem. Production workflows combine prompts, APIs, permissions, stale data, retries, queues, and human judgment. Below are nine failure points I see most often, organized by symptom, root cause, fix, and the signal that proves it is fixed.
1. The prompt works in the demo but becomes fragile in real work
Real symptom: The agent returns perfect summaries for sample tickets, but in production it adds invented details, changes output format, omits required fields, or writes “I cannot help” when the request is slightly different.
Why it happens: Demo prompts are tuned to a narrow input distribution. Real tickets contain typos, screenshots, forwarded emails, mixed languages, long histories, and ambiguous intent. A small wording change can make the model abandon the requested JSON schema or business rule.
Fix
- Move critical rules out of prose and into structured schemas, enum values, and validator code.
- Use a system prompt with explicit priorities: safety policy, data policy, required output, escalation rules.
- Give three to five realistic examples, including edge cases and refusal/escalation examples.
- Add deterministic post-processing instead of asking the model to “be consistent.”
Acceptance signal: A fixed set of 30–100 representative production-like prompts produces valid outputs, and prompt changes cannot be promoted unless the golden set passes.

2. The agent can call the tool, but it does not have permission to finish the job
Real symptom: The workflow reads a ticket successfully, then fails when trying to assign it, post a note, or create an invoice. Logs show 401, 403, missing scopes, or “workspace not authorized.”
Why it happens: Development often runs with an admin token or the builder’s personal account. Production uses a service account, OAuth app, customer workspace, or role with different permissions. Read access was tested; write access was not.
Fix
- Create a permission matrix for every tool action: read, write, admin, webhook, and export.
- Provision one least-privilege service principal per environment.
- Run a startup smoke test that performs a safe read and a sandboxed write.
- Surface permission errors as configuration failures, not model failures.
Acceptance signal: Deployment fails fast if required scopes are missing, and the runbook names the exact scope or role needed for each tool.
3. Tool calls fail because the model picked the wrong parameter shape
Real symptom: The agent calls the CRM connector, but sends a company name where the API expects an account ID, formats dates incorrectly, passes an empty email, or chooses the wrong environment.
Why it happens: Tool descriptions are often copied from API docs without business context. The model may know the endpoint but not which upstream field is authoritative, which values are allowed, or which parameters are mandatory.
Fix
- Expose narrow tools such as close_support_ticket rather than generic HTTP actions.
- Validate IDs against known records before mutation.
- Use typed input schemas, enums, date formats, and clear field descriptions.
- Require the agent to state the intended action and target record for high-impact writes.
Acceptance signal: Invalid tool calls are rejected before the external request, and the error message tells the agent exactly which field to correct.
4. HTTP 200 is treated as a successful business update
Real symptom: The workflow reports success, but the ticket was not assigned, the invoice was not marked paid, or the CRM record still has the old value.
Why it happens: HTTP 200 only means the transport-layer request was successfully handled. The business result must be checked using the response body’s affected/updated count or status field. Some APIs intentionally define a no-op update as successful, so the workflow must follow that API contract rather than assuming what 200 means.
Fix
- Parse the API response and check fields such as status, affected_rows, updated, or result.
- For critical updates, read the record afterward or verify via event confirmation.
- Classify no-op updates separately from successful mutations.
- Do not let the agent mark a task complete based only on status code.
Acceptance signal: Every integration test asserts both transport status and business state. A response such as {"updated": 0} is labeled according to the API contract, not blindly logged as success.
5. Dirty input data causes confident automation mistakes
Real symptom: The system routes leads by country, but country values include “USA,” “U.S.A.,” “United States,” and blank fields. Duplicate customers receive different outcomes. Dates arrive as both 03/04/2026 and 2026-04-03.
Why it happens: AI can infer meaning from messy text, but downstream systems need canonical values. When normalization is skipped, the model fills gaps with plausible guesses.
Fix
- Normalize and validate data before model reasoning or tool execution.
- Deduplicate using deterministic rules where possible.
- Mark missing or contradictory fields as “needs confirmation,” not as assumptions.
- Track data quality by source: form, CSV, CRM sync, webhook, or manual entry.
Acceptance signal: Invalid records enter a quarantine queue with a visible reason, and the percentage of missing required fields trends downward by source.
6. There is no usable human takeover path
Real symptom: Low-confidence answers still go to customers. Refund requests, legal threats, security incidents, and VIP accounts are handled by the same automatic flow as routine questions.
Why it happens: Teams design for completion rate, not safe failure. The agent may have an escalation field in the schema, but the queue, owner, SLA, and handoff payload were never built.
Tool and handoff checklist
- Define escalation triggers: low confidence, policy-sensitive topic, repeated failure, customer distress, high-value account, or missing permission.
- Create a human queue with priority, reason code, transcript, attempted actions, and recommended next step.
- Give the human one-click controls: approve, edit and send, reject, or rerun.
- Stop automatic mutation once the case is handed over.
Acceptance signal: Testers can force an escalation on demand, a human receives the case within SLA, and no duplicate automated action occurs after handoff.
7. Logs show that something happened, but not enough to reproduce it
Real symptom: A customer says the bot changed a record. Engineering can see “workflow completed,” but cannot recover the model input, prompt version, tool request, response, retry count, or acting user.
Why it happens: Application logs and AI traces are disconnected. Teams log the final answer but omit the intermediate decisions needed to debug agents.
Trace checklist
- Correlation ID across model, workflow, queue, connector, and external system.
- Prompt template version, model version, temperature, and deployment version.
- Input hash or sanitized input reference.
- Tool name, parameters, endpoint, status code, response summary, and retry attempt.
- Business verification result and final action taken.
- Human review decision, if applicable.
Acceptance signal: Any failed production run can be reconstructed from the trace and replayed in staging without asking the customer for screenshots.
8. Retries, async jobs, and webhooks create duplicate or out-of-order effects
Real symptom: A customer receives two onboarding emails, a payment is processed twice, a later “created” event arrives after “cancelled,” or a webhook retry triggers the same workflow after the original job already finished.
Why it happens: External systems are not always idempotent. Timeouts do not prove failure; the request may have succeeded. Webhooks may be retried, delayed, duplicated, or delivered in a different order. If every trigger starts an unrestricted run, side effects multiply.
Fix
- Use idempotency keys generated from the external event ID or a deterministic business key.
- Store processed event IDs and make side effects conditional on current record state.
- For non-idempotent APIs, add a reconciliation step or a lock before calling the action.
- Attach event timestamps and sequence numbers; reject stale events using the API contract.
- Design compensating actions for partial failure, such as “invoice created but notification failed.”
Acceptance signal: Replaying the same webhook ten times creates one business effect, delayed events cannot resurrect a cancelled record, and partial failures leave an explicit recovery state.
9. Model, prompt, and dependency updates cause silent regressions
Real symptom: Nobody changed the workflow code, but output quality dropped after a model update. A connector changed a field name. Costs rose, latency doubled, or JSON parsing started failing intermittently.
Why it happens: AI systems have version drift in multiple layers: model, prompt, tool schema, third-party API, embedding model, retrieval index, and runtime libraries. Without regression tests, production users become the evaluation suite.
Fix
- Pin model and package versions in production; require intentional promotion for updates.
- Maintain versioned golden tasks covering normal, risky, and impossible cases.
- Evaluate schema validity, policy compliance, tool-call accuracy, latency, and cost—not just answer similarity.
- Monitor dependency changelogs and run contract tests against a sandbox API.
- Alert on percentile latency and cost per case type, not only averages.
Acceptance signal: A candidate release cannot reach production unless regression evals, contract tests, latency budgets, and cost thresholds pass.
Pre-launch risk checklist
| Risk | Minimum control before launch |
|---|---|
| Data exposure or prompt injection | Block secrets/PII in logs, separate customer data from instructions, and treat untrusted text as data, not commands. |
| Irreversible external action | Require confirmation or human approval; support rollback or compensation. |
| Partial failure | Persist workflow state and expose retry/resume from the failed step. |
| Cost or latency spike | Set per-run token budgets, model fallback rules, and alerts for p95 latency. |
| Version drift | Pin versions and run automated evals before promotion. |
| Unsafe autonomy | Define escalation triggers, queue owners, and SLAs before enabling writes. |
Production AI automation is less about making the agent clever and more about making the surrounding system boring: typed tools, verified writes, safe retries, replayable traces, current evals, and a real handoff. If those controls are present, model mistakes become recoverable exceptions instead of production incidents.