Skip to content

Commit 02c24f2

Browse files
committed
fix(container): harden shell terminal keybinds for Docker-attached panes
Disable signals that cause problems in Docker-attached terminals: Ctrl+Z (suspend closes pane), Ctrl+S/Q (flow control freeze), Ctrl+W (Windows Terminal close-tab conflict). Rebind SIGQUIT and EOF to esoteric combos for emergency use.
1 parent 360e113 commit 02c24f2

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

container/.devcontainer/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Terminal
6+
7+
- **Shell terminal keybinds hardened** — disabled `Ctrl+Z` (suspend, which closes Docker-attached panes), `Ctrl+S/Q` (flow control freeze), and `Ctrl+W` (conflicts with Windows Terminal close-tab). Rebound `Ctrl+\` (SIGQUIT) to `Ctrl+]` and `Ctrl+D` (EOF) to `Ctrl+^` as emergency-only alternatives.
8+
59
### Hermes Agent
610

711
- **New feature: `hermes-agent`** — installs [Nous Research's Hermes Agent](https://hermes-agent.nousresearch.com/) CLI via the upstream `curl | bash` installer with `--skip-setup`. Hermes uses the plain `anthropic` / `openai` Python SDKs directly and supports any compatible provider (Anthropic, OpenAI, MiniMax, local models). Enabled by default; set `"version": "none"` in `devcontainer.json` to disable.

container/.devcontainer/scripts/setup-aliases.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,20 @@ if [ "\$TERM" = "xterm" ] || [ -z "\$TERM" ]; then
108108
fi
109109
export COLORTERM="\${COLORTERM:-truecolor}"
110110
111+
# Terminal keybind hardening — disable signals that cause problems in
112+
# Docker-attached panes (suspend closes pane, flow-control freezes
113+
# terminal). EOF and QUIT rebound to esoteric combos for emergency use.
114+
stty susp undef # Kill Ctrl+Z — suspend closes Docker-attached panes
115+
stty -ixon # Kill Ctrl+S/Q — flow control freezes terminal
116+
stty werase undef # Kill Ctrl+W — conflicts with Windows Terminal close-tab
117+
stty quit '^]' # Rebind Ctrl+\ (SIGQUIT) → Ctrl+] (emergency only)
118+
stty eof '^^' # Rebind Ctrl+D (EOF) → Ctrl+^ (emergency only)
119+
# zsh bindkey cleanup — stty handles the terminal layer, but zsh's line
120+
# editor has its own Ctrl+W binding that bypasses stty
121+
if [ -n "\$ZSH_VERSION" ]; then
122+
bindkey -r '^W' # Remove backward-kill-word (stty werase already disabled)
123+
fi
124+
111125
# Native binary (installed by claude-code-native feature)
112126
_CLAUDE_BIN="\$HOME/.local/bin/claude"
113127

0 commit comments

Comments
 (0)