Skip to content

fix(storage): group mcp_metrics error_reasons by code only#542

Merged
NagyVikt merged 1 commit into
mainfrom
agent/claude/group-mcp-metric-error-reasons-by-code-o-2026-05-14-14-14
May 14, 2026
Merged

fix(storage): group mcp_metrics error_reasons by code only#542
NagyVikt merged 1 commit into
mainfrom
agent/claude/group-mcp-metric-error-reasons-by-code-o-2026-05-14-14-14

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

Handlers embed session IDs in error messages (e.g. "sub-task is claimed by
codex-session-X"), which fragmented identical errors into many distinct
(code, message) groups and pushed most past the 3-row truncation. On live
data `task_plan_claim_subtask` showed 7 of 93 errors in `Top error reasons`
while the Operations table showed 93. Drop `error_message` from the grouping
key (SQLite's bare-column-with-MAX(ts) picks the latest sample message),
bump the per-op cap 3 -> 8, and add a regression test that pins
sum_of_reasons == error_count for 25 unique-message races + 2 not-found
errors. After the fix the same op reports 60 + 33 + 1 = 94 across three
codes, matching error_count exactly.
@NagyVikt NagyVikt merged commit e52cd83 into main May 14, 2026
@NagyVikt NagyVikt deleted the agent/claude/group-mcp-metric-error-reasons-by-code-o-2026-05-14-14-14 branch May 14, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant