TIL: One escape sequence makes my terminal follow my AI agent into a worktree
The thing that made me grin today: I tell Claude Code to “work in a git worktree,” the agent jumps into a fresh checkout, and my Ghostty terminal follows it — new tabs and splits open right inside the worktree, not where I launched. The agent moves; the terminal moves with it. Feels like magic, and it’s one escape sequence.
A bit about OSC
Escape sequences aren’t just colors. OSC — Operating System Command — is the family that sends side-channel messages to your terminal: window title, clipboard, and the one here, the current directory (OSC 7):
评论
?
参与讨论