Skip to content

Crash After Exiting Editor #4834

Closed
Closed

Description

@aaronnewsome

Description

Many times when using the editor (vim), after :wq it should return the text of the editor into the prompt, but instead it just crashes. Not all the time but when it does crash, it's super annoying when you've taken a long time to write a prompt and then POOF it's gone. The file is also immediately deleted from the /tmp directory, why - I don't know. I've got into the habit of saving to another file before exiting the editor (which is super cumbersome), but the one time I forget to save to another file, after 20 minutes of editing my prompt in the editor, :wq then CRASH! Super anoying.

OpenCode version

1.0.115

Steps to reproduce

I don't know how to reliably reproduce this issue. It shows up randomly, usually at the worst time!

Yes, I already searched for editor crash before I opened the bug. The two results are not the same issue.

Screenshot and/or share link

Image

Operating System

No response

Terminal

No response

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 27, 2025
  2. github-actions commented on Nov 27, 2025

    @github-actions
    Contributor

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

    These all involve editor-related crashes, TUI restoration issues, or problems exiting the editor. Feel free to ignore if none of these address your specific case.

  3. aaronnewsome commented on Nov 28, 2025

    @aaronnewsome
    Author

    following up, this prompt pasted into the editor will consistently crash opencode after exiting the editor

    docker compose build backend --no-cache
    WARN[0000] /home/anewsome/Documents/git/rag-vault/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
    Compose now can delegate build to bake for better performances
    Just set COMPOSE_BAKE=true
    [+] Building 59.5s (14/14) FINISHED                                                                                                                                                                                                             docker:default
     => [backend internal] load build definition from Dockerfile                                                                                                                                                                                              0.0s
     => => transferring dockerfile: 1.12kB                                                                                                                                                                                                                    0.0s
     => [backend internal] load metadata for docker.io/library/python:3.12-slim                                                                                                                                                                               4.4s
     => [backend internal] load .dockerignore                                                                                                                                                                                                                 0.0s
     => => transferring context: 2B                                                                                                                                                                                                                           0.0s
     => [backend 1/8] FROM docker.io/library/python:3.12-slim@sha256:b43ff04d5df04ad5cabb80890b7ef74e8410e3395b19af970dcd52d7a4bff921                                                                                                                         3.2s
     => => resolve docker.io/library/python:3.12-slim@sha256:b43ff04d5df04ad5cabb80890b7ef74e8410e3395b19af970dcd52d7a4bff921                                                                                                                                 0.0s
     => => sha256:b43ff04d5df04ad5cabb80890b7ef74e8410e3395b19af970dcd52d7a4bff921 10.37kB / 10.37kB                                                                                                                                                          0.0s
     => => sha256:971f04b358cf483ec445a8d388fb55267451f080d90fb136c8e69684a02a9604 1.75kB / 1.75kB                                                                                                                                                            0.0s
     => => sha256:445121148b187db67e48799f002500623fa22d9f635e522f4e0f345414bd9107 5.68kB / 5.68kB                                                                                                                                                            0.0s
     => => sha256:0e4bc2bd6656e6e004e3c749af70e5650bac2258243eb0949dea51cb8b7863db 29.78MB / 29.78MB                                                                                                                                                          0.8s
     => => sha256:490b9a1c25e472ab1cceab4ed6f3bd252006f7c6eea0ef7ba845c996adb6f302 1.29MB / 1.29MB                                                                                                                                                            0.2s
     => => sha256:0674d14a155c94f13e648265aa3ba62410e1fe0387fef64cc608388e54232880 12.11MB / 12.11MB                                                                                                                                                          0.4s
     => => sha256:b7ba6d2a1fc72f9587288b3b60221d1b07dae4f61a41360d2cc281fe7c007b3a 250B / 250B                                                                                                                                                                0.3s
     => => extracting sha256:0e4bc2bd6656e6e004e3c749af70e5650bac2258243eb0949dea51cb8b7863db                                                                                                                                                                 1.5s
     => => extracting sha256:490b9a1c25e472ab1cceab4ed6f3bd252006f7c6eea0ef7ba845c996adb6f302                                                                                                                                                                 0.1s
     => => extracting sha256:0674d14a155c94f13e648265aa3ba62410e1fe0387fef64cc608388e54232880                                                                                                                                                                 0.6s
     => => extracting sha256:b7ba6d2a1fc72f9587288b3b60221d1b07dae4f61a41360d2cc281fe7c007b3a                                                                                                                                                                 0.0s
     => [backend internal] load build context                                                                                                                                                                                                                 6.9s
     => => transferring context: 704.97MB                                                                                                                                                                                                                     6.8s
     => [backend 2/8] WORKDIR /app                                                                                                                                                                                                                            1.8s
     => [backend 3/8] RUN pip install --upgrade pip                                                                                                                                                                                                           2.9s
     => [backend 4/8] RUN apt-get update && apt-get install -y     curl     gcc     g++     make     libc6-dev     libpq-dev     && rm -rf /var/lib/apt/lists/*                                                                                               7.7s 
     => [backend 5/8] COPY backend/requirements.txt .                                                                                                                                                                                                         0.0s 
     => [backend 6/8] RUN pip install --no-cache-dir --upgrade pip &&     pip install --no-cache-dir -r requirements.txt || (echo "Pip install failed, retrying with individual packages" &&     pip install --no-cache-dir fastapi uvicorn sqlalchemy pyda  32.6s 
     => [backend 7/8] COPY . .                                                                                                                                                                                                                                4.5s 
     => [backend 8/8] RUN mkdir -p /app/documents /app/vector_db /app/data                                                                                                                                                                                    0.1s 
     => [backend] exporting to image                                                                                                                                                                                                                          2.2s 
     => => exporting layers                                                                                                                                                                                                                                   2.2s 
     => => writing image sha256:30cfae9623ba77e8d1f9be0b759cc4323f8d2c764c1fb640c4f4e203d7fd08c6                                                                                                                                                              0.0s 
     => => naming to docker.io/library/rag-vault-backend                                                                                                                                                                                                      0.0s 
     => [backend] resolving provenance for metadata file                                                                                                                                                                                                      0.0s
    [+] Building 1/1
     ✔ backend  Built                                                                             
    

    removing the last line with the ✔ character and opencode doesn't crash on editor exit.

  4. rekram1-node commented on Nov 28, 2025

    @rekram1-node
    Contributor

    thank you for info, we will fix

  5. kommander commented on Dec 20, 2025

    @kommander
    Contributor

    Is this still an issue?

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions