Skip to content

Emit prov.repository / prov.cwd on AgentWeave spans #181

@arniesaha

Description

@arniesaha

Ask

Add two attributes to AgentWeave proxy spans:

  • `prov.cwd` — the working directory the agent was invoked from (e.g., `/home/Arnab/dev/nexus`)
  • `prov.repository` (optional) — the closest enclosing git repo's name, derived by walking up to find `.git`

Why

Without these, queries like "what repo was I working on last week" can't be answered from AgentWeave alone. Today this only works via Nexus's `lakehouse.agent_events.raw_data.cwd` — which the native OpenClaw / Claude Code JSONL shippers populate, but AgentWeave doesn't.

The data crosses the proxy. The agent's invocation environment IS visible to the bridge plugins. Plumbing it through to a span attribute is a small change.

Concrete examples (from `agent_events.raw_data.cwd`)

These are the distinct working directories Nix has executed in over 54 days, observed in Nexus:

  • `/home/Arnab/dev/nexus`
  • `/home/Arnab/dev/agentweave`
  • `/home/Arnab/dev/agentweave/plugins/openclaw-agentweave-bridge`
  • `/home/Arnab/dev/agentweave/sdk/python`
  • `/home/Arnab/clawd/projects/mux`
  • `/home/Arnab/clawd/projects/ctx-ignore`
  • `/home/Arnab/Dev/portfolio-23`

If `prov.cwd` were emitted, all of these would be queryable from Tempo / the Nexus lakehouse spans table.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions