-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Frequently, I'll see my model try to use shell syntax that only works in bash. This will fail, because I'm actually running opencode from inside fish. I assume similar models probably make similar mistakes in other non-bash shells: bash is probably the shell they're most trained on, so they're taking a safe bet and reaching for it first.
Generally, the model will see the error message, figure out what shell it's actually running in, and redo the shell command using syntax that's appropriate for the fish context it's running inside of. So, it's not a showstopper.
However, it isn't ideal: it still means at least one extra turn, more time spent, more requests/tokens exchanged with the provider, and one more failed tool call cluttering up its context.
All this could be avoided, saving us time and tokens, if the model was advised ahead of time in the generated system prompts as to what shell it's running inside of instead of having to discover it by trial and error.