Skip to content

fix(runtime): update shell session wire protocol - #249

Open
priyasingh2111 wants to merge 1 commit into
aws:mainfrom
priyasingh2111:fix/shell-fixes
Open

fix(runtime): update shell session wire protocol#249
priyasingh2111 wants to merge 1 commit into
aws:mainfrom
priyasingh2111:fix/shell-fixes

Conversation

@priyasingh2111

@priyasingh2111 priyasingh2111 commented Aug 11, 2026

Copy link
Copy Markdown

Description

Simplify shell session connection and lifecycle to improve performance and align with updated server behavior.

Changes:

  • Faster connection — shell is ready immediately after WebSocket opens. Removed unnecessary handshake wait that added up to 10s latency.
  • close() now detaches instead of terminating — closing the session disconnects the WebSocket but leaves the shell alive on the server, enabling reconnection within the reconnect window.
  • Removed shell.reconnected and shell.bytesDropped properties — these are no longer available. TypeScript will report a compile error if accessed.
  • Updated onReconnect callback signature — now () => void | Promise<void> (no arguments).

Exit codes, auto-reconnect, and all other shell functionality continue to work as before.

Related Issues

Documentation PR

Type of Change

Breaking change

Breaking Changes

  • shell.reconnected — removed (was boolean)
  • shell.bytesDropped — removed (was number)
  • onReconnect callback signature: (reconnected: boolean) => void() => void | Promise<void>
  • close() no longer terminates the shell — it detaches, allowing reconnection

Testing

  • I ran npm run check
  • npm test — 616 tests pass (24 files), 1.13s
  • npm run lint — clean
  • npm run format:check — clean
  • npm run type-check — clean
  • Integration tested against live runtime (8/8 scenarios pass)

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@priyasingh2111
priyasingh2111 requested a review from a team August 11, 2026 18:15
@github-actions github-actions Bot added size/m PR size: M type: test area: runtime and removed size/m PR size: M labels Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant