Skip to content

docs(agent-eval): evals must run non-nested + add ab-new-vs-baseline.sh - #734

Merged
colbymchenry merged 1 commit into
mainfrom
docs/agent-eval-non-nested
Jun 8, 2026
Merged

docs(agent-eval): evals must run non-nested + add ab-new-vs-baseline.sh#734
colbymchenry merged 1 commit into
mainfrom
docs/agent-eval-non-nested

Conversation

@colbymchenry

Copy link
Copy Markdown
Owner

Documents the nested-claude -p MCP-attach flakiness (the codegraph server is healthy ~165ms; a nested client marks it pending/0-tools under load) and adds ab-new-vs-baseline.sh to isolate a change (new-build vs baseline-build, both codegraph-on) in a real terminal.

🤖 Generated with Claude Code

Running scripts/agent-eval against a `claude -p` spawned from within a Claude
Code session (nested, e.g. from a Bash tool call) makes the codegraph MCP
attach unreliable: the server is healthy (full handshake ~165ms) but the
nested client marks it status:"pending"/0-tools under CPU/timing contention,
so the agent silently runs with no codegraph. NO_DAEMON + `< /dev/null` don't
fix it — it's the nested client, not the server. Documented in CLAUDE.md's
validation methodology.

Adds ab-new-vs-baseline.sh: A/Bs a retrieval/steering change as new-build vs
baseline-build (both codegraph-on, isolating the change — vs run-all.sh's
with-vs-without), on a throwaway copy of an indexed repo. Run it in a real
terminal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@colbymchenry
colbymchenry merged commit 28c5268 into main Jun 8, 2026
@colbymchenry
colbymchenry deleted the docs/agent-eval-non-nested branch June 8, 2026 13:59
colbymchenry added a commit that referenced this pull request Jun 8, 2026
…ock (#735)

Corrects the "run non-nested only" conclusion from #734. The codegraph server
is healthy (handshake ~165ms); the flakiness is that on a multi-step
implementation task the agent dives into Read/grep before codegraph finishes
its ~2-3s startup (worse under nested CPU contention), so it runs with no
codegraph. Fix: pre-warm a persistent daemon (high idle timeout) + skip the
startup re-exec (CODEGRAPH_WASM_RELAUNCHED=1) so claude connects before the
agent's first turn. claude's init snapshot can show status:"pending" even when
it then connects — judge by actual codegraph usage, not the init line.

ab-new-vs-baseline.sh now bakes in the pre-warm + skip-re-exec. Validated: a
clean A/B showed the new build's agent used codegraph 2x / 5 Reads vs the
baseline's 0 / 8 on the same fully-implemented task.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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