엣지 케이스
기준일: 2026-07-13 난이도: 고급 공식 기준: CLI reference, Config, Logs, Backup
여기서는 임의 retry 코드나 문서에 없는 설정 키를 만들지 않고, 공식 CLI가 명시한 운영 경계만 다룹니다.
핵심 개념
--profile <name>은 state와 config를 별도 디렉터리로 격리합니다.- 원격 Gateway에
--url을 직접 주면 저장된 credential이 자동 적용되지 않을 수 있습니다. OPENCLAW_NIX_MODE=1에서는 config가 immutable이며 writer가 거부됩니다.- config가 유효하지 않아도 schema와 file path는 확인할 수 있습니다.
- session 목록은 채널 연결 상태를 증명하지 않습니다.
선택 기준
| 상황 | 안전한 기준 |
|---|---|
| 여러 Gateway 운영 | profile별 state, config, port 격리 |
| 원격 로그 확인 | --url과 필요한 --token을 명시 |
| Nix 설치 | Nix source에서 설정 변경 |
| config validation 실패 | schema 확인 후 guided configure 또는 doctor |
| 채널 online 여부 | channels status --probe |
실습
1. 여러 profile 분리
openclaw --profile work config file
openclaw --profile work gateway status
openclaw --profile personal config file
openclaw --profile personal gateway status
두 profile의 config path와 Gateway target이 실제로 다른지 확인합니다. 한 시스템에서 여러 Gateway가 무조건 불가능하다고 가정하지 않습니다.
2. 원격 Gateway 로그
openclaw logs \
--url ws://127.0.0.1:18789 \
--token "$OPENCLAW_GATEWAY_TOKEN" \
--limit 200 \
--plain
명시적 --url target은 implicit local fallback과 동작이 다릅니다. --follow도 stale file을 live stream처럼 보여주지 않도록 fallback이 제한됩니다.
3. Nix immutable config
OPENCLAW_NIX_MODE=1 openclaw config file
OPENCLAW_NIX_MODE=1 openclaw config validate
config set이 실패해도 우회하지 않습니다. first-party Nix distribution에서는 programs.openclaw.config 또는 instance config source를 수정합니다.
4. 손상된 config와 backup
openclaw config file
openclaw config schema > openclaw.schema.json
openclaw config validate --json
openclaw backup create --verify
workspace 문제 때문에 backup이 막히는 특수 상황은 Backup 공식 문서의 제외 옵션과 포함 범위를 확인한 뒤 처리합니다. 검증되지 않은 archive를 복구점으로 간주하지 않습니다.
5. session과 channel 상태 분리
openclaw sessions
openclaw channels status --probe
session이 존재해도 channel transport가 끊겨 있을 수 있고, channel이 online이어도 과거 session이 정리 대상일 수 있습니다.
도구에 입력할 프롬프트
OpenClaw의 profile, config path, Gateway target을 비교해줘.
각 명령 결과가 어느 profile에서 나온 것인지 표기하고,
원격 credential과 Nix immutable config 경계를 지켜줘.
공식 schema에 없는 설정 키나 자체 retry 코드는 제안하지 마.
체크리스트
- 모든 출력에 profile과 config path를 함께 기록했다.
- 원격 target의 인증을 명시적으로 확인했다.
- Nix config writer 제한을 우회하지 않았다.
- session과 channel liveness를 혼동하지 않았다.
- backup archive를 검증했다.
다음 단계
- Configuration에서 schema와 SecretRef를 봅니다.
- Gateway 운영에서 service와 remote target을 분리합니다.