A pick typed in a shell runs there, keeping the shell's environment (FZTA-24) #208
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
queue
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/fzt-automate!208
Loading…
Reference in a new issue
No description provided.
Delete branch "fzta-24-run-in-shell"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Work package: https://openproject.home.romaine.life/wp/FZTA-24
Typing
atin a shell, orfzt-automate resume-claude, used to hand the pick to tmux, which replaced the tab's program (killing that shell) and started the program from the tmux server's environment. Anything set in the shell, such asANTHROPIC_API_KEY, was lost, so a Claude session could not be resumed on an API key.Changed: when fzt-automate was started from a shell in the tab (tmux's
pane_pidis not this process), the pick runs as that shell's child. It inherits the shell's environment and folder, and the prompt comes back when the program exits. This applies to the menu's pick (runHere), to the Claude launchers (respawnAs: launch-claude, resume-claude, work-on-app claude), and to Codex and OpenCode. While the child runs, fzt-automate ignores Ctrl+C and leaves it to the child.Unchanged: where fzt-automate is the tab's own program (the Ctrl+T Ctrl+A tab, a takeover tab from the popup, a tab tmux restored with
resume-claude <id>, claude-relaunch-with-chrome), tmux still restarts the tab as the program, so the tab closes with it.Not covered: the popup menu (prefix menu) never sees a shell's environment.
resume-claudeis still a subcommand of fzt-automate, not a command you can type on its own.Tested: unit tests for both paths, plus a real child run that checks the environment and folder are inherited. On a throwaway tmux server, typing the resume in a PowerShell tab with a key set started a fake
claudewith that key, in the same shell, and the prompt came back. Starting it as a tab's own program still restarted the tab asclaude --resume <id>.