Hi, to debug this can you please log the current tab number when starting the macro? If the tab closing fails, is there anything different (different tab number)?
To log the current tab number, use add this line:
{
"Command": "echo",
"Target": "tab=${!current_tab_number}, relative=${!current_tab_number_relative}",
"Value": "green",
"Description": ""
}