fix(invoke): show full session ID and print resume command on exit#904
Merged
aidandaly24 merged 2 commits intomainfrom Apr 22, 2026
Merged
fix(invoke): show full session ID and print resume command on exit#904aidandaly24 merged 2 commits intomainfrom
aidandaly24 merged 2 commits intomainfrom
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
Contributor
Package TarballHow to installnpm install https://github.com/aws/agentcore-cli/releases/download/pr-904-tarball/aws-agentcore-0.9.1.tgz |
Contributor
|
The Options to fix:
useEffect(() => {
if (sessionId) {
const cyan = '\\x1b[36m';
const reset = '\\x1b[0m';
setExitMessage(`To resume this session, run: ${cyan}agentcore invoke --session-id ${sessionId}${reset}`);
}
return () => clearExitMessage();
}, [sessionId]);
const handleExit = useCallback(() => {
if (sessionId) {
const cyan = '\\x1b[36m';
const reset = '\\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 |
aidandaly24
commented
Apr 21, 2026
Contributor
Coverage Report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.