Observability for AI Execution Traces: Building a Sidebar Plugin That Turns Logs into Conclusions

    This article examines the design and implementation of an open-source sidebar plugin that reads AI execution traces and turns them into human-readable conclusions. It covers why trace transparency alone does not solve the reading bottleneck, the plugin's five core questions, its four-layer architecture (collection, parsing, inference, presentation), prompt constraints that anchor model output to specific step numbers, dual-model cross-analysis, a problem overview table, layered scheduling for lightweight tasks, and practical risk controls such as read-only trials, redaction, and traceable links back to raw steps.

    1. Background: Once Execution Traces Are Transparent, a New Reading Bottleneck Appears

    In recent years, the capability boundary of AI coding tools (AI Harnesses) has kept expanding, moving from single-turn question answering toward multi-step tasks that coordinate multiple tools. Unlike traditional “black box” approaches that expose only user input and model output, a newer class of tools discloses the entire intermediate process — tool calls, execution steps, failures, and retries — forming what is known as an “execution trace.” This design gives developers, for the first time, a clear view of what the model actually invoked while completing a task, the order in which it proceeded, where it got stuck, and how it rolled back after a failure.

    Transparency, however, does not equal understandability. Traces are usually written to disk as structured log files (such as jsonl, a line-by-line record format), and a single task can easily produce thousands of lines with deeply nested fields, dense timestamps, and verbose tool parameters. Even when tools offer keyword filtering or step filtering, the cost of reading line by line remains high for humans. The result is an awkward situation: all the data is handed to you, yet you cannot finish reading it.

    Since the process has already been disclosed in a structured form, the most natural approach is to use a model to interpret the model — translating machine-readable traces into human-readable conclusions. This article discusses the design and practice of exactly such an open-source sidebar interpretation plugin.

    2. Design Goal: Compressing “What Happened” into “What the Conclusion Is”

    The core positioning of this kind of plugin can be summarized in one sentence: leave what you cannot understand to AI. It does not attempt to replace the raw logs; instead, it layers a semantic view on top of the raw trace and answers five questions:

    • What was executed: the task goal, the sub-steps derived from it, and their dependencies;
    • How it was done: which tool each step selected, what parameters were passed in, and what was returned;
    • What went wrong: failure points, error types, retry counts, and whether recovery ultimately happened;
    • What risks exist: unauthorized access, sensitive information reads, destructive commands, outbound network requests, and so on;
    • What lessons were learned: reusable conclusions and doubtful points that need manual review.

    From an engineering perspective, this amounts to adding a “semantic layer” to an observability stack. Traditional logging services solve collection, retrieval, and alerting, while the semantic layer solves summarization and explanation — the two are complementary rather than substitutes.

    3. Implementation: The Four Layers Behind a Single Sidebar

    A usable trace interpretation plugin typically consists of four layers:

    1. Collection layer: locate the trace file and read it incrementally, handling file rotation and encoding issues to avoid repeatedly parsing the full file;
    2. Parsing layer: normalize line-by-line JSON into a “step sequence,” unifying fields such as tool name, parameters, return values, duration, and status;
    3. Inference layer: feed the normalized steps to the model in batches, requiring structured conclusions rather than free-form prose;
    4. Presentation layer: display the summary, timeline, risk list, and suspicious-step locations in a sidebar.

    The inference layer is the easiest one to get wrong. Traces often exceed a single context window, so segmented summarization followed by aggregation is required; at the same time, the output format must be constrained, otherwise the conclusions cannot be reliably rendered by the frontend. An illustrative prompt constraint looks like this:

    1. You are an execution trace audit assistant. The input is a normalized step sequence (JSON).
    2. Output JSON only, with the following fields:
    3. goal: a summary of the task goal
    4. timeline: [{step, tool, status, note}]
    5. errors: [{step, type, retried, recovered}]
    6. risks: [{level, behavior, evidence_step}]
    7. lessons: [string]
    8. Do not fabricate facts that are absent from the input; evidence must point to a specific step number.

    The rule that “evidence must point to a step number” is especially important: it anchors model output to traceable raw records and significantly reduces the misleading effects of hallucination.

    4. Advanced Capabilities: Dual-Model Cross-Analysis and a Problem Overview Table

    A one-shot summary from a single model has blind spots, so the plugin supports sending the same suspicious trace segment to two different models for separate analysis, then comparing the two sets of conclusions: consistent parts can be treated as high-confidence conclusions, while conflicting parts are automatically flagged as pending human adjudication. This is a low-cost form of cross-validation, conceptually similar to two-person review in code review.

    Another practical capability is exporting the problems found during execution into an overview table with fields for step, symptom, impact scope, and recommended action, making it easy for a team to go through them one by one in a review meeting. Compared with reading long text, a table is better suited to collaboration and archiving.

    5. Integration and Cost: Layered Scheduling for Lightweight Tasks

    If a certain tool is not a primary entry point, maintaining a separate interface just for it is not cost-effective. A more economical approach is to keep the native web interface and have the primary AI coding tool drive it through browser control capabilities, so that cheaper models handle lightweight tasks such as code auditing and batch inspection while stronger models are reserved for key decisions. This layered scheduling also improves process transparency: compared with having the main tool directly spawn sub-agents, the trace is visible; compared with invoking an opaque external command line, the degree of visualization is higher.

    Installation can be left entirely to AI, with the user only expressing intent:

    1. Please help me install this execution trace interpretation plugin: <project URL>

    Note that such plugins target the native web interface by default; when running inside a secondary packaged client, additional adaptation development may be required. Projects are usually open-sourced under the MIT License, permitting commercial use and modification, but the license terms and dependency list should still be confirmed before closed-source integration.

    6. Practical Recommendations and Risk Controls

    • Try it first in a read-only environment, and confirm the plugin does not upload complete traces to external services;
    • Redact traces containing keys or internal network addresses before handing them to the model for interpretation;
    • Configure risk-list severity thresholds locally to avoid noise drowning out real alerts;
    • Provide bidirectional links between interpretation conclusions and raw steps, so any judgment remains traceable;
    • Periodically sample and manually review results to evaluate interpretation accuracy and iterate on prompts.

    7. Conclusion

    The value of an execution trace lies not in “how much is recorded” but in “whether it can be quickly understood.” By handing structured logs to a model for semantic compression, and supplementing this with cross-validation and a risk list, developers can shift from passively waiting to actively supervising. If your team is already building an internal observability system, this kind of sidebar interpretation approach can be implemented in-house and connected with existing logging services and monitoring/alerting capabilities, forming a closed loop from collection to conclusions.