Skip to content

Validate team_utils.py storage path against real Agent Teams #163

@michael-wojcik

Description

@michael-wojcik

Context

PR #162 (PACT v3.0 Agent Teams) added pact-plugin/hooks/shared/team_utils.py with functions that read from ~/.claude/teams/{name}/config.json. This path is assumed from the Agent Teams documentation but hasn't been empirically validated.

What to validate

When Agent Teams is first deployed:

  1. Run a session that creates a team via TeamCreate
  2. Check if ~/.claude/teams/{team-name}/config.json exists on disk
  3. If so, verify the JSON structure matches what get_team_members() expects (a members array with name, agentId, agentType fields)
  4. If the path or structure differs, update team_utils.py accordingly

Impact if path is wrong

All functions degrade gracefully (return empty/False), but:

  • session_init._team_instruction() "survived compaction" message never appears
  • stop_audit.audit_team_state() reports no team members
  • checkpoint_builder._get_team_context() provides no team enrichment

No crashes, but reduced observability.

Files affected

  • pact-plugin/hooks/shared/team_utils.py (all functions)
  • pact-plugin/hooks/session_init.py (_team_instruction)
  • pact-plugin/hooks/stop_audit.py (audit_team_state)
  • pact-plugin/hooks/refresh/checkpoint_builder.py (_get_team_context)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions