Skip to content

Log File Deleted When Multiple IDE Instances Are Attached to OpenCode Server #4999

@taqtiqa-mark

Description

@taqtiqa-mark

Description

Environment

  • OpenCode v1.0.128 installed via curl script in a containerized setup.
  • Server running locally using opencode serve.

Steps to Reproduce

  1. Start the OpenCode server with opencode serve.
  2. Attach the first IDE instance using opencode attach, which creates a log file.
  3. Attach a second IDE instance using opencode attach.
  4. Confirm server container instance ID has not changed.

Expected Behavior

Each IDE instance should maintain its own log file, or separate logs should be preserved for concurrent sessions without deletion or overwriting.

Actual Behavior

Upon attaching a new IDE instance, the previous log file is deleted, and a new log file is created with a timestamp corresponding to the most recent attachment. As a result, with multiple (e.g., two) IDE instances open, only one log file exists, reflecting the latest launch time. This leads to loss of logs from earlier instances.

Impact

This behavior hinders debugging and monitoring of multiple concurrent IDE sessions, as historical logs are not retained.

Suggested Resolution

Consider implementing server log file AND per-attach-instance log files (e.g., differentiated by session ID or timestamp) or appending to existing logs instead of overwriting.

OpenCode version

v1.0.128

Operating System

Linux (Debian testing)

Terminal

Alacritty+Zellij

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions