When should you use it?
- An agent creates, changes or cancels bookings, orders or records through tools
- Your logs say success or error, but timeouts and empty replies fall into neither
- You learned about a past agent failure from a customer rather than from your own monitoring
Not for: Read-only agents, where an ambiguous call does no harm; Teams that want full transcripts for analytics; this log deliberately leaves them out; Systems where you cannot attach a request key to a write
What do you need, and what do you get?
You need
- The list of write tools your agent can call
- A stable request key per customer request
- A table, sheet or log store with a simple query tool
- A place for a person to pick up unknown outcomes
You get
- One log line per write attempt: attempt ID, request key, outcome and next move
- An escalation path for unknown outcomes instead of an automatic retry
- A saved query for unknown plus confirmed that should return nothing
- A repeat-key test that runs after every workflow change
How does it work, step by step?
- Define three outcomesOk means an explicit confirmation came back, failed means a clear rejection, and unknown covers timeouts, empty replies and anything else you cannot read.
- Record the next moveAdd a field for what the agent did after the call: confirmed to the customer, escalated to staff or retried.
- Write the status firstIn n8n, put the log step in a sub-workflow that runs just before the write node, so a retry of the write does not replay it.
- Send unknowns to a personRoute the unknown outcome to a human task, never into an automatic retry.
- Watch the empty querySave a query for outcome unknown with next move confirmed, check it daily, and keep a test that sends the same request key twice and expects one write.
The prompt
Our own prompt, inspired by ccch713 and written to work in n8n, Custom agent, ChatGPT and others. Values in lime are placeholders.
Fill in the blanks (optional; the copied prompt uses your values)
Design the action log for my agent workflow in {platform}. The agent's write tools are: {write_tools}. For every write attempt, log one line with: attempt_id, request_key, tool, outcome (ok = explicit confirmation, failed = clear rejection, unknown = timeout, empty or unreadable reply) and next_move (confirmed, escalated or retried). Never log conversation text or personal data. Show me where the log step goes so a retry of the write does not repeat it, how unknown outcomes reach {staff_queue} instead of being retried, the saved query for outcome = unknown AND next_move = confirmed, and a test that sends the same request_key twice and expects exactly one write.
Inspired by ccch713: n8n Community: ok / failed / unknown, what we log so ambiguous failures get found. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Logging only success and error hides the one state that causes harm. Without a word for unknown, the incident stays invisible.
- Putting the log step inside a node that retries makes it repeat with every retry, which reproduces the original bug.
- Logging conversation text adds privacy risk and no investigative value here. Keep the trail to IDs and decisions.
- Dashboards are optional. A single line per attempt plus a query you expect to come back empty is enough to start.
Our take
This is a follow-up to a post we featured yesterday, and it earns a separate page because it answers a different question. The first post was about stopping the double booking. This one is about making sure you would notice if anything like it happened again. The insight is in the vocabulary. Most logs have words for success and failure but none for not knowing, and the not-knowing case is exactly where agents get into trouble by sounding sure. Adding the agent's next move to the same line is the clever part, because the harmful pattern becomes one searchable combination. We also like the restraint: no transcripts, no new dashboards, just IDs, outcomes and decisions. That keeps patient data out of the log and keeps the setup small enough to maintain. The n8n detail about placing the log step outside the retried node is worth reading twice if you build there. In our dry run, a mock of three bookings with one forced timeout produced three log lines, routed the unknown to staff, and the never-happen query returned nothing.
Where the time goes back: When something odd happens, one filter on one table shows every ambiguous action and what the agent did about it, instead of hours spent reading transcripts.
FAQ
Why is a timeout not just an error?
Did it help?
Is this related to the earlier double-booking guide?
Source and credit
Inspired by ccch713. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- n8n Community: ok / failed / unknown, what we log so ambiguous failures get found
- Creator
- ccch713
- Published on
- n8n Community
- Original date
- Nov 10, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- n8n
- AI dry run
- Nov 10, 2026: passed. Dry-run tested by our AI test agent on sample input. Three log lines, unknown routed to staff, repeat key wrote nothing, never-happen query empty.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Nov 10, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.