feat: set low effort and skip review/explanation in subagent mode#1685
feat: set low effort and skip review/explanation in subagent mode#1685aseembits93 wants to merge 9 commits intomainfrom
Conversation
Reduces latency for AI agent integrations by defaulting effort to low and skipping the explanation refinement and optimization review API calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @aseembits93's task in 6m 10s —— View job PR Review SummaryPrek ChecksPrek passed (ruff check + ruff format). Mypy has 160 pre-existing errors in Code ReviewThe PR cleanly implements subagent mode optimizations. No bugs, security issues, or breaking API changes found. Minor observations (non-blocking):
Duplicate DetectionNo duplicates detected. The Test CoverageCoverage for changed files (pre-existing levels, not regressions from this PR):
These are orchestration-heavy files with low unit test coverage — consistent with the existing codebase. No new regressions. One unrelated test failure: Optimization PRsFound 30 open codeflash-ai[bot] PRs. 3 have merge conflicts (#1656, #1646, #1645) and 2 are older than 7 days (#1610, #1606) — these should be closed as stale. Unable to close them due to tool permission restrictions. Most remaining PRs have CI failures on their target branches. Last updated: 2026-03-02T23:45Z |
Since review and explanation API calls are skipped in subagent mode, update the action instructions to have the agent assess the optimization itself before presenting it to the user. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Early-return from process_review using the original explanation object directly, skipping all the unnecessary work: test formatting, coverage message building, explanation refinement, review API call, and new_explanation construction. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Falls back to the local diff-length + runtime heuristic instead of calling generate_ranking, reducing latency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
--efforttolowwhen--subagentflag is usedget_new_explanation) in subagent mode, falling back to the original candidate explanationget_optimization_review) in subagent modeTest plan
--subagentflag and verify effort islow🤖 Generated with Claude Code