# 한도 도달 시 계정 자동 전환

> auto_switch를 켜면 Claude Code 세션이 사용량 한도에 걸렸을 때 ccam이 여유 있는 다른 계정으로 세션을 옮겨 대화를 이어 갑니다.

Source: https://ccam.dev/ko/features/auto-switch/ · Updated 2026-11-29

`auto_switch = true`로 설정하면(Linux와 macOS) Claude Code가 세션을 사용량 한도에서 멈췄을 때 ccam이 알아서 세션을 다른 계정으로 옮기고, 명령을 입력하지 않아도 그 계정에서 대화가 이어집니다. 기본값은 꺼짐이고 실험 기능이며, 켜면 요금제 약관을 어길 수 있습니다([아래](#anthropic-s-terms)). 켜지 않았다면 `ccam next --continue`나 `/ccam:switch`로 직접 전환합니다([한도에 걸렸을 때 이어 가기](https://ccam.dev/ko/features/next.md)).

```console
ccam: personal hit its 5-hour limit; continuing this conversation as side
→ personal → side
  continuing "Fix the flaky tests" (about 182k tokens); prompt caches are not shared between organizations, so the first reply reads it all again; side does not share personal's history, so Claude Code copies it into side
```

**Team·Enterprise 시트.** Team이나 Enterprise 시트에서 `auto_switch`는 작업을 같은 조직의 다른 시트로 옮기며, 이는 Anthropic의 약관 위반일 수 있습니다. 이 기능에 기대기 전에 [FAQ](https://ccam.dev/ko/docs/faq.md#am-i-allowed-to-use-several-claude-code-accounts)를 읽고 소속 조직과 Anthropic에 확인하세요.

## 켜는 방법

1. 모든 계정에서 [ccam 플러그인](https://ccam.dev/ko/docs/install.md#claude-code-plugin)을 켜고, Claude Code 2.1.214 이상을 쓰세요. 이 버전부터 Claude Code가 플러그인 훅에 자기 프로세스 ID(`CLAUDE_PID`)를 넘깁니다.
2. `config.toml` 맨 위, 첫 `[[group]]`, `[[profile]]`, `[[folder]]`보다 앞에 설정을 추가합니다.

   ```toml
   # ~/.config/ccam/config.toml
   auto_switch = true   # Linux and macOS; turns the relay on too
   ```

3. 새 세션을 ccam으로 시작합니다. `ccam <name>`, 단축 명령, 대시보드 모두 됩니다. `auto_switch`를 켜면 [릴레이](https://ccam.dev/ko/features/next.md#relay)도 켜지므로, ccam이 자신을 Claude Code로 바꾸지 않고 대화형 세션마다 옆에서 계속 실행됩니다. 그래서 세션마다 기다리는 ccam 프로세스가 하나씩 생깁니다.
4. `ccam doctor`를 실행합니다. `auto_switch`가 켜져 있으면 ccam 플러그인이 없는 계정과 2.1.214보다 오래된 Claude Code를 경고하고, 시트 계정이 있으면 Anthropic의 시트 규칙을 다시 알려 줍니다([점검 항목](https://ccam.dev/ko/features/doctor.md)).

Windows에서는 이 설정을 무시하며 `ccam doctor`가 그 사실을 알려 줍니다. Windows에서도 `relay = true`라면 `/ccam:switch`와 `/exit`로 대화를 다른 계정으로 옮길 수 있습니다.

## 한도에 걸렸을 때 일어나는 일

1. Claude Code가 사용량 한도에서 턴을 멈춥니다. 플러그인 훅이 여유 있는 다른 계정을 고르고 Claude Code를 끝냅니다.
2. 세션 옆에서 실행 중이던 ccam이, 데스크톱 알림을 지원하는 터미널이라면 `ccam: personal hit its 5-hour limit (resets 3:29am). Moving this conversation to side (12% of its 5 hours used, the least).` 같은 알림을 띄웁니다.
3. ccam이 위 예시의 첫 줄을 출력하고, 그 세션에 대해 고른 계정으로 `ccam next --continue`를 실행합니다. 이 명령이 나머지 두 줄을 출력하고, 릴레이처럼 세션의 옵션, 권한 모드, effort, 에이전트를 그대로 살려 Claude Code를 시작합니다.
4. 새 세션은 정해진 메시지로 시작합니다. 전환이 사용자 대신 보내는 메시지는 이것뿐입니다(`/ccam:switch` 뒤의 전환은 아무것도 보내지 않습니다).

```text
Your usage limit was reached and ccam moved this conversation to another account. Continue the task you were working on when the limit was reached; do not repeat work that is already complete.
```

서브에이전트가 한도에 걸렸을 때는 서브에이전트, 워크플로, 백그라운드 명령이 이전 세션과 함께 멈췄으므로 메시지가 다음으로 바뀝니다.

```text
A subagent hit your usage limit and ccam moved this conversation to another account. The subagents, workflows and background commands that were running then have stopped, and their results may be missing: run again what the task still needs, then continue it; do not repeat work that is already complete.
```

새 계정도 한도에 걸리면 거기서도 똑같은 일이 일어납니다. 한도 기록 덕분에 초기화 전의 계정으로 되돌아가지 않으므로, 모든 계정이 가득 차면 세션은 마지막 계정에 남습니다.

이미 시작된 전환을 멈추려면 Claude Code가 닫히는 동안 Ctrl+C를 누르세요. ``ccam: switch cancelled. Run `ccam next --continue` later to continue the conversation.``

## 세션을 옮기는 조건

ccam은 다음 조건을 모두 만족할 때만 세션을 옮깁니다.

1. ccam이 터미널에서 세션을 시작했고 그 옆에서 계속 실행 중입니다. `auto_switch`를 켠 뒤 시작한 대화형 세션이라면 해당합니다. 그 전에 시작했거나 이전 버전 ccam으로 시작한 세션에는 ``This session started before auto_switch was on or under an older ccam, so ccam cannot move it: type /exit, then run `ccam next --continue`.``로 끝나는 알림이 갑니다. 무인 세션(`-p` 실행과 백그라운드 세션), `claude remote-control`, ccam 없이 시작한 Claude Code는 옮기지 않습니다.
2. 계정에서 ccam 플러그인을 켜 두었고 Claude Code 2.1.214 이상을 씁니다.
3. Claude Code가 거부한 요청을 초기화 시각과 함께 대화에 기록했고, 그 한도가 그 계정의 5시간, 주간, Opus, Sonnet, Fable 한도 중 하나입니다.
   - Fable 모델이 주간 허용량을 다 쓰면 Claude Code는 `You've hit your Fable limit`이나 `You're out of usage credits`라고 말하며, 거부된 요청에 Fable 주간 한도가 적혀 있습니다. 이것이 Fable 한도이며, 다음 계정은 자신의 Fable 주간 한도에 여유가 있어야 합니다.
   - 지출 한도, 다른 요청에서 사용량 크레딧이 바닥난 경우, 조직이 건 중지, 서버 쪽 일시 제한, API 키의 요청 한도로는 세션을 옮기지 않습니다.
   - 서브에이전트나 워크플로 에이전트가 걸린 한도도 해당하며, 메인 대화가 그 에이전트를 기다리기만 하는 중이어도 마찬가지입니다. 그 한도가 Opus, Sonnet, Fable 주간 한도라면, 대화 자체가 그 모델로 실행 중일 때만 세션을 옮깁니다.
4. ccam이 계정의 요금제를 압니다. 계정의 `.claude.json`이나 `ccam login`이 기록한 정보에서 알아냅니다. 모르면 알림이 `ccam does not know personal's plan, so auto_switch leaves this session.`으로 끝납니다.
5. 세션이 Remote Control에 연결되어 있지 않습니다. 다른 계정으로 옮기면 세션을 조작하던 앱에 다시 연결되지 않으므로 그대로 두며, 알림에서 그 사실을 알려 줍니다.
6. 한도가 지금부터 15분보다 뒤에 초기화됩니다. 그보다 짧게 기다리면 되는 경우에는 세션을 Claude Code에 맡깁니다. `ccam: personal hit its 5-hour limit, which resets in 9m; ccam leaves this session to wait for it.`
7. 한도에 걸린 뒤 프롬프트를 입력하지 않았습니다.
8. 여유 있는 다른 계정이 있습니다([아래](#which-account-it-moves-to)).

## 옮겨 갈 계정

ccam은 [`ccam next --auto`](https://ccam.dev/ko/docs/account-selection.md#choosing-by-usage)처럼 `auto_max_usage`, `auto_strategy`, 대화가 쓰는 모델을 따져 고르며, 떠나는 계정과 같은 종류의 계정 중에서만 고릅니다. 같은 Team이나 Enterprise 조직의 다른 시트, 또는 다른 개인 요금제(Pro, Max)입니다. 여기에는 `cross_org`와 `--cross-org`가 적용되지 않습니다. 계정은 또한 Claude Code가 갱신할 수 있는 로그인으로 로그인되어 있고, ccam이 요금제를 알고, 사용량 크레딧이 꺼져 있고, Claude Code에서 이 폴더를 신뢰했어야 하며, 대화가 에이전트로 실행 중이라면 그 에이전트를 공유해야 합니다. 조건 전체는 [계정 선택 방식](https://ccam.dev/ko/docs/account-selection.md#when-auto-switch-chooses)에 있습니다.

[한도 기록](https://ccam.dev/ko/features/usage.md#the-limit-record)이 있는 한도는 가득 찬 것으로 치며, 최근 2분 안에 다른 세션이 옮겨 간 계정은 뒤로 미룹니다.

## 옮기지 않을 때

여유 있는 다른 계정이 없으면 아무것도 옮기지 않습니다. Claude Code가 세션에서 기다리거나 선택지를 보여 주는 등 평소처럼 한도를 처리하고, 알림에서 가장 먼저 풀리는 계정을 알려 줍니다. 예를 들면 `ccam: personal hit its 5-hour limit (resets 3:29am). None of your other personal plans has room now; side frees up first, at 12:30am. Claude Code waits for personal here; /ccam:switch side after 12:30am moves it sooner.`입니다. 시트 계정이라면 `None of your other accounts in Acme has room now`라고 나옵니다.

마지막 계정 조건 때문에 여유 있는 계정이 모두 빠지면 알림이 계정과 이유를 알려 줍니다.

- `side has not trusted this folder yet, so the conversation was not moved there. Open the folder once as side to allow it.`
- `side has room but its usage credits are on, so auto_switch did not move the conversation there; /ccam:switch side moves it.`
- `This conversation runs as agent "reviewer", and side does not share personal's agents, plugins and settings, so auto_switch did not move it there.`

훅은 `agent` 설정이나, Claude Code가 이따금 그리고 세션이 끝날 때 대화에 적는 에이전트 이름 줄을 보고 대화가 에이전트로 실행 중인지 압니다. 아직 세션의 `--agent`에만 에이전트가 적혀 있고 고른 계정이 에이전트를 공유하지 않으면, `ccam next --continue`는 아무것도 시작하지 않고 메모를 남겨 둡니다. 이때 두 번째 데스크톱 알림이 ``ccam: this conversation runs as agent "reviewer", and side does not share personal's agents, plugins and settings, so ccam did not move it there.``라고 알리고, 표준 오류의 오류 메시지가 ``Its note stays: `ccam next --continue` continues it later, and `ccam personal --resume <session id>` continues it as personal after the reset``를 덧붙입니다.

## 옮길 때 드는 비용

- Claude Code가 다시 시작하므로 몇 초가 걸립니다.
- Claude가 시작한 백그라운드 셸, 개발 서버, 에이전트는 이전 세션과 함께 멈춥니다.
- 새 계정은 [`ccam next --continue`](https://ccam.dev/ko/features/next.md#continue)처럼 첫 답에서 대화 전체를 다시 읽으며, ccam이 대화 크기를 알려 줍니다. 전환에는 [`--brief`](https://ccam.dev/ko/features/next.md#brief)를 쓰지 않습니다.

## 하지 않는 일

`auto_switch`는 Claude Code가 한도를 알리기 전에는 절대 전환하지 않고, 백그라운드에서 사용량을 지켜보지 않으며, 로그인을 복사하거나 갱신하거나 넘기지 않습니다.

## Anthropic 약관

Team이나 Enterprise 시트에서 `auto_switch`는 작업을 같은 조직의 다른 시트로 옮깁니다. Anthropic 도움말 센터에는 "Each seat on a Team plan is assigned to one named individual, and only that person may use it"(Team 요금제의 각 시트는 지정된 한 사람에게 배정되며 그 사람만 쓸 수 있다)와 "Users can't route their work through another user's account to use that user's remaining usage"(다른 사용자의 계정으로 작업을 돌려 그 사용자의 남은 사용량을 쓸 수 없다)라고 적혀 있습니다([Team 요금제](https://support.claude.com/en/articles/12004354-purchase-and-manage-seats-on-team-plans#h_b8a7d07129). [Enterprise 요금제](https://support.claude.com/en/articles/13393991-purchase-and-manage-seats-on-enterprise-plans#h_fa6b9cade0)도 같습니다).

개인 요금제(Pro, Max)의 경우, 내 계정끼리 한도에서 자동으로 이어받아도 되는지 Anthropic 약관에 명시된 내용은 없습니다. [소비자 약관](https://www.anthropic.com/legal/consumer-terms)은 Anthropic이 명시적으로 허락하지 않는 한 "through automated or non-human means, whether through a bot, script, or otherwise"(봇, 스크립트 등 자동화되거나 사람이 아닌 수단으로) 서비스에 접근하는 것을 금지하며, 전환은 위의 정해진 메시지 중 하나를 사용자 대신 보냅니다. 2026년 11월 12일부터 시행된 [사용 정책](https://www.anthropic.com/legal/aup)은 금지 사항으로 "Intentionally bypass or interfere with capabilities, restrictions, or guardrails established within our products"(제품에 마련된 기능, 제한, 안전장치를 의도적으로 우회하거나 방해하는 행위)를 들고 있습니다.

ccam은 `auto_switch`가 이 약관을 지킨다고 주장하지 않습니다. 켤지는 사용자가 정할 일이고 위험도 사용자가 집니다. Anthropic은 약관 위반이라고 판단하면 계정이나 Team·Enterprise 조직의 이용을 정지할 수 있습니다.

## 관련 문서

- [한도에 걸렸을 때 이어 가기](https://ccam.dev/ko/features/next.md)
- [계정 선택 방식](https://ccam.dev/ko/docs/account-selection.md)
- [모든 계정 사용량 보기](https://ccam.dev/ko/features/usage.md)
- [점검과 복구](https://ccam.dev/ko/features/doctor.md)
