mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-10-06 16:02:05 +00:00
On mac/linux the daemon reads the foreground process's real argv, so resume_command can replay launch flags like --dangerously-skip-permissions. The Windows path detects the agent from the OSC 133;C shell-integration command capture but threw the command line away, stamping an empty argv: every resumed agent came back bare, with none of its launch flags. Tokenize the captured command (case-preserved, quotes trimmed, PowerShell call operator dropped) and stamp it as the pane's launch argv. Detection keeps lowercasing its own copy; replay_flags' safety allowlist already rejects tokens a whitespace split would mangle, falling back to the bare resume command as before. Fork commands share the same argv source, so they are fixed by the same change. Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>