openCode generating tons of .project files #6924

Open
opened 2026-02-16 18:05:37 -05:00 by yindo · 6 comments
Owner

Originally created by @RicardoMonteiroSimoes on GitHub (Jan 20, 2026).

Originally assigned to: @thdxr on GitHub.

Question

I can see it generating .project files all over the project, in every folder. Some of them contain eclipse specific things, like:

<nature>org.eclipse.buildship.core.gradleprojectnature</nature>

I have researched this, but wasn't able to find anything to it.

  • Why is it creating them?
  • How can I disabled this behaviour?
  • Can this be documented somewhere that can easily be referenced?
Originally created by @RicardoMonteiroSimoes on GitHub (Jan 20, 2026). Originally assigned to: @thdxr on GitHub. ### Question I can see it generating `.project` files all over the project, in every folder. Some of them contain eclipse specific things, like: ``` <nature>org.eclipse.buildship.core.gradleprojectnature</nature> ``` I have researched this, but wasn't able to find anything to it. - Why is it creating them? - How can I disabled this behaviour? - Can this be documented somewhere that can easily be referenced?
yindo added the docs label 2026-02-16 18:05:37 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 20, 2026):

This issue might be a duplicate of existing issues or related to them. Please check:

  • #7559: Add OPENCODE_DISABLE_PROJECT_CONFIG for external tooling integration (directly addresses preventing automatic project file generation)
  • #3191: Opencode adds stuff to global config folder (similar unwanted automatic file creation)
  • #5019: opencode keeps creating '-p' subdirectory on Windows 11 (unwanted automatic directory/file creation)

The .project files with Eclipse-specific nature tags suggest this may be triggered by JDTLS (Eclipse Java Language Server) initialization. Related issues:

  • #9027: The java LSP not work
  • #4703: LSP - Java - eclipse-jdt-ls configuration issues
  • #7321: JDTLS automatic installation and environment variable setup

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 20, 2026): This issue might be a duplicate of existing issues or related to them. Please check: - #7559: Add OPENCODE_DISABLE_PROJECT_CONFIG for external tooling integration (directly addresses preventing automatic project file generation) - #3191: Opencode adds stuff to global config folder (similar unwanted automatic file creation) - #5019: opencode keeps creating '-p' subdirectory on Windows 11 (unwanted automatic directory/file creation) The .project files with Eclipse-specific nature tags suggest this may be triggered by JDTLS (Eclipse Java Language Server) initialization. Related issues: - #9027: The java LSP not work - #4703: LSP - Java - eclipse-jdt-ls configuration issues - #7321: JDTLS automatic installation and environment variable setup Feel free to ignore if none of these address your specific case.
Author
Owner

@patton73 commented on GitHub (Jan 23, 2026):

Its a really annoying problem. Please fix it asap.
Thanks.

@patton73 commented on GitHub (Jan 23, 2026): Its a really annoying problem. Please fix it asap. Thanks.
Author
Owner

@abrarrahman commented on GitHub (Jan 28, 2026):

you can disable lsp for java in opencode's config.

create an opencode.json file where you start opencode from

{
  "$schema": "https://opencode.ai/config.json",
  "lsp": {
    "jdtls": {
      "disabled": true
    }
  }
}

that solves the issue for me.

@abrarrahman commented on GitHub (Jan 28, 2026): you can disable lsp for java in opencode's config. create an opencode.json file where you start opencode from ``` { "$schema": "https://opencode.ai/config.json", "lsp": { "jdtls": { "disabled": true } } } ``` that solves the issue for me.
Author
Owner

@patton73 commented on GitHub (Jan 28, 2026):

What about if using Beta desktop app? Where to put this config file?

@patton73 commented on GitHub (Jan 28, 2026): What about if using Beta desktop app? Where to put this config file?
Author
Owner

@ML-Marco commented on GitHub (Feb 5, 2026):

These files are even created when in plan mode.

@ML-Marco commented on GitHub (Feb 5, 2026): These files are even created when in plan mode.
Author
Owner

@jameskyle commented on GitHub (Feb 6, 2026):

I asked the OpenCode plan agent what it's using jdtls for and it thinks generation of these are necessary for it to perform its analysis of dependencies, classpaths, errors, etc since it uses the eclipse tool to do this.

My solution was not to disable the tool, but to add these to my .gitignore. The agent suggested these as a start.

# --- Eclipse / JDTLS / Buildship metadata ---
.project
.classpath
.settings/
.metadata/
.recommenders/
# JDTLS "workspace" folders (if they end up inside the repo)
.jdtls/
.jdtls-cache/
.jdtls-workspace/
.jdtls-data/
@jameskyle commented on GitHub (Feb 6, 2026): I asked the OpenCode plan agent what it's using jdtls for and it thinks generation of these are necessary for it to perform its analysis of dependencies, classpaths, errors, etc since it uses the eclipse tool to do this. My solution was not to disable the tool, but to add these to my .gitignore. The agent suggested these as a start. ``` # --- Eclipse / JDTLS / Buildship metadata --- .project .classpath .settings/ .metadata/ .recommenders/ # JDTLS "workspace" folders (if they end up inside the repo) .jdtls/ .jdtls-cache/ .jdtls-workspace/ .jdtls-data/ ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6924