Description
Environment
- OpenCode
v1.0.128 installed via curl script in a containerized setup.
- Server running locally using
opencode serve.
Steps to Reproduce
- Start the OpenCode server with
opencode serve.
- Attach the first IDE instance using
opencode attach, which creates a log file.
- Attach a second IDE instance using
opencode attach.
- 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
Description
Environment
v1.0.128installed via curl script in a containerized setup.opencode serve.Steps to Reproduce
opencode serve.opencode attach, which creates a log file.opencode attach.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.128Operating System
Linux (Debian testing)
Terminal
Alacritty+Zellij