Enable Ctrl+Z (job control) in Podman interactive mode#409
Open
phryneas wants to merge 1 commit intomattpocock:mainfrom
Open
Enable Ctrl+Z (job control) in Podman interactive mode#409phryneas wants to merge 1 commit intomattpocock:mainfrom
phryneas wants to merge 1 commit intomattpocock:mainfrom
Conversation
Wraps the agent command in a bash session with `set -m` (job control enabled) and writes it to /tmp/.sc_init.sh via base64 to avoid shell quoting issues. Bash runs it as a foreground job, so Ctrl+Z suspends just the agent while the shell retains terminal control. `fg` resumes it. PROMPT_COMMAND resets the terminal on resume and exits bash once the agent job is no longer running (normal exit), but not when it is stopped. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@phryneas is attempting to deploy a commit to the Matt Pocock's projects Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
Oh, I just wanted to add: feel free to close if it doesn't fit the direction you're going :) |
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.
--- Human note:
I wanted to be able to drop out of interactive sessions into the container, to run commands, see what's available in the container for Claude to use and essentially have a good starting point to debug the whole thing.
This isn't really beautiful, but works nicely for me. Still, please test it by going through the test plan before merging :)
--- AI PR:
Summary
set -m(job control enabled), so Ctrl+Z suspends only the agent process while bash retains terminal control/tmp/.sc_init.shvia a base64 round-trip to survive any special characters in the command argsPROMPT_COMMANDresets the terminal withstty saneon resume, and exits bash once the agent job is gone (normal exit) — but not when it's merely stopped, sofgcorrectly resumes itTest plan
fgto resume the agent — it should continue from where it left off🤖 Generated with Claude Code