Skip to content

perf(workflow): remove unused agent definition file read in executeAgentTurn#425

Closed
kokevidaurre wants to merge 1 commit intodevelopfrom
solve/issue-419
Closed

perf(workflow): remove unused agent definition file read in executeAgentTurn#425
kokevidaurre wants to merge 1 commit intodevelopfrom
solve/issue-419

Conversation

@kokevidaurre
Copy link
Contributor

Summary

  • Removes unused const definition = loadAgentDefinition(agentPath) call in executeAgentTurn — the result was never referenced in the prompt or elsewhere in the function
  • Removes the now-unused loadAgentDefinition import from ./squad-parser.js
  • loadAgentDefinition is still correctly used in executeGeminiTurn, which embeds the definition directly in the prompt

Impact

Eliminates one unnecessary disk read per agent turn. Over a full conversation with multiple agents and cycles, this compounds.

Test plan

  • Build passes (npm run build)
  • All 1291 tests pass (npm test run directly — 68 test files, 1291 tests)
  • No functional change: executeAgentTurn builds its prompt the same way (references agentPath directly in the prompt string, telling the agent to read its own definition)

Fixes #419

🤖 Generated with Claude Code

…entTurn

The `definition` variable was loaded via `loadAgentDefinition` on every
agent turn but never referenced in the prompt or elsewhere in the function,
causing a wasteful disk read per turn. Also removes the now-unused
`loadAgentDefinition` import.

Fixes #419

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kokevidaurre
Copy link
Contributor Author

Superseded by PR #424, which includes this fix along with #415 and #417.

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