Repository navigation
fix(engine): record harness tool names, failure kinds and Claude compactions - #3799
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Analysis of the last three days of threads showed the data store missing or mislabeling much of what external harnesses do. This fixes how Claude Code and Codex turns are recorded.
_meta.jetbrains.air.contextCompaction, in an update with no status or title. The detector only knew the olderclaudeCode.toolName = "compact"shape. The store held 2 compaction rows (both failed) while 37 manual/compactruns were captured. The detector now reads the new shape. Migration 13 backfills the missed rows from capturedsession/updatepayloads, once, without touching existing rows.tool_calls.tool_nameis the ACP kind for external harnesses, so 757 MCP calls in three days were justother. New columnharness_tool(migration 12) holds the harness's own name: Claude'sBash,Read,mcp__rustcode__wait_session; Codex's item type ormcp__<server>__<tool>, which the Codex bridge now sets as_meta.rustcode.toolName.mcp_serveris filled from it.error_kind. They now getexit_status,permission_denied,guard_refused,timeout,interrupted(cut off by the turn end) orfailed. Claude'sExit code Nresult text now fillsexit_code.turns.error_kind(migration 12) classifies a failed external turn's error asunknown_session,rate_limited,usage_limit,auth,harness_exited,network, and so on. The error text itself is never stored.command_nameskips a leadingcd dir &&(about a third of shell calls were recorded ascd).docs/data-store.mdand thequery_datadescription now explain that Codexinput_tokensalready include the cached tokens and Codex reports no cost or cache writes, so cross-harness comparisons need adjusting.Changelog
Usage data now records Claude Code compactions (recovering past ones), each tool's real name, and why a tool call or turn failed.
Testing
--workspace --tests) andcargo fmt --all -- --checkpass locally.command_name. The tests themselves run in CI.SELECTwas run read-only against the live store and returned the 37 compactions.