Add failure mode taxonomy vocabulary and synthesize_traces focus guidance to SYSTEM_PROMPT#72
Conversation
|
@samheutmaker could you review this PR? |
…ance to SYSTEM_PROMPT Adds two new rules to SYSTEM_PROMPT in engine/agents/prompt_templates.py: Rule 12: Documents the `focus` parameter on `synthesize_traces` so the LLM uses it for targeted multi-trace comparisons (previously undocumented, so never used despite being wired up in synthesis_tool.py). Rule 13: Adds 30 named failure categories across 6 groups (Tool Execution, Planning & Reasoning, Context & Memory, Output Quality, Resource & Budget, Multi-Agent) as a labeling vocabulary. HALO still discovers findings freely by navigating traces — the vocabulary only ensures findings are named consistently so output is comparable across runs and agent versions. Closes context-labs#70. Co-Authored-By: WOZCODE <contact@withwoz.com>
e69618a to
3b73a79
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ance to SYSTEM_PROMPT Adds two new rules to SYSTEM_PROMPT in engine/agents/prompt_templates.py: Rule 12: Documents the `focus` parameter on `synthesize_traces` so the LLM uses it for targeted multi-trace comparisons (previously undocumented, so never used despite being wired up in synthesis_tool.py). Rule 13: Adds 30 named failure categories across 6 groups (Tool Execution, Planning & Reasoning, Context & Memory, Output Quality, Resource & Budget, Multi-Agent) as a labeling vocabulary. HALO still discovers findings freely by navigating traces — the vocabulary only ensures findings are named consistently so output is comparable across runs and agent versions. Closes context-labs#70. Co-Authored-By: WOZCODE <contact@withwoz.com>
…/VjayRam/HALO into feat/failure-taxonomy-vocabulary
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cd27a4c. Configure here.
| </> | ||
| ) : ( | ||
| <Button onClick={() => onOpenChange(false)}>Close</Button> | ||
| ) |
There was a problem hiding this comment.
Success import loses repeat action
Medium Severity
After a successful import, the dialog footer now only shows Close. The previous Start another import / Load again controls that reset the wizard were removed. Those dialogs are shared by ImportDataRoutePage and TraceMonitorPage, so users must close and reopen the dialog to run another import.
Additional Locations (3)
Reviewed by Cursor Bugbot for commit cd27a4c. Configure here.
| setDemoDialogOpen(false); | ||
| refreshTelemetry(); | ||
| await onFinish(); | ||
| }, [onFinish, refreshTelemetry]); |
There was a problem hiding this comment.
Import guard blocks retry finish
Low Severity
handleImported sets completedImportRef to true before await onFinish(). If onboarding.complete or navigation fails after a successful import, later import completions skip handleImported and no longer auto-complete onboarding, even though dialogs were already closed on the first attempt.
Reviewed by Cursor Bugbot for commit cd27a4c. Configure here.


Summary
SYSTEM_PROMPTinengine/agents/prompt_templates.py: a 30-category failure vocabulary across 6 groups (Tool Execution, Planning & Reasoning, Context & Memory, Output Quality, Resource & Budget, Multi-Agent). Labels are applied by the LLM at report time, not used as a detection checklist.focusparameter onsynthesize_traces, explaining when and how to use it for narrowing cross-trace synthesis.Motivation
Issue #70 (RFC: Failure Mode Taxonomy) identified that HALO's findings lack consistent naming across runs. Without a shared vocabulary, the same failure (e.g. a context-flooding tool call) gets described differently each time, making cross-run comparison hard. This PR gives the LLM a controlled set of labels to apply when they fit, while leaving it free to describe failures in plain language when none apply.
Demo verification
Ran HALO against
demo/openai-agents-sdk-demo/sample-traces/traces.jsonlwith the prompt "Analyze these traces for failure patterns. For each issue you find, label it with the appropriate failure category from the vocabulary."HALO correctly identified and labeled
C1 · Context Flooding:The label
C1 · Context Floodingmatches exactly the vocabulary entry. Additional observations outside the vocabulary were described in plain language, as Rule 13 instructs.Test plan
render_root_system_prompt()produces 8327 chars with all 30 categories present (verified viapython -cin the fork venv)pytest tests/unit)🧙 Built with WOZCODE
Note
Medium Risk
Session list SQL is a behavioral/performance change on a core telemetry path; onboarding now completes on import success, which changes first-run navigation.
Overview
This PR bundles onboarding and import UX, a session-list query optimization, HALO agent prompt updates, and a patch version bump.
Onboarding drops the video step and header Skip Onboarding, leaving Welcome → Import. Welcome copy explains the trace → HALO → fix → re-collect loop and links to inference.net; the primary CTA is Get Started. On import, a successful trace import (demo, file, Langfuse, or Phoenix) auto-completes onboarding and routes to the dashboard once, guarded by a ref so duplicate callbacks do not double-finish.
Import dialogs simplify post-job footers: successful runs show Close only (no “start another import” / “load again”); Retry remains when the job failed.
Telemetry:
listSessionsnow usespagedSessionAggregateSqlso pagination applies to aggregated session rows first; span-backed fields (e.g.llm_model_names, previews) are computed only for the current page instead of every session in the filtered set.Engine prompts add rule 12 (
synthesize_traces+ optionalfocus) and rule 13 (30-label failure vocabulary across six groups for consistent finding names).app/package.jsonversion 0.1.16 → 0.1.17.Reviewed by Cursor Bugbot for commit cd27a4c. Bugbot is set up for automated code reviews on this repo. Configure here.