fix(eval): strip leading slash commands and surface replay errors - #43
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 changed
/plan,/goal, and/boostfrom extracted prompt text while preserving Unix file paths.parseClaudeStreamand markisError: trueso failed command invocations are not treated as valid zero-turn runs.errorMessageonEngineRunrather than falling back to a generic message.stderrinrunClaudeCodewhen an engine subprocess exits with a non-zero exit code.src/eval/replaySession.tsto keepsrc/eval/run.tswithin line count limits.skippedSessionsinEvalReceipt.shadowclone evalterminal summary.Why
Prompts recorded from Antigravity frequently begin with slash commands like
/plan. When piped toclaude -p, Claude Code CLI treats leading slash tokens as interactive commands, printing<local-command-stdout>/plan isn't available in this environment.</local-command-stdout>and exiting with code 0. Becauseis_errorwas false,parseClaudeStreamtreated this as a successful run with zero actions, yielding 0% delta with an artificial 0.5 planning score. Stripping UI slash commands ensures the prompt text executes as the intended task.In addition, replay errors were swallowed across multiple layers:
runClaudeCodediscardedstderr,parseClaudeStreamignored theerrorsstring array on the result payload, andrunEvalprinted a single generic line without the prompt or failure reason. Capturing errors across the runner and recordingskippedSessionsin receipts makes replay failures actionable.How to verify
Live validation on session
001bb52a-41b1-4c32-94aa-dee90ad403aeconfirmed that/planwas stripped, Claude executed real tool calls (Bash,ToolSearch,WebFetch), and the session was scored in receipt0b4a786f-b641-4bf5-bf80-f88910dd67f1.json.Data handling
redactSecrets