Skip to content

fix: finalize cancelled shell runs#39

Merged
Astro-Han merged 4 commits into
devfrom
codex/fix-shell-cancel
Apr 20, 2026
Merged

fix: finalize cancelled shell runs#39
Astro-Han merged 4 commits into
devfrom
codex/fix-shell-cancel

Conversation

@Astro-Han

Copy link
Copy Markdown
Owner

Summary

  • make the shell prompt setup uninterruptible until the assistant and running bash tool scaffolding exist
  • finalize shell cancel fallback into a completed aborted bash result instead of reusing a running snapshot
  • preserve partial streamed shell output when cancellation falls back to the interrupted path
  • add regression coverage for ignored TERM and partial-output preservation

Why

After PR #36 merged, CI run #107 started failing in prompt-effect cancellation coverage. Early shell cancellation could race ahead of the normal finalization path, which either threw Impossible while looking up the last assistant message or reused a still-running bash tool snapshot. The fallback path also dropped already-streamed shell output.

Related Issue

Follow-up to #36. Triggered by CI run #107 after merge.

How To Verify

cd packages/opencode && bun test test/session/prompt-effect.test.ts --timeout 30000
cd packages/opencode && bun run typecheck
cd packages/opencode && bun run build

Screenshots or Recordings

N/A, no visible UI changes.

Checklist

  • I ran the relevant verification steps
  • I tested visible changes manually when needed
  • I am targeting the dev branch

@Astro-Han Astro-Han merged commit acdb8a6 into dev Apr 20, 2026
9 checks passed
@Astro-Han Astro-Han deleted the codex/fix-shell-cancel branch April 20, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant