# Codex runs its sessions in a shared background server unless it starts with
# --no-daemon, and then its hooks can't tell which tab a session is in. In a
# tab that kaeru tracks, this starts Codex's interactive screen with
# --no-daemon, so that the session runs in the tab. Other Codex commands run
# as they are. kaeru adds this when its codex-no-daemon option is on.
if test -n "$__kaeru_cwd_file"
function codex
for argument in $argv
switch $argument
case --no-daemon '--remote*' KAERU_ONE_OFF_COMMANDS
command codex $argv
return
end
end
command codex --no-daemon $argv
end
end