Skip to main content

Improve AI Session Logging for Self-RCA

Problem

When an AI session is skipped, terminated, or fails to generate a response, the current session logs do not always show why execution stopped.

For example, we observed a session where context was successfully retrieved, but the session ended with:

  • 0 AI messages

  • 0 tool calls

  • 0 input/output tokens

  • 0m duration

There was no error or termination reason available in the session logs, making it difficult to complete RCA without involving Periskope Support.

Requested Improvement

  1. Expose session pipeline stages

    Show the execution lifecycle and the last successfully completed stage:

    TRIGGER_RECEIVED → CONTEXT_RETRIEVED → PROMPT_BUILT → MODEL_DISPATCHED → OUTBOUND_SENT

  2. Expose termination/skip reason

    Whenever execution stops, display a clear reason/status, for example:

    • SKIPPED_BY_ACTIVATION_FILTER

    • AGENT_RESPONSES_DISABLED

    • OUTSIDE_SHIFT_HOURS

    • SENDER_INTERNAL_EXCLUDED

    • LLM_DISPATCH_FAILED

    • UPSTREAM_TIMEOUT

  3. Expose failure details

    Where applicable, show the error message, timestamp, failed stage, and relevant request/session identifier.

Expected Benefit

This would allow us to perform self-RCA for AI response failures, quickly identify whether an issue is configuration-, filtering-, or model-related, and reduce dependency on Periskope Support for individual session investigations.

Log in to comment and vote

No comments yet

Be the first to share your thoughts.