What
`granola/agent.ts` reads the note's VFS path from the expanded payload instead of the runtime envelope's authoritative `event.resource.path`.
- Line 23 calls `readNotePath((await event.expand('full')).data)`.
- `readNotePath` (lines 65-69) reads `payload.path ?? payload.relayfilePath ?? payload.data?.path` — a best-effort guess at the payload's shape.
Evidence
The runtime already populates the authoritative path on every event before any expansion happens: `workforce/packages/runtime/src/to-agent-event.ts:128-129` sets `resource.path` from `env.paths[0]`, and `EventResource` (`workforce/packages/runtime/src/types.ts:108`) exposes it as `event.resource.path`. `to-agent-event.test.ts:55` asserts `ev.resource.path` directly — no expansion required.
Impact
Handlers relying on `payload.path` can receive `undefined` or a stale path whenever the expanded payload doesn't happen to carry a top-level `path`/`relayfilePath`/`data.path` field, since that shape isn't guaranteed by the envelope contract.
Expected
Read the note path from `event.resource.path` directly instead of expanding the payload and guessing its shape.
What
`granola/agent.ts` reads the note's VFS path from the expanded payload instead of the runtime envelope's authoritative `event.resource.path`.
Evidence
The runtime already populates the authoritative path on every event before any expansion happens: `workforce/packages/runtime/src/to-agent-event.ts:128-129` sets `resource.path` from `env.paths[0]`, and `EventResource` (`workforce/packages/runtime/src/types.ts:108`) exposes it as `event.resource.path`. `to-agent-event.test.ts:55` asserts `ev.resource.path` directly — no expansion required.
Impact
Handlers relying on `payload.path` can receive `undefined` or a stale path whenever the expanded payload doesn't happen to carry a top-level `path`/`relayfilePath`/`data.path` field, since that shape isn't guaranteed by the envelope contract.
Expected
Read the note path from `event.resource.path` directly instead of expanding the payload and guessing its shape.