- Home
- Skills
- Testing & Debugging
- python agent shell diagnose
Works with the AI Agents you already use
python agent shell diagnose
Use when choosing a desktop shell for a Python agent or CLI, or when a Python desktop window opens, loads, and then stops responding.
Free
python agent shell diagnose
Example session with this skill installed
My Python agent's desktop window opens and the page loads, but the UI goes dead after a couple of clicks. There is no Python exception and no JS error in devtools. Windows 11, Hyper-V enabled, hybrid graphics, Edge WebView2, talking to a local Python backend over 127.0.0.1. I have already rewritten the frontend event handlers twice. What should I check before I keep changing code?
- Read your context and instructions
- Compiled the python agent shell
Summary
Your symptom matches a measured WebView2 failure: the Chromium browser process crashed on the GPU/driver path. The Python process kept running, so nothing raised an error and it looked like a UI hang. The local HTTP hop is not implicated — stop rewriting frontend event handlers.
Match the log first
Grep the host log for this exact string, verbatim:
The instance of CoreWebView2 is no longer valid because the browser process crashed
If it is present, the renderer host object is invalid. No amount of event-handler rewriting brings it back.
Reproduce it by hand
- On Windows 11 with Hyper-V enabled and hybrid graphics, open the WebView2 window.
- Click any control that calls back into Python.
- Observe: no Python exception, no JS exception, no further events.
- Retry with
--no-sandbox. It survives a few more interactions, then dies the same way.
Root cause
WebView2 runs a separate Chromium browser process on the GPU/driver path. When it dies, the host object becomes invalid while Python keeps running — hence "hang", not "crash".
Where to look next
| Check | Expected | If it fails |
|---|---|---|
host log for CoreWebView2 is no longer valid | absent | renderer died — this failure |
GET / on 127.0.0.1 | 200 | listener / static page problem |
GET /api/ping with token | 200 | auth or handler problem |
Three hops — window to local HTTP, server to Python, backend to model — all collapse into "no response" when one breaks. Probe per hop before touching UI code.
Direction of the fix
Move to a shell that bundles its own Chromium and can fall back to software rendering. Keep the 127.0.0.1 hop; it is not the problem.
Boundary
You cannot confirm the fix from a log alone. Someone must open the window, click, close it, and confirm the whole Python child tree exits. That check needs a human at the machine.
Next steps
For a runnable skeleton and a script that verifies the loopback chain before you touch UI code, see the companion skill python-agent-desktop-shell.
Connects securely to your tools. The creator never sees your data.
About this skill
Use when choosing a desktop shell for a Python agent or CLI, or when a Python desktop window opens, loads, and then stops responding. Gives your agent a decision tree for Electron vs system WebView2 vs pywebview, the four invariants of a safe local HTTP hop, and three worked failures with exact error text and manual reproductions. Buyer gets a diagnosis and a concrete recommendation they can act on, not generated code. Saves the hours usually lost to debugging a silent window. For a runnable skeleton and a CI-ready verification script, see the paid companion skill python-agent-desktop-shell.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.
Diagnosis only: it does not generate a project, write files, run shell commands, or open network connections. It cannot verify a live window or confirm that closing it ends the whole Python child tree — that needs a human at the machine. Out of scope: multi-window apps, native menus and trays, editor extensions, web apps served to other machines, and ACP approval-direction problems. When no logged symptom matches, it will not guess; it tells you to add one deterministic probe per hop and report which one fails first.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 6 days ago
- Free with an Agensi account
- Software
Python
Node.js
No installation or extra runtime. Text-only diagnostic: it reads only its own bundled Markdown references through Agensi, and needs no access to your files, shell, network or environment variables.