---
title: "Agent confinement"
description: "An agent runs inside its machine and cannot use MIOSA's own platform key unless an Environment grants it a scoped one."
last_updated: 2026-10-12
url: https://miosa.ai/docs/agents/confinement
---

# Agent confinement

An agent runs inside its machine and stays there.
It cannot use MIOSA's own platform key to reach the rest of the platform.

## The platform key is blanked

Every sandbox boots with a platform key and its ids in the environment, so a plain command can call MIOSA.

Harness runs do not get it.
When MIOSA starts a harness, it blanks the platform key and the ids at launch, and unsets them in the run script.
So Claude Code, Codex, OSA, pi, OpenCode, Prime Agent, Kimi Code, Mistral Vibe, and Hermes Agent cannot borrow MIOSA's key.

## Grant a scoped key with an Environment

When you want an agent to reach MIOSA on purpose, an [Environment](https://miosa.ai/docs/cli/environments.md) can grant it a scoped machine key.
That key is bound to the machine, not to your account.

## What is kept

- A value the run itself supplies is kept.
- Environment grants are not touched.

## Related

- [Isolation and permissions](https://miosa.ai/docs/optimal/isolation.md): what a hosted chat can touch.
- [Runtime environment](https://miosa.ai/docs/guides/runtime-env.md): variables by scope and target.
