Skip to content

Code agent should trace and verify behavioral claims when replacing a dependency #1180

Description

@fullsend-ai-retro

What happened

The code agent was dispatched on issue #7019 to replace twoGiants/pi-anthropic-vertex with fullsend-ai/pi-anthropic-vertex in PR #7025. The agent's commit (5bc974b) correctly updated the 5 files the issue named — URLs, versions, SHA256, owner references. However, the new extension has fundamentally different architecture (no bundled @anthropic-ai/sdk, wraps pi's own Anthropic transport instead of mirroring internals). The human needed 4 follow-up commits to fix 8+ stale behavioral claims across 8 files: pi_run.go still described "the bundled Anthropic SDK" sending stray API keys; fullsend-agent.js referenced the SDK cast; pi.go and docs called the unset "belt-and-braces" when it remains load-bearing (pi's built-in anthropic provider resolves ANTHROPIC_AUTH_TOKEN); xai-vertex contrast statements became false ("Unlike the Anthropic extension it mirrors no pi internals" — now both mirror nothing); and the docs heading still said "interim." The review agent caught only 1 of these 8+ stale references. The human's fix commits added roughly 2× the agent's line changes.

What could go better

The code agent treated the dependency swap as a mechanical find-and-replace — updating direct name references but not checking whether existing comments and documentation about the old dependency's behavior remained true under the new one. The issue body explicitly described the architectural differences ("wraps pi's own Anthropic transport with a request-rewriting fetch and carries no @anthropic-ai/* dependency"), giving the agent the information needed to identify stale claims. The stale references were in files adjacent to those the agent edited — pi_run.go is in the same package as pi.go, 2 files apart. This is a high-confidence assessment: the claims were mechanically detectable by searching for terms like "bundled SDK," "interim," and "mirrors pi internals" that the issue itself contrasted against the new extension's behavior.

Proposed change

Add guidance to the code agent definition or code-implementation skill in fullsend-ai/agents for dependency replacement tasks. When replacing a dependency or vendor with different internals, the agent should: (1) extract behavioral descriptors of the old dependency from the issue body and existing code (e.g., "bundled SDK," "mirrors internals," "interim"), (2) search the codebase for comments, documentation, and rationale text containing those descriptors — not just the dependency's name, (3) verify each claim against the replacement's actual behavior as described in the issue, and (4) update or flag claims that are no longer accurate. This extends agents#915 (doc/comment consistency after structural changes) with a concrete detection strategy for the vendor-swap failure mode.

Validation criteria

In the next 3 code agent PRs that involve a dependency replacement or vendor swap where the replacement has different internals, the human should not need follow-up commits to fix stale behavioral claims about the replaced dependency in comments or documentation. Track by checking whether human commits after the code agent's PR creation contain comment/doc fixes for claims that reference the old dependency's architecture.


Generated by retro agent from fullsend-ai/fullsend#7025

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions