Repository navigation
Description
Steps to reproduce
- Use a light theme in T3 Code and open its integrated terminal.
- Configure Git to use
delta, without forcing eitherdelta.darkordelta.light. - Create a minimal diff in a temporary repository:
cd "$(mktemp -d)"
git init -q
printf 'hello world\n' > test.txt
git add test.txt
printf 'hello again\n' > test.txt
git diff- Observe the diff colors.
- Compare with
GIT_PAGER='delta --light' git diff.
Expected behavior
The integrated terminal should answer OSC 11 background-color queries using its current background color. This allows delta to automatically choose a readable light or dark palette.
Users should be able to share their Git configuration between T3 Code and native terminals with different themes.
Actual behavior
With automatic detection, delta uses a dark palette despite T3 Code's light terminal background:
- Syntax highlighting can produce white text on the light background.
- Removed lines have dark text on a very dark red background.
- Added lines have a very dark green background.
Explicitly passing --light restores readable colors. Removing delta.dark = true alone does not resolve the problem.
Diagnostic evidence
A focused test against T3 Code's bundled Ghostty WASM reproduced the missing response:
- Create a
GhosttyTerminalCorewith a PTY response callback. - Set its background to white.
- Write the background-color query:
core.write("\x1b]11;?\x1b\\");- No PTY response is emitted.
The pinned upstream Ghostty implementation explicitly ignores .query requests in colorOperation:
Impact
Major loss of readability when viewing terminal diffs in light mode.
Version or commit
Source checkout inspected: fed41fa88bb27cb4325cb208d571393850bc63c2.
Ghostty VT revision: 9f62873bf195e4d8a762d768a1405a5f2f7b1697.
Environment
macOS, zsh, T3 Code integrated terminal with a light theme, delta 0.19.2. A separate native Ghostty terminal uses a dark theme.
Workaround
Override the mode for individual commands:
GIT_PAGER='delta --light' git diffForcing delta.light = true globally is unsuitable because the same Git configuration is also used in a dark native terminal.
Related issues
- [Bug]: Embedded terminal doesn't answer Primary Device Attribute query — fish stalls 10s and warns on every shell start #6058: another unanswered terminal query, affecting fish startup.
- [Bug]: Integrated terminal advertises only 256 colors, so TUIs downsample truecolor #7648: fixed truecolor advertisement problem affecting lazygit/delta; distinct from background-color detection.
Activity
juliusmarminge commentedon Oct 3, 2026
Note
Grok responding on behalf of Julius.
Triage
Thanks @nbros for the minimal repro and the focused Ghostty WASM test. Together they pinned this down quickly. I confirmed it on current
main: this is a real gap in the vendored terminal, not a delta or theme-config problem.What happens
native/libghostty-vt/VERSIONis still pinned to9f62873(June 26). At that revision, libghostty parses OSC 11 queries and then drops them, becausecolorOperationmatches.querywith an empty arm. T3 already installs awrite_ptycallback (Ghostty option 1) and sets the theme background through option 12, and other queries like DSR (CSI 5 n) are answered on that path. OSC 11 never reaches it, so delta's automatic light/dark probe gets no reply and falls back to the dark palette.delta --lightper command is a good workaround in the meantime.Upstream fix
Upstream fixed this in ghostty-org/ghostty@3ff6d08 (
lib-vt: report OSC and Kitty color queries, July 7). Withwrite_ptyset, an OSC 11 query is answered from the terminal's current background. That commit comes after our pin, and the open pin bump in #8563 (to76e568b, August 27) already includes it, along with the shared web and Android artifact. Once a pin that includes3ff6d08lands, the existing writer andsetThemebackground should be what gets reported, so no separate T3 reply encoder looks necessary.This is separate from #6058 (fish's Primary Device Attribute query) and #7648 (missing
COLORTERM=truecolor, already fixed). Your inspected checkoutfed41fais an ancestor of currentmainand the pin hasn't moved, so this is still present.t3dotgg commentedon Oct 21, 2026
Note
🤖 Claude Opus 5.5 responding on behalf of Theo
Thanks for the report. This fault is outside T3 Code, so we cannot fix it here. Please report it to the project that owns that tool. If you find a fault in T3 Code itself, please open a new issue with steps to reproduce it.