MCPcopy
hub / github.com/claude-code-best/claude-code / readAgentMetadata

Function readAgentMetadata

src/utils/sessionStorage.ts:293–304  ·  view source on GitHub ↗
(
  agentId: AgentId,
)

Source from the content-addressed store, hash-verified

291}
292
293export async function readAgentMetadata(
294 agentId: AgentId,
295): Promise<AgentMetadata | null> {
296 const path = getAgentMetadataPath(agentId)
297 try {
298 const raw = await readFile(path, 'utf-8')
299 return JSON.parse(raw) as AgentMetadata
300 } catch (e) {
301 if (isFsInaccessible(e)) return null
302 throw e
303 }
304}
305
306export type RemoteAgentMetadata = {
307 taskId: string

Callers 1

resumeAgentBackgroundFunction · 0.85

Calls 3

getAgentMetadataPathFunction · 0.85
readFileFunction · 0.85
isFsInaccessibleFunction · 0.85

Tested by

no test coverage detected