fix(cli): restore directory tree in system prompt#7949
Merged
lambertjosh merged 1 commit intomainfrom Mar 30, 2026
Merged
Conversation
Remove accidental `&& false` that was introduced in upstream commit 351ddee ("Permission rework #6319") which disabled the filetree from being included in the system prompt for git projects. Upstream issue: anomalyco/opencode#19263
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by gpt-5.4-20260305 · 263,187 tokens |
markijbema
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
&& falsecondition inpackages/opencode/src/session/system.tsthat disabled the directory tree from being included in the system prompt for git projects.Investigation
The
&& falsewas introduced by Dax Raad (thdxr) on January 1, 2026 in commit351ddeed91as part of "Permission rework (#6319)" — a major upstream PR in theanomalyco/opencoderepo that overhauled the permissions system.The
&& falsewas not intentional — it appears to be leftover debug/testing code that was accidentally included in the large PR (66 files changed, 3587 insertions, 2075 deletions). The PR description and commit messages make no mention of disabling the directory tree feature. The change was a single-line modification buried in a massive permissions overhaul.Timeline
dd5736fe5f("add back in file hierarchy in system prompt but limit to 200 items")c69474846f("Simplify directory tree output for prompts #11731") reduced the limit from 200 to 50351ddeed91("Permission rework Bug: Session load crashes with str3.replace error #6319") accidentally disabled it with&& falseUpstream references
bug+core