OpenCode asks for permission for chained cd's that stay within the project #5273

Open
opened 2026-02-16 17:50:44 -05:00 by yindo · 0 comments
Owner

Originally created by @a7medev on GitHub (Jan 13, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When running chained cd commands that navigate within the project directory, opencode incorrectly requests external_directory permission even though the final directory is still inside the project.

For example, cd subdir && do something && cd .. triggers a permission request to access the parent directory, when in reality the command is just returning to the project root.

Plugins

No response

OpenCode version

1.1.16

Steps to reproduce

  1. Model requests to execute cd subdir && some-command && cd ..
  2. OpenCode shows a permission dialog asking for access to the parent directory due to cd .. in the command.

Screenshot and/or share link

image

Operating System

No response

Terminal

No response

Originally created by @a7medev on GitHub (Jan 13, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When running chained `cd` commands that navigate within the project directory, opencode incorrectly requests `external_directory` permission even though the final directory is still inside the project. For example, `cd subdir && do something && cd ..` triggers a permission request to access the parent directory, when in reality the command is just returning to the project root. ### Plugins _No response_ ### OpenCode version 1.1.16 ### Steps to reproduce 1. Model requests to execute `cd subdir && some-command && cd ..` 2. OpenCode shows a permission dialog asking for access to the parent directory due to `cd ..` in the command. ### Screenshot and/or share link <img width="386" height="242" alt="image" src="https://github.com/user-attachments/assets/05e04a77-8ede-416b-a5bf-abd3c1c65f5a" /> ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 17:50:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5273