Skip to content

refactor(agents): remove dead legacy agent execution path (~2,100 lines)#543

Merged
zbigniewsobiecki merged 1 commit intodevfrom
refactor/dead-legacy-agent-execution-path
Feb 25, 2026
Merged

refactor(agents): remove dead legacy agent execution path (~2,100 lines)#543
zbigniewsobiecki merged 1 commit intodevfrom
refactor/dead-legacy-agent-execution-path

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Feb 24, 2026

Summary

Removes ~2,100 lines of dead legacy agent execution code that was left over after the codebase migrated to the unified backend adapter architecture (backends/adapter.tsagent-profiles.ts).

  • Deletes 4 dead per-agent files: respond-to-ci.ts, review.ts, respond-to-pr-comment.ts, respond-to-review.ts
  • Deletes 5 dead shared infrastructure files: lifecycle.ts, githubAgent.ts, prResponseAgent.ts, workItemBuilder.ts, workItemContext.ts
  • Deletes dead base.ts (executeAgent, AgentContext, AgentRunner were all unreachable)
  • Cleans up agents/index.ts — removes re-export of deleted executeAgent/AgentContext/AgentRunner
  • Removes dead helpers from syntheticCalls.ts (injectDirectoryListing, injectContextFiles, injectSquintContext) — only injectSyntheticCall remains (used by live backends/llmist/index.ts)
  • Fixes FileLogger type imports in cleanup.ts and runTracking.ts (were importing from deleted lifecycle.ts, now import from live executionPipeline.ts)
  • Deletes 3 test files that exclusively tested dead code; trims syntheticCalls.test.ts to match remaining surface

Test plan

  • npm run typecheck — zero errors
  • npm test -- --run — 187 test files, 3190 tests, all passing
  • npm run lint — zero errors (1 pre-existing complexity warning unrelated to this change)

🤖 Generated with Claude Code

Card: https://trello.com/c/c4d69Z1c/115-find-top-candidate-for-refactoring-and-plan-clean-refactoring-of-it-look-for-god-classes-modules-functions-files-code-duplicatio

@nhopeatall
Copy link
Copy Markdown
Collaborator

🤖 Just a sec, looking into that refactor for the legacy agent execution path

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean dead code removal. All deleted symbols (executeAgent, AgentContext, AgentRunner, executeAgentLifecycle, injectDirectoryListing, injectContextFiles, injectSquintContext, fetchImplementationSteps, and the four per-agent execution files) have zero remaining references in the codebase. The FileLogger type import fix in cleanup.ts and runTracking.ts correctly points to the canonical export in executionPipeline.ts. The sole surviving export from syntheticCalls.ts (injectSyntheticCall) is confirmed used by the live backends/llmist/index.ts. CI passes.

@zbigniewsobiecki zbigniewsobiecki merged commit d10ae7d into dev Feb 25, 2026
5 checks passed
@zbigniewsobiecki zbigniewsobiecki mentioned this pull request Feb 25, 2026
3 tasks
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.

3 participants