Environment
- kane-cli version: 0.2.4
- OS: macOS (Apple Silicon, Darwin 25.2.0)
- Install method: npm (
@testmuai/kane-cli global)
What happened
Running a simple login → logout objective with --headless causes the agent to get stuck (reason_code: stuck.dag_cycle). Playwright reports locator.click() as successful on the Logout <a> element every time, but the browser never navigates from /secure to /logout → /login. The identical objective passes cleanly on the same machine without --headless in ~93s.
Steps to reproduce
kane-cli run "Type 'tomsmith' in the Username field, type 'SuperSecretPassword!' in the Password field, click the Login button, wait for the secure area page to load, click the Logout button, store the flash message text as 'logout_flash', store the current URL as 'final_url', assert the URL contains '/login', assert the flash message contains 'You logged out'" --agent --headless --timeout 120 --url https://the-internet.herokuapp.com/login
Expected behavior
After clicking the Logout link on /secure, the browser navigates to /login with flash message "You logged out of the secure area!".
Actual behavior
- Login and navigation to
/secure succeed.
- Playwright reports every Logout click as
success: true via locator internal:role=link[name=\"Logout\"i].
- URL never changes.
page_observer confirms page is complete and Logout button is visible.
focus_info on every click action is null.
- At step 9 the agent self-diagnoses and invokes its own
report_bug tool: "Logout link click does not navigate away from /secure… Action feedback indicates no element focused, suggesting the click may be missing or the link is not responding."
- Agent retries 6+ times via DOM locator, vision coordinates, and
page.reload() — none recover — until the DAG cycle detector forces stuck.
- Run ends:
result_code: 320, reason_code: stuck.dag_cycle, duration 216.9s.
Comparison — headed mode works
Identical objective without --headless:
- Duration: 92.9s
result_code: 100, reason_code: success.complete
- Single Logout click → navigates to
/login → flash "You logged out of the secure area!" extracted → assertions pass.
Flat DOM at stuck-point (step 9 — Logout link is correctly resolved)
{ "role": "link", "name": "Logout",
"locator": "role=link[name='Logout']",
"url": "https://the-internet.herokuapp.com/logout",
"is_enabled": true,
"bounding_box": { "x": 475, "y": 207, "width": 104, "height": 46 } }
Hypothesis
Headless Chromium is not processing the <a> element's default navigation after Playwright's synthetic click resolves. Possible causes:
- Click-vs-navigation race — click returns before Chromium schedules the navigation.
- Missing user-activation gesture gate in headless for anchor navigation.
- Session cookie handling diverging between headed and headless.
Reliably reproducible on this machine across multiple runs.
Logs / artifacts (local)
- Failing session:
~/.testmuai/kaneai/sessions/2026-04-20_19-59-09_e20ba7/runs/0/
run_summary.json (final_status: stuck, 18 steps, DAG cycle)
step_004.json … step_013.json (repeated successful clicks with no navigation)
step_009.json (agent's internal report_bug invocation)
screenshots/step_NNN.png
- Passing headed session (for contrast):
~/.testmuai/kaneai/sessions/2026-04-20_20-08-07_170843/runs/0/
- KaneAI dashboards:
Happy to upload the session tarball if useful.
Environment
@testmuai/kane-cliglobal)What happened
Running a simple login → logout objective with
--headlesscauses the agent to get stuck (reason_code: stuck.dag_cycle). Playwright reportslocator.click()as successful on the Logout<a>element every time, but the browser never navigates from/secureto/logout→/login. The identical objective passes cleanly on the same machine without--headlessin ~93s.Steps to reproduce
kane-cli run "Type 'tomsmith' in the Username field, type 'SuperSecretPassword!' in the Password field, click the Login button, wait for the secure area page to load, click the Logout button, store the flash message text as 'logout_flash', store the current URL as 'final_url', assert the URL contains '/login', assert the flash message contains 'You logged out'" --agent --headless --timeout 120 --url https://the-internet.herokuapp.com/loginExpected behavior
After clicking the Logout link on
/secure, the browser navigates to/loginwith flash message "You logged out of the secure area!".Actual behavior
/securesucceed.success: truevia locatorinternal:role=link[name=\"Logout\"i].page_observerconfirms page is complete and Logout button is visible.focus_infoon every click action isnull.report_bugtool: "Logout link click does not navigate away from /secure… Action feedback indicates no element focused, suggesting the click may be missing or the link is not responding."page.reload()— none recover — until the DAG cycle detector forcesstuck.result_code: 320,reason_code: stuck.dag_cycle, duration 216.9s.Comparison — headed mode works
Identical objective without
--headless:result_code: 100,reason_code: success.complete/login→ flash"You logged out of the secure area!"extracted → assertions pass.Flat DOM at stuck-point (step 9 — Logout link is correctly resolved)
{ "role": "link", "name": "Logout", "locator": "role=link[name='Logout']", "url": "https://the-internet.herokuapp.com/logout", "is_enabled": true, "bounding_box": { "x": 475, "y": 207, "width": 104, "height": 46 } }Hypothesis
Headless Chromium is not processing the
<a>element's default navigation after Playwright's synthetic click resolves. Possible causes:Reliably reproducible on this machine across multiple runs.
Logs / artifacts (local)
~/.testmuai/kaneai/sessions/2026-04-20_19-59-09_e20ba7/runs/0/run_summary.json(final_status: stuck, 18 steps, DAG cycle)step_004.json…step_013.json(repeated successful clicks with no navigation)step_009.json(agent's internalreport_buginvocation)screenshots/step_NNN.png~/.testmuai/kaneai/sessions/2026-04-20_20-08-07_170843/runs/0/Happy to upload the session tarball if useful.