Repository navigation
Description
Summary
In a Superset terminal pane, running git diff with delta as the git pager leaves stray characters at the next shell prompt, like:
11;rgb:1515/1111/101062;4;9;22c
These are terminal capability responses (background color and device attributes) that delta asks for on startup. Superset isn't fully consuming them, so they leak into the shell as if typed. The same delta setup works correctly in iTerm2 on the same machine, so this looks like a Superset terminal bug rather than a delta one. Also reproduces with vim as the git editor (e.g. git rebase -i), pointing at the same root cause via a different trigger.
Relationship to #4013
#4013 (filed recently by @wesm) reports the same family of bug, with the same 1515/1111/1010 background-color values. Likely the same root cause. Filing this as a separate issue rather than a comment because the user-visible symptoms differ enough to track independently:
- Terminal duplicates CSI 6n response after OSC 11 query #4013 uses a synthetic Go program that reads the responses correctly but observes the cursor-position response being duplicated on the wire.
- This issue is a real-world trigger (delta +
git diff) where the responses leak past the foreground process entirely and land at the shell prompt as input. - DA1 angle is new. Terminal duplicates CSI 6n response after OSC 11 query #4013 covers OSC 11 + CSI 6n. The leak here shows OSC 11 + DA1 (
ESC[?62;4;9;22c) running together, which suggests the bug isn't specific to CSI 6n — it's any response following an OSC 11 in the same probe burst.
If they share a fix, great. If not, both surfaces are tracked.
Steps to reproduce
- Install delta:
brew install git-delta - In
~/.gitconfig:[core] pager = delta
- Open a Superset terminal pane,
cdinto any git repo - Run
git diff— leak appears at the next prompt - Run
git diff HEAD~1..HEAD(or any range with output) — leak appears on the command line below the diff output, blocking the next prompt from rendering cleanly
The bug shows up whether or not the diff has content. The trigger is delta starting up and querying the terminal, not the diff itself.
For a self-contained repro without delta, see the Go program in #4013.
Alternative trigger (no delta needed, requires vim as git editor):
- Ensure git uses vim as the editor:
git config --global core.editor vim(or haveEDITOR=vim/GIT_EDITOR=vimin your shell). Default macOS git already uses vim via/usr/bin/vi, so most setups hit this without extra config. - Open a Superset terminal pane,
cdinto any git repo with at least 1 commit - Run
git rebase -i HEAD~1— vim opens the rebase todo, probes the terminal, leak appears at the prompt after:wq(commit count doesn't matter,HEAD~1is enough)
What the leaked text means
11;rgb:1515/1111/101062;4;9;22c
11;rgb:1515/1111/1010— the terminal's reply to delta's "what's your background color?" query (OSC 11). The leading escape character was consumed; the payload was not.62;4;9;22c— the terminal's reply to delta's "what device are you?" query (DA1, normallyESC[?62;4;9;22c). Same shape: prefix consumed, payload leaked.
Delta sends both queries back-to-back at startup to pick a light/dark theme and color mode.
Also reproduces with vim (different trigger, same root cause)
git rebase -i HEAD~1 in a Superset pane leaks .,.+111$y at the prompt after the editor exits. Trigger is vim's startup terminal probes, not delta. Confirms the leak isn't specific to delta — any foreground process that queries the terminal at startup hits it.
On macOS, /usr/bin/vi is symlinked to vim 9.1, so vi reproduces too. nano, code --wait, and zed --wait do not.
Expected
No stray text at the prompt. The replies should be consumed before control returns to the shell.
Actual
Reply payloads land at the shell prompt as if typed.
Environment
- Superset 1.8.0 (also seen in earlier versions, at least a week back)
- macOS 26.3.1 (Apple Silicon)
TERM=xterm-256color,COLORTERM=truecolorSUPERSET_HOOK_VERSION=2- Shell: zsh
- Repro tools: delta 0.18.2, git 2.53.0
- Does not reproduce in iTerm2 or kitty on the same machine with the same config.
Related
- Terminal duplicates CSI 6n response after OSC 11 query #4013 — likely same root cause, see above
- [bug]
;1Rappears at shell prompt after running certain commands (e.g. gh pr checkout) #3325 —;1Rat prompt aftergh pr checkout(cursor-position reply leaking) - [bug] Codex terminal state corrupts on pane reattach after tab/workspace switch #3309 — Codex pane reattach corruption (related terminal-state handling)
- Add Primary Device Attribute (DA1) query response support #3028 — DA1 response support (closed; the DA1 portion of this leak suggests Superset now answers DA1, but timing or duplication is interacting badly with OSC 11)
Delta has had its own OSC 11 quirks historically (dandavison/delta#1707, dandavison/delta#1735), both fixed upstream. Current delta works correctly outside Superset on the same machine.
Activity
fix: solve #4041 — strip duplicate terminal query responses from rend…
viddo commentedon May 5, 2026
re: delta, as workaround for now, using standard
catas pager, in~/.zshrc:Don't rebase too often so not as annoying.
[-]Terminal leaks OSC 11 + DA1 query responses into shell input after foreground process exits (reproducible with delta as git pager)[/-][+]Terminal leaks OSC 11 + DA1 query responses into shell input after foreground process exits (reproducible with delta as git pager, and with vim via git rebase -i)[/+]Kitenite commentedon May 6, 2026
Related reports (cross-referenced during issue triage — same area, may or may not share a root cause):
ajrobertsonio commentedon May 12, 2026
Adjacent datapoint for the triage cross-ref: the same probe-response race manifests as outright hijacking of interactive child-process prompts when the next command is
gh auth loginorgh auth refresh. CPR rather than OSC 11 / DA1 in my case, but the timing and consequence are the same shape — response lands inside the child's stdin read instead of between commands.Full reproduction posted at #3325 —
gh auth refreshaborts withcould not prompt: unexpected escape sequence from terminal: ['\x1b' ']'];gh auth loginarrow-select gets pre-filled with1R, Y/n gets pre-filled with56R56R. Adding here since this looks like the active thread.Kitenite commentedon Jul 11, 2026
Closing as a duplicate of #5604, the consolidated tracker for stale
terminal-inputissues from the July 2026 stale-issue sweep (no activity since 2026-06-01). If this still applies on a current build, comment on #5604 and we'll reopen.