[PR #4496] fix: prompt submit error with opencode -c #10990

Closed
opened 2026-02-16 18:15:45 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/4496

State: closed
Merged: Yes


Fixes https://github.com/sst/opencode/issues/4470.

Cause:

Problem was that the effect was triggered every time sync.data.session.at(0) changed. This also happens when submitting a prompt from the home screen. This causes the Prompt component to be destroyed in the middle of the submit function and a later call to input.extmarks.clear() in the same submit function throws.

Fix:
Make sure session is continued only once per app.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4496 **State:** closed **Merged:** Yes --- Fixes https://github.com/sst/opencode/issues/4470. Cause: Problem was that the effect was triggered every time sync.data.session.at(0) changed. This also happens when submitting a prompt from the home screen. This causes the Prompt component to be destroyed in the middle of the `submit` function and a later call to `input.extmarks.clear()` in the same `submit` function throws. Fix: Make sure session is continued only once per app.
yindo added the pull-request label 2026-02-16 18:15:45 -05:00
yindo closed this issue 2026-02-16 18:15:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10990