# What's the cache key for the Cloud Agent install/update script?

**URL:** <https://forum.cursor.com/t/whats-the-cache-key-for-the-cloud-agent-install-update-script/164480>\
**Category:** Help\
**Tags:** cloud-agents\
**Created:** [June 30, 2026, 11:42pm UTC](https://forum.cursor.com/t/whats-the-cache-key-for-the-cloud-agent-install-update-script/164480 "2026-06-30T23:42:26Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mohitjain](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mohitjain/32/100229_2.png) [@mohitjain](https://forum.cursor.com/u/mohitjain)\
**Post date:** [July 1, 2026, 8:00am UTC](https://forum.cursor.com/t/whats-the-cache-key-for-the-cloud-agent-install-update-script/164480/6 "2026-07-01T08:00:30Z")

</div>

Hey there!

The cache isn’t keyed to the base branch, and there’s no “different branch means install re-runs” guarantee.

An environment/snapshot is scoped to the repo (plus your account/team or saved environment) and the Dockerfile contents, not the branch. So a snapshot built on one branch can be reused for an agent started from another branch of the same repo. The install (update) command re-runs when new code is pulled, not when the branch changes, so if a cached snapshot is reused and nothing new needs pulling, it can be skipped (which matches what you’re seeing).

Because it isn’t branch-scoped, manual tweaks during install/start can carry into an agent on a different branch. Two tips:

Put any branch/commit-conditional setup in the install script and keep it idempotent. It runs against the checked-out code, so it adapts per branch; manual changes won’t.

To force a clean rebuild, delete and recreate the saved environment:[walkthrough here.](https://forum.cursor.com/t/how-to-force-the-cloud-agent-environment-to-rebuild-from-scratch-when-using-a-dockerfile/160500)

---

_[View the full topic](https://forum.cursor.com/t/whats-the-cache-key-for-the-cloud-agent-install-update-script/164480)._
