--- name: omp-local-artifact-path description: Resolve a local:// artifact to a real filesystem path (for scripts/curl) without guessing the session-slug directory. --- `local://.md` artifacts live in a per-cwd, per-session directory whose name you cannot guess. Three invented paths failed before this worked (2026-10-19). Actual layout: ``` ~/.omp/agent/sessions//Z_/local/.md ``` `` is the working directory with `/` replaced by `-`, **keeping the leading dash** — `/home/blank/.omp/wt/wt-20261019-125509-7c8a99d` under `/home/blank` becomes `-.omp-wt-wt-20261019-125509-7c8a99d`. Dropping the leading `-.` is the mistake that produces `FileNotFoundError`. ## Get the real filesystem path Ask the tool, don't reconstruct it — a ranged read of the artifact reports the resolved path in its header: ``` read local://pr-body-msgend.md:1-1 -> [~/.omp/agent/sessions/-.../local/pr-body-msgend.md#TAG] ``` Or locate it by basename (needs enough depth; `maxdepth 5` misses it — the file sits 6–7 levels down): ```bash f=$(find ~/.omp/agent/sessions -maxdepth 7 -name 'pr-body-msgend.md' | head -1) cp "$f" /tmp/prbody.md # stable path for the python/curl step ``` Copy to `/tmp` before handing the content to a script: one cheap command, and every later tool call stops depending on session-scoped paths. ## Related lookups in the same directory tree - Session id for the current cwd — `~/.omp/agent/history.db` (prompts table has `session_id`, `cwd`; the column is `prompt`, **not** `text`, and raw `?q=` queries cannot be combined with a table selector or pagination): ``` read history.db?q=SELECT session_id, cwd, substr(prompt,1,50) AS p FROM history WHERE cwd LIKE '%wt-20261019%' ORDER BY rowid DESC LIMIT 3 ``` Use the real id in issue/PR attribution footers; never reuse an id remembered from a compacted transcript. - Transcript dir for the same session sits beside `local/`.