> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pnbr.io/llms.txt
> Use this file to discover all available pages before exploring further.

# The owner approved an extraction and you cannot follow it

> A held extraction start has no run id and no workspace until the owner approves it, and the handle is what leads you to both.

Troubleshooting · extraction

> **Use when**
>
> A key or a connected agent started an extraction, the owner approved it, and you have no workspace name or run id to follow.

> **Looking for something else?**
>
> A start that still waits for the owner (problem [A change returned pending](https://docs.pnbr.io/troubleshooting/change-waits-for-approval.md)). A reply that was lost (problem [The reply to a change was lost](https://docs.pnbr.io/troubleshooting/reply-lost.md)). A run that is working but slow (card rule extraction.10).

## Signs

* A start returned `outcome: pending` with exit code 4. It printed a handle and
  an approval address, and it printed no `extraction:` line.
* The person says the owner approved it, and `penumbra graph extractions` has
  no workspace name and no run id to use.
* `penumbra operations wait <handle>` prints `outcome: pending (approved)` or
  `outcome: pending (running)`.
* `penumbra operations wait <handle>` prints a reason such as `denied` or
  `expired` and no run.

## Why it happens

A held start does nothing until the owner approves it. Until then no run exists,
and no workspace exists, because a run opens its own workspace when Penumbra
admits it (card rule [extraction.15](https://docs.pnbr.io/concepts/extraction.md#rule-extraction-15)). The pending answer holds a handle for the
held request and nothing else. After the approval, Penumbra runs the request
once. It stores the answer under the handle, and only the key or connection that
asked can read it.

## What Penumbra does

By itself:

* Holds the start, and creates no run and no workspace, until the owner approves it.
* Runs an approved start once.
* Stores the answer of the approved start under the handle, and gives it only to the key or connection that asked.
* Prints `extraction: <run-id>` and the command that follows the run, when you wait on the handle of an approved start.
* Keeps printing `outcome: pending` with exit code 4 while the request is approved or running.
* Prints the reason, such as `denied` or `expired`, when the request did not run.
* Answers `unknown` when the approved start ended with a server error, a timeout or a lost reply, and does not run it again.

You must:

* Keep the handle and the request id from the pending answer.
* Wait on the handle with the key or connection that asked.
* Use the workspace name and the run id exactly as `wait` prints them.

Not handled:

* The pending answer names no workspace and no run id, because neither exists yet.

## Do

1. Find the handle in the pending answer. It is on the `handle:` line, and the
   last line, `next: penumbra operations wait <handle>`, repeats it.
2. Run `penumbra operations wait <handle>` with the credential that started the
   run. If it ends with exit code 4 and `outcome: pending`, run it again. The
   owner has not decided, or the run is not admitted yet.
3. When it prints `outcome: applied` or `outcome: queued` and
   `extraction: <run-id>`, run the `next:` command that it prints. That command
   is `penumbra graph extractions "<workspace>" --run <run-id> --watch`.
4. If it prints `denied`, `expired` or another reason, the start did not run and
   nothing was charged. Tell the person. A new start is a new request, and it
   waits for its own approval (problem [change-waits-for-approval](https://docs.pnbr.io/troubleshooting/change-waits-for-approval.md)).
5. If it prints `outcome: unknown`, read the state before you ask again (card
   rule [approval.8](https://docs.pnbr.io/concepts/approval.md#rule-approval-8), problem [reply-lost](https://docs.pnbr.io/troubleshooting/reply-lost.md)). Run `penumbra graph workspace list`
   and look for a new workspace named after the first File and the Shape. Then
   run `penumbra graph extractions "<workspace>"` to list its runs.
6. If `wait` prints `outcome: refused` and the message names `target_changed`, a
   File or the collection changed after you asked (card rule [approval.6](https://docs.pnbr.io/concepts/approval.md#rule-approval-6)).
   Plan again, and start again.

## Don't

* Don't start the extraction again with a new request id while the first
  request waits or ran. That makes a second request that waits for its own
  approval.
* Don't build a run id or guess a workspace name (card rule [extraction.10](https://docs.pnbr.io/concepts/extraction.md#rule-extraction-10)).
* Don't read the handle with another credential. Only the key or connection that
  asked can read it.

## Check

* `penumbra graph extractions "<workspace>" --run <run-id>` shows the status of
  the run.
* You told the person the workspace name and what the run costs.

## Related

Card [approval](https://docs.pnbr.io/concepts/approval.md), with rules [approval.4](https://docs.pnbr.io/concepts/approval.md#rule-approval-4), [approval.6](https://docs.pnbr.io/concepts/approval.md#rule-approval-6) and [approval.8](https://docs.pnbr.io/concepts/approval.md#rule-approval-8). Card
[extraction](https://docs.pnbr.io/concepts/extraction.md), with rules [extraction.5](https://docs.pnbr.io/concepts/extraction.md#rule-extraction-5), [extraction.10](https://docs.pnbr.io/concepts/extraction.md#rule-extraction-10) and [extraction.15](https://docs.pnbr.io/concepts/extraction.md#rule-extraction-15).
Recipe [extract-files](https://docs.pnbr.io/guides/extract-files.md). Problems [change-waits-for-approval](https://docs.pnbr.io/troubleshooting/change-waits-for-approval.md) and [reply-lost](https://docs.pnbr.io/troubleshooting/reply-lost.md).

## Keep going

[Extraction](https://docs.pnbr.io/concepts/extraction.md) · [Extract entities from Files](https://docs.pnbr.io/guides/extract-files.md) · [Approval](https://docs.pnbr.io/concepts/approval.md) · [Workspace](https://docs.pnbr.io/concepts/workspace.md) · [A change returned pending](https://docs.pnbr.io/troubleshooting/change-waits-for-approval.md) · [The reply to a change was lost](https://docs.pnbr.io/troubleshooting/reply-lost.md)

Penumbra Grammar 0.6.26


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.