fix(byohctl): Make Ctrl+C actually work: take a context from the cobra command - #227
Merged
Conversation
indradhanush
force-pushed
the
dg/context-todo-byohctl
branch
from
August 20, 2026 22:20
cd3d79c to
b424332
Compare
sebastian-pf9
approved these changes
Aug 21, 2026
indradhanush
force-pushed
the
dg/context-todo-byohctl
branch
2 times, most recently
from
August 21, 2026 11:36
040330e to
f532d20
Compare
indradhanush
marked this pull request as ready for review
August 21, 2026 11:36
indradhanush
force-pushed
the
dg/context-todo-byohctl
branch
from
August 21, 2026 12:13
f532d20 to
2fc1e66
Compare
Every API call built its own context.TODO, so nothing the CLI did could be interrupted. The wait for a ByoHost's machineRef to clear was the worst of it: a bare sleep loop that ignored Ctrl-C for up to its full timeout. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
indradhanush
force-pushed
the
dg/context-todo-byohctl
branch
from
August 21, 2026 12:50
2fc1e66 to
df3c043
Compare
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.
Every API call built its own context.TODO, so nothing the CLI did could be
interrupted. The wait for a ByoHost's machineRef to clear was the worst of it:
a bare sleep loop that ignored Ctrl-C for up to its full timeout of 5 seconds.
Thread cmd.Context() down from each command. The wait loop now selects on
cancellation instead of sleeping through it.