aws / aws/amazon-q-developer-cli

Allow postToolUse Hook to run after the Agent is finished (instead of after all usages)

Open
#3,034 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

Hello,

I've been playing with the postToolUse (introduced in #2875) hook a bit, I think it's a good place for us to automatically run linters/tests, but as it sits, it will run every single time the Agent writes something. As you know, sometimes the Agent writes the whole file in a single shot, sometimes it just adds an import statement. Running linter/test every single time we write one line is going to take longer than what we'd save with a "run linter/test" prompt after it's done.

My proposal would be to allow us to run postToolUse when the Agent is ready to hand over the control to us. This would allow it to do everything it wants, and then we'd run the linter/tests, feeding the output (if wrong) back to the LLM.

Let me know your thoughts on it

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.