Fix terminal spawning#3
Merged
Merged
Conversation
When spawning a new PTY via pty:spawn, default the cwd to the first workspace folder if none is explicitly provided. Previously, new terminals inherited the extension host's working directory (typically home), while only restored sessions correctly used the saved cwd. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Standalone MouseTerm was spawning a non-login shell, so brew shellenv (and anything else in ~/.zprofile) never ran—causing tools like asdf to be missing from PATH. Pass a `-<shell>` argv[0] to node-pty so the shell runs in login mode, matching Terminal.app, iTerm2, and VSCode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
node-pty sets argv[0] to the shell path and passes args as argv[1..n], so `-zsh` was being interpreted as CLI flags (`-z`, `s`, `h`), breaking the shell. Use the standard `-l` flag which all POSIX shells support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nedtwigg
added a commit
that referenced
this pull request
May 9, 2026
…alert iTerm2.md had three unrelated concerns (iTerm2 identity, notification machinery, and a registry of every OSC parsed). vscode.md mixed VS Code-specific behavior with adapter-agnostic transport. - OSC.md (new): every supported OSC plus iTerm2 identity and known- unimplemented sequences. Single source for parsing-location and pty:data strip semantics. - transport.md (new): adapter-agnostic PTY lifecycle, message protocol, and persisted-session types shared across VS Code, standalone, and fake adapters. - alert.md: absorbs notification machinery (OSC 9/9;4/99/777/BEL, ActivityNotification model, text handling, security, scenarios, verification checklist). - vscode.md: trimmed to VS Code-specific layer (manifest, persistence flow, theme, CSP, build, dream-architecture commands). - terminal-state.md: header cross-ref points at alert.md and OSC.md. - iTerm2.md: deleted. Also adds SPEC-CONFLICTS.md capturing a prior audit; this commit closes items #3 (OSC 9 timing) and #4 (pty:data strip semantics) from it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
nedtwigg
added a commit
that referenced
this pull request
May 9, 2026
The docs/specs reorganization in 096a3d5 closed: - #3 (OSC 9 title-override timing stated three ways) — iTerm2.md is gone; terminal-state.md is the single canonical source. - #4 (pty:data strip semantics vs "the same streaming parser") — OSC.md is the single source for parsing-location rules. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
No description provided.