1---2name: agents3description: Skill for the Agents area of Wiki. 1919 symbols across 567 files.4---56# Agents781919 symbols | 567 files | Cohesion: 60%910## When to Use1112- Working with code in `AI/`13- Understanding how resolveMessageChannel, applyModelOverrideToSessionEntry, clearInternalHooks work14- Modifying agents-related functionality1516## Key Files1718| File | Symbols |19|------|---------|20| `AI/3-Application/Openclaw-source/src/agents/subagent-registry.ts` | getSubagentRunByChildSessionKey, resolveAnnounceRetryDelayMs, logAnnounceGiveUp, persistSubagentRuns, suppressAnnounceForSteerRestart (+55) |21| `AI/3-Application/Openclaw-source/src/agents/tool-display-common.ts` | stripOuterQuotes, splitShellWords, binaryName, positionalArgs, firstPositional (+29) |22| `AI/3-Application/Openclaw-source/src/agents/subagent-announce.ts` | buildSubagentSystemPrompt, loadSubagentRegistryRuntime, buildCompactAnnounceStatsLine, loadSessionEntryByKey, hasUsableSessionEntry (+26) |23| `AI/3-Application/Openclaw-source/src/agents/bash-tools.test.ts` | readTextContent, readNormalizedTextContent, readTrimmedLines, readBackgroundLogSnapshot, runLongLogExpectationCase (+24) |24| `AI/3-Application/Openclaw-source/src/agents/model-selection.ts` | normalizeAliasKey, modelKey, legacyModelKey, parseModelRef, resolveAllowlistModelKey (+19) |25| `AI/3-Application/Openclaw-source/src/agents/models-config.providers.ts` | normalizeApiKeyConfig, normalizeProviderModels, normalizeGoogleProvider, normalizeAntigravityProvider, normalizeProviders (+17) |26| `AI/3-Application/Openclaw-source/src/agents/model-fallback.ts` | createModelCandidateCollector, addCandidate, addExplicitCandidate, addAllowlistedCandidate, resolveImageFallbackCandidates (+15) |27| `AI/3-Application/Openclaw-source/src/agents/cli-credentials.ts` | resolveClaudeCliCredentialsPath, parseClaudeCliOauthCredential, readClaudeCliKeychainCredentials, readClaudeCliCredentials, readClaudeCliCredentialsCached (+14) |28| `AI/3-Application/Openclaw-source/src/agents/model-auth.ts` | getApiKeyForModel, requireApiKey, hasUsableCustomProviderApiKey, resolveEnvApiKey, resolveModelAuthMode (+13) |29| `AI/3-Application/Openclaw-source/src/agents/subagent-control.ts` | resolveSessionEntryForKey, ensureControllerOwnsRun, killSubagentRun, cascadeKillChildren, killAllControlledSubagentRuns (+12) |3031## Entry Points3233Start here when exploring this area:3435- **`resolveMessageChannel`** (Function) — `AI/3-Application/Openclaw-source/src/utils/message-channel.ts:156`36- **`applyModelOverrideToSessionEntry`** (Function) — `AI/3-Application/Openclaw-source/src/sessions/model-overrides.ts:8`37- **`clearInternalHooks`** (Function) — `AI/3-Application/Openclaw-source/src/hooks/internal-hooks.ts:246`38- **`resolveSessionModelRef`** (Function) — `AI/3-Application/Openclaw-source/src/gateway/session-utils.ts:910`39- **`startGatewaySidecars`** (Function) — `AI/3-Application/Openclaw-source/src/gateway/server-startup.ts:33`4041## Key Symbols4243| Symbol | Type | File | Line |44|--------|------|------|------|45| `OpenAIWebSocketManager` | Class | `AI/3-Application/Openclaw-source/src/agents/openai-ws-connection.ts` | 297 |46| `FailoverError` | Class | `AI/3-Application/Openclaw-source/src/agents/failover-error.ts` | 10 |47| `BaseSingleActionAgent` | Class | `AI/2-AI-infra/LLM-SDK/Langchain-source/libs/langchain/langchain_classic/agents/agent.py` | 54 |48| `Agent` | Class | `AI/2-AI-infra/LLM-SDK/Langchain-source/libs/langchain/langchain_classic/agents/agent.py` | 703 |49| `ReActDocstoreAgent` | Class | `AI/2-AI-infra/LLM-SDK/Langchain-source/libs/langchain/langchain_classic/agents/react/base.py` | 35 |50| `resolveMessageChannel` | Function | `AI/3-Application/Openclaw-source/src/utils/message-channel.ts` | 156 |51| `applyModelOverrideToSessionEntry` | Function | `AI/3-Application/Openclaw-source/src/sessions/model-overrides.ts` | 8 |52| `clearInternalHooks` | Function | `AI/3-Application/Openclaw-source/src/hooks/internal-hooks.ts` | 246 |53| `resolveSessionModelRef` | Function | `AI/3-Application/Openclaw-source/src/gateway/session-utils.ts` | 910 |54| `startGatewaySidecars` | Function | `AI/3-Application/Openclaw-source/src/gateway/server-startup.ts` | 33 |55| `collectConfiguredModelPricingRefs` | Function | `AI/3-Application/Openclaw-source/src/gateway/model-pricing-cache.ts` | 246 |56| `__setGatewayModelPricingForTest` | Function | `AI/3-Application/Openclaw-source/src/gateway/model-pricing-cache.ts` | 461 |57| `resolveAgentModelPrimaryValue` | Function | `AI/3-Application/Openclaw-source/src/config/model-input.ts` | 7 |58| `resolveAgentModelFallbackValues` | Function | `AI/3-Application/Openclaw-source/src/config/model-input.ts` | 19 |59| `toAgentModelListLike` | Function | `AI/3-Application/Openclaw-source/src/config/model-input.ts` | 26 |60| `promptDefaultModel` | Function | `AI/3-Application/Openclaw-source/src/commands/model-picker.ts` | 182 |61| `promptModelAllowlist` | Function | `AI/3-Application/Openclaw-source/src/commands/model-picker.ts` | 424 |62| `modelKey` | Function | `AI/3-Application/Openclaw-source/src/agents/model-selection.ts` | 43 |63| `legacyModelKey` | Function | `AI/3-Application/Openclaw-source/src/agents/model-selection.ts` | 57 |64| `parseModelRef` | Function | `AI/3-Application/Openclaw-source/src/agents/model-selection.ts` | 142 |6566## Execution Flows6768| Flow | Type | Steps |69|------|------|-------|70| `DispatchPreparedSlackMessage → Trim` | cross_community | 6 |71| `DispatchPreparedSlackMessage → StripNullBytes` | cross_community | 6 |72| `DispatchPreparedSlackMessage → NormalizeAvatarValue` | cross_community | 5 |73| `HandlePluginsCommand → Max` | cross_community | 5 |74| `ProcessMessage → NormalizeChatType` | cross_community | 4 |75| `DispatchPreparedSlackMessage → IsAvatarHttpUrl` | cross_community | 4 |76| `DispatchPreparedSlackMessage → IsAvatarDataUrl` | cross_community | 4 |7778## Connected Areas7980| Area | Connections |81|------|-------------|82| Scripts | 380 calls |83| Plugins | 97 calls |84| Auto-reply | 92 calls |85| Ink | 76 calls |86| Infra | 67 calls |87| Reply | 55 calls |88| Gateway | 46 calls |89| Commands | 39 calls |9091## How to Explore92931. `gitnexus_context({name: "resolveMessageChannel"})` — see callers and callees942. `gitnexus_query({query: "agents"})` — find related execution flows953. Read key files listed above for implementation details