MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getAgentId

Function getAgentId

src/utils/teammate.ts:88–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86 * Priority: AsyncLocalStorage (in-process) > dynamicTeamContext (tmux via CLI args).
87 */
88export function getAgentId(): string | undefined {
89 const inProcessCtx = getTeammateContext()
90 if (inProcessCtx) return inProcessCtx.agentId
91 return dynamicTeamContext?.agentId
92}
93
94/**
95 * Returns the agent name if this session is running as a teammate in a swarm.

Callers 11

handleShutdownApprovalFunction · 0.85
getTeamContextAttachmentFunction · 0.85
isTeamLeadFunction · 0.85
registerSessionFunction · 0.85
getCurrentAgentInfoFunction · 0.85
createPermissionRequestFunction · 0.85
isTeamLeaderFunction · 0.85
isSwarmWorkerFunction · 0.85
getAgentIdentificationFunction · 0.85

Calls 1

getTeammateContextFunction · 0.85

Tested by

no test coverage detected