anomalyco / anomalyco/opencode

tui: /undo fails with Session is busy during generation

Open
#38,476 0 comments 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Jul 23, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Summary

Running /undo while a response is generating fails with Session is busy. /undo should cancel the active generation and undo the previous message, as it did before the beta.

Environment

  • opencode version: 1.18.4
  • OS: Darwin 24.5.0 arm64 (macOS)
  • Terminal: tmux (TERM_PROGRAM=tmux, TERM=xterm-256color, COLORTERM=truecolor)
  • Shell: /bin/zsh
  • Install/channel: Homebrew release; user reports this worked before the beta
  • Active plugins: ~/.config/opencode/plugins/opencode-anthropic-auth/index.mjs

Reproduction

  1. Start an agent response.
  2. While the response is still generating, run /undo.
  3. Observe the busy-session error.

Expected Behavior

/undo cancels the active generation, then undoes the previous message.

Actual Behavior

/undo fails consistently across sessions with:

Session is busy: ses_<redacted>

It works only after the agent is no longer in progress.

Additional Context

  • Reproduces every time across all tested sessions.
  • This behavior reportedly worked before the beta.
  • Related closed report: #14014 described revert behavior while busy and noted that session.undo already aborted ongoing work.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.