Skip to content

feat(bash-tool): add CWD change notification to tool result when cd changes directory#1176

Merged
lewis617 merged 1 commit into
mainfrom
feat/bash-cwd-change-notification
May 28, 2026
Merged

feat(bash-tool): add CWD change notification to tool result when cd changes directory#1176
lewis617 merged 1 commit into
mainfrom
feat/bash-cwd-change-notification

Conversation

@lewis617
Copy link
Copy Markdown
Collaborator

When a bash command changes the working directory, the tool result now
prepends a notification message informing the agent of the new CWD.
This restores the notification behavior from commit cefb1a8 that was
lost when only reset messages were kept.

  • Normal CWD change: 'Shell working directory changed to '
  • CWD reset (outside safe zone): 'Shell cwd was reset to '
  • Simplified branching logic (inverted condition for clarity)

…hanges directory

When a bash command changes the working directory, the tool result now
prepends a notification message informing the agent of the new CWD.
This restores the notification behavior from commit cefb1a8 that was
lost when only reset messages were kept.

- Normal CWD change: 'Shell working directory changed to <newCwd>'
- CWD reset (outside safe zone): 'Shell cwd was reset to <originalWorkdir>'
- Simplified branching logic (inverted condition for clarity)
@lewis617 lewis617 merged commit fd874f0 into main May 28, 2026
1 check passed
@lewis617 lewis617 deleted the feat/bash-cwd-change-notification branch May 28, 2026 11:13
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