# Run a Managed Agent in an Automation

> Give the Type.com managed agent instructions, skills, a model, and connected accounts for each run. It is the same Claude or Codex agent as in threads.

Canonical page: https://docs.type.com/automations/managed-agent/

Each managed agent automation comes with a **managed agent**. It is the same Claude or Codex agent that works in the Space's threads. An instruction automation starts it on each run, with your instructions. In a code automation, an agent stage starts it for one step of the graph. See [Agent Stages](https://docs.type.com/automations/agent-handoff/index.md).

A new event-triggered automation that you make in Type is a small graph: an agent stage follows your saved instructions, and a code stage records its result. The settings and guidance on this page also apply to that agent stage.

## What the managed agent can use

| Part | What it gives the run |
| --- | --- |
| Instructions | The job for this automation, in plain words. |
| [Skills](https://docs.type.com/automations/skills/index.md) | Reusable workflows, scripts, and reference files from the Space. |
| Connections | The Space's connected apps, APIs, and data. |
| Memory | Useful context from earlier work in the Space. |
| [Sandbox](https://docs.type.com/automations/sandbox/index.md) | A Linux machine to run commands, scripts, and code. |
| Model | Claude or Codex, with the model and reasoning settings that you choose. |

Each run makes a thread. The thread goes to the Space's **Threads** area or to a named [channel](https://docs.type.com/spaces/channels/index.md), as set in **Destination channel**. Open the thread to see the managed agent's messages and tool calls.

## Write good instructions

Good instructions say:

- which sources the managed agent must check,
- what output the managed agent must make,
- who must review or receive the result.

Keep the instructions narrow. The instructions describe this one job. Put reusable workflow details in a [skill](https://docs.type.com/automations/skills/index.md), so many automations can use them.

> **Caution:** Event content comes from outside people. Tell the managed agent to treat event text as evidence, not as instructions.

## Choose the model, reasoning, and speed

An automation that runs the managed agent has a **Model** row that sets how each run executes. In Claude and Codex Spaces you can choose:

- **Agent default (*model*)**, which keeps following the agent's model.
- A specific model.
- **Reasoning**, when the selected model supports it.
- **Speed**: **Fast** or **Standard**, when the selected model supports Fast. Only the automation's creator can turn on Fast, and runs use Fast only with a supported personal subscription. Selecting Type credits turns Fast off.

## Run using

In **Workflow and settings**, choose **Type credits** or **My Claude subscription** / **My Codex subscription** under **Run using**. The subscription option follows the selected model. If it isn't connected, selecting it opens the same connection dialog as personal settings, without leaving the automation. The choice changes only after connection succeeds and the subscription supports the model. Save to apply the choice to future runs.

Only the automation owner can view or change these settings. **Type credits** bypasses personal model subscriptions. An explicitly selected subscription that is missing, expired, or does not include the model needs attention before runs can proceed; it does not silently switch to credits.

When a subscription is selected and automatic recovery is enabled for the workspace, **Use Type credits if the subscription limit is reached** controls quota fallback. It defaults to on. A run can retry on Type credits if the provider reports a usage limit before the run makes progress. Turn it off to prevent quota fallback from using Type credits. This does not retry completed work or bypass other provider errors.

## Who the run acts as

Scheduled runs and agent stages act as the **automation creator**, with the creator's identity and model billing. A private test acts as the member who starts it, with that member's model billing.

- Without a chosen account, the automation's tools use the default connections of the person the run acts as. For GitHub, that's the connection's Team account, such as the type.com GitHub App, when there is one, and otherwise that person's personal GitHub account.
- In automations, GitHub commands need Full access to the GitHub connection in the Space.

## Choose a connected account

In Claude and Codex Spaces, editors choose accounts under **Runs as**. In instruction automations, it's in the **Execution** section. In code automations, it's in the **Settings** section.

1. Select **Change account** on an app. The menu checks access in every Space the automation posts to. In an instruction automation, you can also add an app with **Choose another account** (**Choose an account** if none are listed yet), which lists only accounts you can use.
2. If an account shows **Allow in *Space* and use**, choosing it also gives the connection access to that Space when you save. See [Connections in automations](https://docs.type.com/connectors-and-skills/space-connections/index.md#connections-in-automations).
3. Save the automation.

Editors can choose Team accounts that the automation's creator can use in its Spaces, and the editor also needs access to every Space the automation posts to. Only the creator can choose their own personal account. Choosing an account does not change who the run acts as or who pays for it.

How account choices work:

- A choice applies to one connection.
- To remove a choice, open the app's **Change account** menu, select **Remove from this automation**, and save. For an account that needs attention, use **Fix** instead. An eligible run that next uses the app can save an account again, which can be the same one. To switch for good, choose a different account instead. Removing a choice does not disconnect the account.

In Claude and Codex Spaces, a run can also save the account it actually uses:

- A private test by another member can save a shared **Team connection**. That member must have access in the test Space, and the creator must have access in every Space the automation posts to. If either check fails, the call fails.
- Only the creator can save a personal account on use, and it must belong to the creator.
- Existing choices stay as they are.
- Website logins follow the same rule: Type.com can attach an eligible saved login when it first signs in. Listing logins does not attach them. The login needs Full access in every destination Space; personal logins must belong to the creator.
- All automations use the cloud computer when browser or desktop work is needed. You can create an automation from Electron and choose a saved login there, but its local browser session does not transfer to scheduled runs.
- Managed `gh` requests, Git authentication, and repository sync save only the GitHub account used. Listing available connections, starting the sandbox, and running local commands such as `gh --version` do not save accounts. `gh auth status` signs in, so it can save the account.
- GitHub credential variables can hold references instead of raw tokens. Use the managed `gh` command or Git credential helper; passing those references directly to `curl` or a custom SDK is unsupported.

### Choose browser sign-ins

All automation browser work runs on the **cloud computer**, including automations you create in Electron. Under **Runs as** in the automation's settings, choose a named saved login or a specific login from a connected password vault. The selected login's name appears in the settings. Use its **Change account** menu to select another login or **Remove from this automation**. Browser sign-in changes save immediately.

If you let the agent choose, Type can attach an eligible saved login when the automation first uses it to sign in. Listing saved logins does not attach anything, and first use never silently replaces an existing choice. Saved credentials follow the account permissions described above. Saved logins do not need a separate sign-in approval; website verification such as MFA can still require your help.

To reuse your saved website sessions without choosing individual sites, turn on **Use my browser profile**. Only the automation's creator can enable their profile. This gives the automation an isolated cloud copy of the creator's saved cookies and website storage, including localStorage and IndexedDB. You do not need to select cookies or domains. The profile is restored when the automation's cloud computer starts; a named saved login can still switch a website to its selected account.

The automation keeps its own copy across runs. Its changes and sign-outs do not change your personal profile. Turn the toggle off to remove access. After importing or refreshing your personal profile in **Browser settings**, choose **Refresh browser profile** to start with a fresh copy, then test the automation. Signing in through **This Mac** in Electron alone does not update the saved cloud profile.

Older automations may still have selected website sessions. They keep access only to those sites until the creator explicitly enables the browser profile. Removing those sessions does not enable the full profile.

Each named login shows its most recent check:

| Status | Meaning |
| --- | --- |
| Not checked yet | The automation has not checked this source since it was selected. |
| Signed in on last check | The last check found a signed-in session. It can still expire later. |
| Sign-in needed | The website needs sign-in or verification; the row explains what to do. |
| Unavailable | The source, its access, or the computer needs attention. |

For saved credentials, **Update saved login** opens the existing login or password-vault settings. Use **Browser settings** to manage your saved profile. Neither action enables a paused automation automatically. After replacing a login or refreshing the profile copy, start a **new test run**: the earlier run keeps its sign-in failure and cannot be repaired by continuing its old handoff. A restored profile does not prove that every website is still signed in.

### Complete website verification

When a website needs verification or Type cannot confirm sign-in, the run asks for help and opens its **Computer** panel. The panel stays on the computer used by that run. Finish the website's steps there, then choose:

- **Continue** to check the current page without entering the saved password again.
- **Retry saved login**, when offered, to start one new attempt with that exact login under its existing access permissions.
- **Restore saved session**, for cookie sources, to restore the attached session again without entering a password.
- **Stop browser work** to leave the page open and stop the task.

A confirmation or verification page after password entry is an expected pending sign-in, not a failed password submission. The pending attempt survives a reconnect or continuation. An uncertain response does not cause an automatic second submission. If the source or computer changes, Type checks the new situation before asking for another attempt.

Confirm that the page shows the intended account. Websites sharing the same cookies have one active account session on a computer; separate saved logins do not create simultaneous isolated browser contexts. Type marks a run with an unresolved sign-in failure as unsuccessful. Test the repaired automation before enabling it again.

### Fix an unavailable account

To fix an account that needs attention, select **Fix** on it. You need edit access to the automation. **Sign in again** and **Remove from this automation** appear only for an account saved on the automation.

- **Sign in again** renews the same account. A personal account needs its owner. A Team account needs a connection manager or a workspace owner or admin. Either way, that person needs access to every Space the automation posts to.
- **Use *account*** replaces it, and updates the automation's trigger and action references together. If the connection runs one of the automation's webhooks, you can't switch to another account on that same connection. Sign in again, or choose an account on a different connection.
- **Connect another *App* account…** starts a new sign-in. When it finishes, choose the new account from **Fix** with **Use *account***.
- **Remove from this automation** clears the choice.

In the desktop app, and for apps that don't sign in through a pop-up window, **Sign in again** and **Connect another** open **Connections** instead. After you connect another account, return to the automation and choose it with **Use *account***.

When you fix it from the automation, you see **Connection fixed**. A paused automation stays paused: "Connection fixed. Enable the automation to resume." When you restore it in **Connections**, you see "Automation connection restored", or "Connection restored. Automation is still paused."

If several accounts need fixing, a row you've replaced or removed shows what will happen once every row is fixed. **Sign in again** saves its row right away. Type.com saves replacements and removals together once every row is fixed.

If the automation's event sources can't restart after you sign in again, you see "Signed in, but the automation's event sources could not restart. Try again." In **Connections**, you see "The account was saved, but its event sources could not restart. Try again."

Updating the credentials of a connected account, by signing in again or replacing its API key, keeps every automation that uses it running. Each automation's history records who updated them.

Disconnecting an account clears its credentials. If the account is saved on an automation that isn't archived, Type.com keeps the account identity, so you can repair it with **Fix → Sign in again**. Opening or cancelling sign-in does not repair the automation.

### Choose accounts in the CLI

Use repeatable `--act-as` flags on `scheduled-actions create` and `scheduled-actions update`:

```sh
type-cli integrations connections --json
type-cli scheduled-actions update <task-id> --space engineering \
  --act-as orgint_123=intacct_456 --act-as orgint_789=intacct_012
```

- Before `=`, use the connection's `id` from `integrations connections`.
- After `=`, use `organization.integrationAccountId` for a shared account, or `personal.userIntegrationId` for your personal account.
- Provider names, display names, and `team` or `personal` aliases do not work.
- An update keeps the account choices that you do not name.
- `--act-as orgint_123=inherit` clears the choice for that one connection. An eligible run can then save an account again on its next use.
- `scheduled-actions` list, get, create, and update results include the saved identities.

## When a run fails

A scheduled instruction automation pauses when:

- its last three runs failed,
- its last three runs were each blocked by the same unavailable connection, or
- one run fails in a way that a person must fix, such as an account that needs reconnecting.

Type.com then posts a notice for the automation's creator. Fix the cause, then select **Enable**. A code automation, including its agent stages, follows the rules in [Runtime and Guarantees](https://docs.type.com/automations/reference/runtime/index.md#failures).

## Next steps

- [Use skills](https://docs.type.com/automations/skills/index.md) to keep reusable workflows out of your instructions.
- [Agent stages](https://docs.type.com/automations/agent-handoff/index.md) give one step of a code automation to the managed agent.
- [Test an automation](https://docs.type.com/automations/testing/index.md) before you enable it.
