Warn against a named extraction subagent (#2847) - #3629
ayushcodes10 wants to merge 4 commits into
Conversation
A named Agent call's report can return only through SendMessage. When that return path is unavailable, the caller receives a bare idle notification carrying zero findings, which looks identical to a chunk that silently failed rather than one that was never spawned that way at all. The orchestrator then has no way to tell "this chunk returned nothing" from "this chunk was never extracted", and Part C's merge quietly proceeds with missing nodes. Step B2 now carries an explicit warning immediately after the existing subagent type note, on every host that dispatches through the Claude Code Agent tool, telling the agent to spawn every extraction subagent without the name parameter. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Asserts every Agent tool host (claude, claw) carries the warning in its Step B2 slot alongside the existing subagent type guidance, and that it names SendMessage as the failure mode. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Graphify review — findings
Adds a "no name" warning to Step B2 of every /graphify skill variant, instructing that extraction subagents be spawned without the name parameter because a named Agent call's report can return only via SendMessage — when that path is unavailable the caller sees a bare idle notification with zero findings, indistinguishable from a silently failed chunk that lets Part C merge with missing nodes. Guards this with test_agent_tool_hosts_warn_against_a_named_subagent, which requires the warning and its SendMessage rationale in the B2 block of every Agent-tool host, and records it in the changelog.
No blocking issues surfaced. 4 lower-confidence candidates did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 727 functions depend on the 727 functions this change touches.
Health — grade A; no new coupling hotspots.
Verification — 727 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 727 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
286 of 286 test file(s) selected (100%) via static blast radius.
Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.
tests/test_affected_cli.py— full-run-safetytests/test_affected_member_seed.py— full-run-safetytests/test_agents_platform.py— full-run-safetytests/test_analyze.py— full-run-safetytests/test_anthropic_custom_endpoint.py— full-run-safetytests/test_antigravity_install.py— full-run-safetytests/test_apm_fallback_version.py— full-run-safetytests/test_architecture_doc.py— full-run-safetytests/test_astro_extraction.py— full-run-safetytests/test_astro_import_ids.py— full-run-safetytests/test_atomic_canvas_export.py— full-run-safetytests/test_atomic_version_stamp.py— full-run-safetytests/test_atomic_writes.py— full-run-safetytests/test_backend_env_isolation.py— full-run-safetytests/test_backend_extras.py— full-run-safetytests/test_benchmark.py— full-run-safetytests/test_benchmark_raw_graph.py— full-run-safetytests/test_build.py— full-run-safetytests/test_build_merge_dedup_scope.py— full-run-safetytests/test_build_merge_hyperedges_and_prune.py— full-run-safetytests/test_build_merge_shrink_guard.py— full-run-safetytests/test_builtin_global_type_refs.py— full-run-safetytests/test_cache.py— full-run-safetytests/test_callflow_html.py— full-run-safetytests/test_cargo_introspect.py— full-run-safetytests/test_carried_hyperedge_remap.py— full-run-safetytests/test_case_sensitive_resolution.py— full-run-safetytests/test_charmap_encoding.py— full-run-safetytests/test_chunking.py— full-run-safetytests/test_cjs_module_extension.py— full-run-safetytests/test_claude_cli_backend.py— full-run-safetytests/test_claude_md.py— full-run-safetytests/test_cli_broken_pipe.py— full-run-safetytests/test_cli_export.py— full-run-safetytests/test_cli_help.py— full-run-safetytests/test_cluster.py— full-run-safetytests/test_codebuddy.py— full-run-safetytests/test_community_hub_labels.py— full-run-safetytests/test_community_labels_skill.py— full-run-safetytests/test_confidence.py— full-run-safetytests/test_corrupt_graph_json.py— full-run-safetytests/test_cpp_nested_and_cli.py— full-run-safetytests/test_cpp_objc_cross_file_calls.py— full-run-safetytests/test_cpp_preprocess.py— full-run-safetytests/test_cross_extension_reexport_self_cycle.py— full-run-safetytests/test_cross_language_call_resolution.py— full-run-safetytests/test_cross_repo_external_call_guards.py— full-run-safetytests/test_cross_repo_member_calls.py— full-run-safetytests/test_cross_repo_shared_types.py— full-run-safetytests/test_csharp_call_site_generic_args.py— full-run-safety- … and 236 more
non-code file(s) changed (
CHANGELOG.md,graphify/skill-claw.md,graphify/skill-copilot.md,graphify/skill-kilo.md,graphify/skill-kiro.md…) → running the full suite for safety (a code graph can't see config/fixture/data deps)
changed code file(s) with no mapped test (
CHANGELOG.md,graphify/skill-claw.md,graphify/skill-copilot.md,graphify/skill-kilo.md,graphify/skill-kiro.md…) — a coverage gap or a missing link — running the full suite rather than only the selected tests
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Summary
Fixes #2847.
graphify installreplacesSKILL.md/references/wholesale with no backup, so local skill edits are silently lost on every upgrade. The reporter kept having to re-add one specific rule they'd lost three capture agents to: spawn extraction subagents WITHOUT thenameparameter.Root cause
A named
Agentcall in Claude Code can turn the subagent into a teammate whose report is delivered only viaSendMessage. When that return path is unavailable, the caller gets a bare idle notification carrying zero findings — indistinguishable from a chunk that was silently dropped. The orchestrator has no way to tell "this chunk returned nothing" from "this chunk was never extracted," and Part C's merge quietly proceeds with missing nodes.SKILL.mdalready warns against the analogoussubagent_type="Explore"failure one line above where this guidance needs to live, but carried nothing aboutname.Fix
Adds an explicit warning immediately after the existing "subagent type" note in Step B2, on every host that dispatches via the Claude Code Agent tool (the shared
dispatch/agent-tool-disk.mdfragment and its PowerShell counterpart — this covers claude, claw, and other Agent-tool hosts). Hosts with a structurally different dispatch mechanism (opencode's@mention, codex's AgentTask, kilo/trae's Task tool, devin/aider's inline subagent model) don't carry aname-vs-subagent_typeconcept at all and are correctly unaffected.This issue's secondary suggestion (backing up
SKILL.mdon overwrite, or warning when local edits would be lost) is a separate, larger feature proposal and isn't addressed here — this PR is scoped to the one concrete rule the reporter asked to see shipped.Test plan
test_agent_tool_hosts_warn_against_a_named_subagentintests/test_install.py, asserting every Agent-tool host (claude, claw) carries the warning in its Step B2 slot and namesSendMessageas the failure mode.test_claw_skill_uses_agent_tool_dispatchstill passes unmodified.python3 -m tools.skillgen --check/--audit-coverage/--monolith-roundtrip/--schema-singleton— all OK.python3 -m pytest -q— 5622 passed, 68 skipped, no regressions.🤖 Generated with Claude Code