Skip to content

fix(cli): restore directory tree in system prompt#7949

Merged
lambertjosh merged 1 commit intomainfrom
fix/restore-directory-tree-system-prompt
Mar 30, 2026
Merged

fix(cli): restore directory tree in system prompt#7949
lambertjosh merged 1 commit intomainfrom
fix/restore-directory-tree-system-prompt

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot bot commented Mar 30, 2026

Summary

  • Removes the accidental && false condition in packages/opencode/src/session/system.ts that disabled the directory tree from being included in the system prompt for git projects.

Investigation

The && false was introduced by Dax Raad (thdxr) on January 1, 2026 in commit 351ddeed91 as part of "Permission rework (#6319)" — a major upstream PR in the anomalyco/opencode repo that overhauled the permissions system.

The && false was 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

  • Jun 30, 2025: Dax originally added the filetree feature in commit dd5736fe5f ("add back in file hierarchy in system prompt but limit to 200 items")
  • Feb 1, 2026: Commit c69474846f ("Simplify directory tree output for prompts #11731") reduced the limit from 200 to 50
  • Jan 1, 2026: Commit 351ddeed91 ("Permission rework Bug: Session load crashes with str3.replace error #6319") accidentally disabled it with && false

Upstream references

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
@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot bot commented Mar 30, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/opencode/src/session/system.ts

Reviewed by gpt-5.4-20260305 · 263,187 tokens

@lambertjosh lambertjosh merged commit 56e3fe0 into main Mar 30, 2026
16 checks passed
@lambertjosh lambertjosh deleted the fix/restore-directory-tree-system-prompt branch March 30, 2026 17:06
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.

2 participants