Skip to content
Discussion options

You must be logged in to vote

Looking at your numbers, I don’t think the extra time is coming from the tools themselves.

read and grep don’t spawn anything, but they still average about 4.3-4.8 s. That’s almost exactly your PreToolUse average (about 4.0 s), and PreToolUse runs before every tool call. So most of the time on read/grep is the hook, not the tool. pwsh fits the same pattern: about 4.4 s of hook, plus about 6 s for the pwsh process itself (your echo 1 test shows that split).

So it looks like one fixed cost every time ctx.shell starts a process, and pwsh adds its own startup on top. Since node.exe runs your scripts in 50-200 ms from a terminal, my guess is that ctx.shell doesn’t start node directly but goes …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Yebeimu
Comment options

@MuriloDPV
Comment options

@Yebeimu
Comment options

@Yebeimu
Comment options

Answer selected by Yebeimu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants