{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "hsandhu-mobilecode--let-agent-fix-failing-mobile-build",
 "repo": "hsandhu/mobilecode",
 "repo_url": "https://github.com/hsandhu/mobilecode",
 "repo_slug": "hsandhu-mobilecode",
 "title": "Let an agent fix a failing mobile build on its own",
 "page_title": "How to let an agent fix a failing mobile build on its own with Mobilecode",
 "summary": "The device_run tool builds, launches, reads the error, and retries the fix.",
 "who": "A developer whose native iOS or Android build keeps failing and who wants the agent to read the compiler or Gradle output and correct the code without copied logs.",
 "problem": "Copying build errors and logs back into a chat is slow, and the fix cycle repeats each time the build breaks.",
 "outcome": "The agent runs the app, reads the first build error and log tail, edits the code, and reruns until the app launches or it reports the blocker.",
 "steps": [
  "Run `curl -fsSL https://raw.githubusercontent.com/hsandhu/mobilecode/main/install | bash` to install MobileCode.",
  "Open the mobile project as a session. The device pane opens by itself when you open the session.",
  "Ask the agent to build and launch the app for the platform that fails, so it calls the device_run tool.",
  "Let the agent read the build error and log tail returned by device_run, edit the code, and run again.",
  "Watch the status move through Building, Installing, Launching and Running, and open the full build log from the device pane if needed."
 ],
 "agent_prompt": "In the MobileCode repo at https://github.com/hsandhu/mobilecode, use the device_run tool to build and launch the <platform> app in the project at <project-path>. Read the build error and log tail on failure, fix the code, and rerun. Report the final status and the changed files. Verify that the last run reached Running before stating the build is fixed.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour 30 minutes",
 "basis": "readme",
 "caveat": "The agent can only fix what the build log shows, so a failure caused by missing SDKs, certificates, or a JDK version still needs you to install the requirement.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "macOS with Xcode for iOS previews",
  "Node 20 or newer (serve-sim needs it)",
  "Android SDK platform-tools with at least one AVD for Android previews",
  "A JDK that your project's Gradle version supports",
  "Bun, for the install from source path"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/hsandhu-mobilecode/let-agent-fix-failing-mobile-build/",
 "md": "https://dedupedai.com/use-cases/hsandhu-mobilecode/let-agent-fix-failing-mobile-build/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/hsandhu-mobilecode--let-agent-fix-failing-mobile-build.json",
 "api_version": "v1"
}
