Uh oh!
There was an error while loading. Please reload this page.
fix(invoke): show full session ID and print resume command on exit - #904
Conversation
The invoke TUI truncated the session ID to 8 characters, making it impossible to copy the full UUID needed for --session-id. Additionally, there was no guidance on how to resume a session after exiting. - Display full session ID in the TUI header instead of truncating - Print a colored resume command after TUI exit (both Esc and Ctrl+C) - Use Ink's unmount() instead of process.exit(0) for clean shutdown, which also fixes the update notifier not showing on Esc exit
Package TarballHow to installnpm install https://github.com/aws/agentcore-cli/releases/download/pr-904-tarball/aws-agentcore-0.9.1.tgz |
jesseturner21
commented
Apr 21, 2026
The Options to fix:
useEffect(()=>{if(sessionId){constcyan='\\x1b[36m';constreset='\\x1b[0m';setExitMessage(`To resume this session, run: ${cyan}agentcore invoke --session-id ${sessionId}${reset}`);}return()=>clearExitMessage();},[sessionId]);
consthandleExit=useCallback(()=>{if(sessionId){constcyan='\\x1b[36m';constreset='\\x1b[0m';setExitMessage(`To resume this session, run: ${cyan}agentcore invoke --session-id ${sessionId}${reset}`);}onExit();},[sessionId,onExit]);Then use Option 1 is simpler but means the message won't show if the user navigates away and then exits. Option 2 ensures the message only shows when exiting directly from invoke, which matches the |
Uh oh!
There was an error while loading. Please reload this page.
Coverage Report
|
Description
The invoke TUI truncated the session ID to 8 characters (
550e8400), making it impossible to copy the full UUID needed foragentcore invoke --session-id <id>to resume a session. Additionally, there was no guidance on how to resume a session after exiting.This PR:
agentcore invoke --session-id <full-uuid>) after TUI exitunmount()instead ofprocess.exit(0)for clean shutdown, which also fixes the update notifier not appearing on Esc exitRelated Issue
Closes #
Documentation PR
N/A
Type of Change
Testing
Manually tested all exit paths:
Ctrl+C: Resume message and update notifier both display ✅
Double Esc: Resume message and update notifier both display ✅
agentcore invoke(direct): Works correctly ✅agentcore→ invoke (TUI): Works correctly ✅Session resumption: Copied session ID from output, used
--session-idflag to resume successfully ✅I ran
npm run test:unitandnpm run test:integI ran
npm run typecheckI ran
npm run lintIf I modified
src/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.