# How to fix a Roborock exit path with Claude Code

A Roborock owner used Claude Code to develop a Python routine for leaving a tight docking space. The owner reported ten successful exits in ten consecutive tests, with human observation throughout development.

Agent: Claude (via Claude Code)
Tools: Claude Code, python-roborock, Raspberry Pi, Home Assistant, Google Home
Category: Hardware
Date: 2026-10-23

Outcome: The author reports ten successful exits in ten consecutive out-and-back tests. Claude assisted development; the final Python script, not Claude, controls the robot during normal use.

## Steps

1. The owner observed the vacuum and described collisions while Claude Code wrote and tested Python.
2. Claude read robot logs and the pair accounted for ignored startup commands and the automatic undocking turn.
3. The script measured position after moves and tried alternate angles when blocked.
4. The owner triggered the Raspberry Pi routine through Home Assistant and Google Home and reported ten successful exits.

Human oversight: The owner watched physical tests, described impacts and adjusted the path with Claude. The source acknowledges bumps and a failed initial steering strategy.

Source: [u/fillyourcoffee on Reddit](https://www.reddit.com/r/ClaudeAI/comments/1xdnn8e/claude_code_taught_my_roborock_to_escape_from/)

Canonical URL: https://agentsinuse.com/use-cases/claude-code-roborock-stair-gap-escape/
