Making this simple for a user; who is transitioning mediums (from a cli to a web browser) - this can be interesting technical challenge.
My solution (in python, because that's what I am writing my script in):
args = parser.parse_args()
try:
### Authenticate with some service, Example below
### service = SERVICE(args.server, auth=(username, password))
except SERVICE_Error as e:
if "ERROR_KEY" in e.text: # Your key identifier where you know you have 'this one particular issue'
print("ERROR: log in to {} using 'incognito' mode in your browser to reset the CAPCHA failed login counter".format(args.server))
import webbrowser; wb = webbrowser.get()
if 'chrome' in wb.name:
wb.remote_args.insert(1, "--incognito")
elif 'firefox' in wb.name:
wb.remote_args.insert(1, "--private-window")
print("INFO: Opening default web-browser in --incognito/--private-window for you! Login to reset the failed log-in counter.")
print("INFO: After logging in on the web-browser rerun the cli script and authenticate correctly")
wb.open_new(args.server)