You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, mcp_remediation_wrapper and install_cli_exception_handler in agent_remediation.py emit markdown that tells the agent to search GitHub issues, thumbs-up duplicates, comment with new info, or open new issues. This has problems:
It's noisy — every error response includes a multi-paragraph remediation block that pollutes tool output
It's unreliable — the agent may or may not follow the instructions, may file low-quality issues, or may get distracted from its primary task
It's not machine-oriented — a block of markdown instructions is the wrong interface for automated issue correlation
It consumes tokens — the remediation text is included in every error response, costing context window on every failure
Proposal
Replace the agent-directed remediation approach with an automatic system that handles issue correlation without involving the agent at all:
Recommendation: Start with a post-hoc analysis script that reads structured trace logs (from system log via #30), groups by fingerprint, and creates/updates GitHub issues. Graduate to real-time later if needed.
Problem
Today,
mcp_remediation_wrapperandinstall_cli_exception_handlerinagent_remediation.pyemit markdown that tells the agent to search GitHub issues, thumbs-up duplicates, comment with new info, or open new issues. This has problems:Proposal
Replace the agent-directed remediation approach with an automatic system that handles issue correlation without involving the agent at all:
1. Stack trace → fingerprint → issue correlation pipeline
When a failure occurs:
log_trace_event()computes anerror_fingerprint(already implemented in Design unified logging infrastructure for MCP/CLI requests #17/logging.py)2. Remove agent-facing remediation text
ToolErrorresponses3. Implementation options
report_failure)Recommendation: Start with a post-hoc analysis script that reads structured trace logs (from system log via #30), groups by fingerprint, and creates/updates GitHub issues. Graduate to real-time later if needed.
4. Transition plan
log_trace_event()to system log with fingerprintsmcp_remediation_wrapper/install_cli_exception_handler— they still catch and log, but stop instructing the agentScope
Not in scope
Depends on
Replaces
format_agent_exception_remediation()behavior inagent_remediation.pyserverUseInstructionssnippet that tells agents to search/file issues