Skip to content

Non-Git sessions use "/" as working directory #47198

Closed as not planned
Closed as not planned

Description

@gwerbin

Description

Using "/" as the working directory is at once surprising, dangerous, and causes LLMs to underperform (e.g. lower-powered models won't consider that / is special and just start scanning the entire filesystem for project-related files).

A prior bug report exists in #24694 but it was closed with no comment from the developers. Likewise a working PR was closed by a PR auto-cleanup bot, again with no comment from the developers. There appear to be many other bugs related to this design defect as well.

Plugins

Stock

OpenCode version

1.18.20

Steps to reproduce

  1. Run opencode in a directory that is not inside a GIt repository and start working in a fresh session

Screenshot and/or share link

No response

Operating System

MacOS Tahoe

Terminal

Ghostty

Activity

  1. github-actions commented on Sep 4, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct from these, feel free to add more context clarifying the difference.

  2. mattcoleanderson commented on Sep 24, 2026

    @mattcoleanderson

    Every PR and issue related to this issue has been closed in the past by a Github Action with 0 interaction from human maintainers. I understand this is a large project, but there may be too much automation going on in this project.

  3. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions