diff --git a/packages/core/src/tools/shell.ts b/packages/core/src/tools/shell.ts index 90639e8679..453b85d2b9 100644 --- a/packages/core/src/tools/shell.ts +++ b/packages/core/src/tools/shell.ts @@ -73,6 +73,8 @@ export class ShellToolInvocation extends BaseToolInvocation< // note description is needed even if validation fails due to absolute path if (this.params.directory) { description += ` [in ${this.params.directory}]`; + } else { + description += ` [current working directory ${process.cwd()}]`; } // append optional (description), replacing any line breaks with spaces if (this.params.description) {