one-worker-for-a-single-session-credential
Run an integration whose credential is one account session without losing that session — a second worker on the same key reads as a hijack, and the key does not come back.
Procedure
- start start. Goes next to s1
- decision Is the scheduled worker stopped?. Goes if still_running to s10; if default to s2
- check No other copy is running on this machine. Goes on_fail to s3; next to s4
- decision Whose process is it?. Goes if abandoned to s4; if default to s10
- decision Is concurrency pinned to one everywhere?. Goes if not_pinned to s10; if default to s5
- action Start exactly one worker, RW (reversible-write). Goes on_fail to s10; next to s6
- decision Did a duplicate-authorisation error appear?. Goes if duplicate to s7; if default to s9
- decision Is the session still alive?. Goes if revoked to s8; if default to s10
- action The owner reissues the key by hand, IRR (irreversible), requires approval. Goes on_fail to s10; next to s9
- decision Did the run finish on its own?. Goes if stopped_early to s10; if default to s11
- escalate Stop, before the key is spent. Terminal
- action Write down what could not be reached, RO (read-only). Goes next to __end_success
- end success. Terminal
Open the graph on its own page — larger, printable, and an address you can send.
Walk it without running it — you answer what your environment would answer, and the path, the capabilities, the approvals and the distance back to an undo come out of the document. Nothing executes; there is no Run button here and there will not be one.
Trust
T2 · attested 2026-10-11 · runbooks.directory
Nobody has attested this record. That is the ordinary case: T2 is what the catalog can check on its own, and T3 needs somebody to run the procedure and sign for it.
- Link liveness has not been checked: it needs a network and the catalog builds without one. Run
pnpm gates --onlinewhere there is one.
Steps
s1decision — Is the scheduled worker stopped?s2check — No other copy is running on this machines3decision — Whose process is it?s4decision — Is concurrency pinned to one everywhere?s5action — Start exactly one worker (reversible-write)s6decision — Did a duplicate-authorisation error appear?s7decision — Is the session still alive?s8action — The owner reissues the key by hand (irreversible) — requires approvals9decision — Did the run finish on its own?s11action — Write down what could not be reached (read-only)s10escalate — Stop, before the key is spent
Capabilities
This is a privilege request. Check it against your own allowlist before running.
-
cli:pgrep— used by s2
Provenance
- Source
- https://runbooks.directory/r/std/one-worker-for-a-single-session-credential/source.md
- Fetched
- 2026-09-04
- Source last checked
- not since it was captured on 2026-09-04 — recorded as
current - Licence
- CC-BY-4.0
- How it got here
- Written by this catalog's maintainers and reviewed in full.
- Highest risk in this procedure
- irreversible
Take it with you
- SKILL.md — the record as an Agent Skills file
- workflow.yaml — Open Workflow DSL 1.0.3, for a runner
- record.json — the catalog's own JSON
- graph.svg — the graph, standalone
Run it under supervision
This procedure contains irreversible steps. Run it here, where the supervisor is the thing invoking the commands and therefore sees every one of them: each step is proposed before it happens and a gate stops for you. Nothing about the run leaves this machine.
# irreversible steps: every one stops for you before it runs.
npx @runbooks/cli run std/one-worker-for-a-single-session-credential@1.0.0 --as "$(whoami)" \
--input worker=<the process name of the worker that holds the session>