Skip to content

obs: squads obs sync fails to find JSONL when run outside hq root (worktree / subdir) #652

@agents-squads

Description

@agents-squads

Problem

squads obs sync --dry-run reports "No JSONL records to sync" even though executions.jsonl has 57 records.

Root cause: The CLI resolves the JSONL path relative to the current working directory. When invoked from a git worktree (e.g., .worktrees/data-data-lead-xxx/) or any directory other than the hq root, it cannot find .agents/observability/executions.jsonl.

The file actually lives at: hq/.agents/observability/executions.jsonl

Verification:

  • Run from worktree: squads obs sync --dry-run → "No JSONL records to sync"
  • File exists with 57 records at hq path
  • squads tier shows "Observability: 0 executions logged"

Impact

  • Tier 2 goal (backfilling Postgres) is blocked — sync always shows 0 records
  • squads obs history returns empty from any non-hq directory
  • Postgres agent_executions table stays at 0 rows despite 57 JSONL records existing

Expected Behavior

squads obs sync should resolve the JSONL path relative to the hq root (the git root that contains .agents/), not the current working directory. It should work identically whether invoked from hq, a worktree, or any subdirectory.

source:data

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions