# Shell \`working\_directory\` parameter doesn't affect things inside the sandbox

**URL:** <https://forum.cursor.com/t/shell-working-directory-parameter-doesnt-affect-things-inside-the-sandbox/170140>\
**Category:** Bug Reports\
**Tags:** terminal, sandbox\
**Created:** [August 31, 2026, 9:03pm UTC](https://forum.cursor.com/t/shell-working-directory-parameter-doesnt-affect-things-inside-the-sandbox/170140 "2026-08-31T21:03:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeremiah-England](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jeremiah-england/32/16320_2.png) [@Jeremiah-England](https://forum.cursor.com/u/Jeremiah-England)\
**Post date:** [August 31, 2026, 9:03pm UTC](https://forum.cursor.com/t/shell-working-directory-parameter-doesnt-affect-things-inside-the-sandbox/170140/1 "2026-08-31T21:03:27Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

Agent wants to run commands from subdirectory. Instead of `cd subdir & cmd`, agent runs `cmd` but sets `working_directory` in tool call.

If the named `working_directory` is a subdirectory within the sandbox, this appears to not change the working directory at all! Very confusing for the agents!

### Steps to Reproduce

Ask agent to set `working_directory` to a subdirectory of your repo and run `ls`.

### Expected Behavior

Setting `working_directory` to a subdirectory changes cwd.

### Operating System

Linux

### Version Information

Version: 3.18.9  
VS Code Extension API: 1.128.0  
Commit: 2ba48ff3f7514cc4643c52ca9f7b3173d9b66130  
Date: 2026-08-27T01:42:22.092Z  
Layout: Agent Window  
Build Type: Stable  
Release Track: Default  
Electron: 40.10.6  
Chromium: 144.0.7559.236  
Node.js: 24.15.0  
V8: 14.4.258.32-electron.0  
xterm.js: 6.1.0-beta.291  
OS: Linux x64 7.1.8-arch1-3

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![Jeremiah-England](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jeremiah-england/32/16320_2.png) [@Jeremiah-England](https://forum.cursor.com/u/Jeremiah-England)\
**Post date:** [August 31, 2026, 9:06pm UTC](https://forum.cursor.com/t/shell-working-directory-parameter-doesnt-affect-things-inside-the-sandbox/170140/3 "2026-08-31T21:06:32Z")

</div>

Ah, looks like a duplicate of [Agent Shell working\_directory ignored; footer reports requested cwd (workspace is a git subdirectory) - #6 by Colin](https://forum.cursor.com/t/agent-shell-working-directory-ignored-footer-reports-requested-cwd-workspace-is-a-git-subdirectory/168529/6).

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [September 2, 2026, 9:20pm UTC](https://forum.cursor.com/t/shell-working-directory-parameter-doesnt-affect-things-inside-the-sandbox/170140/5 "2026-09-02T21:20:55Z")

</div>

Closed on September 2, 2026, 9:20pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
