No description
  • JavaScript 81.1%
  • TypeScript 17.3%
  • Nix 1.6%
Find a file
2026-11-16 21:08:05 +07:00
extensions PER-10: extract TobServer Pi extension 2026-11-16 21:08:05 +07:00
nix PER-10: extract TobServer Pi extension 2026-11-16 21:08:05 +07:00
AGENTS.md PER-10: extract TobServer Pi extension 2026-11-16 21:08:05 +07:00
flake.nix PER-10: extract TobServer Pi extension 2026-11-16 21:08:05 +07:00
package.json PER-10: extract TobServer Pi extension 2026-11-16 21:08:05 +07:00
README.md PER-10: extract TobServer Pi extension 2026-11-16 21:08:05 +07:00

Pi TobServer

Host-opted-in TobServer worktree handoffs for Pi: dispatch, first submission after a startup blocker, continuation, inspection-only recovery, and read-only status.

The runtime was extracted unchanged from dotfiles commit 494a16d651810c1cc5899653827cccd5b34c3582, from flakes/pi/extensions/{tobserver-task,tobserver-common}. All sixteen runtime files, including prompt/publication policy text, retain their original bytes and relative paths. Existing handoffs stay in <getAgentDir()>/tobserver-handoffs; there is no package-name-based state migration.

Requirements and boundaries

  • A Pi installation providing the imported SDKs. Packaging follows the inspected Pi 1.3.0 extension/package contract; the SDKs are peers, not bundled dependencies.
  • The existing Herdr worktree and authoritative Pi-session/prompt-activity capabilities. The coordinating Pi must run inside Herdr (HERDR_ENV=1).
  • One existing enabled Herdr machine profile named TobServer, targeting the owner-managed tobserver-dev SSH alias.
  • Existing trusted SSH and remote development configuration. Publication uses the existing managed Git/fj authentication described below.

This remains a host-specific extension, not a generic remote executor or permission sandbox. Loading registers tools/commands only: its factory makes no SSH/Herdr calls, filesystem checks, or timers. Every operation still requires its own owner authorization and runtime safety checks. Installation, implementation, or validation never authorizes input to an existing task.

Declarative installation

The flake intentionally has no nixpkgs input or standalone Pi executable. It exposes:

  • lib.mkPackage pkgs: build with the consumer's pinned package set.
  • homeManagerModules.default: default-disabled, install-only Home Manager integration.
  • programs.pi-tobserver.enable: install the selected package.
  • programs.pi-tobserver.package: optional package override.

For a local checkout, a consumer can select an input such as:

inputs.pi-tobserver.url = "path:/absolute/path/to/pi-tobserver";

Choose the published Git source/ref separately when a remote is available. The consumer's lockfile records the selected source; this repository does not create a remote, publish, edit consumer pins, or activate configuration automatically. During development, use a path: source to include reviewed untracked files; Git-flake sources omit them until tracked.

Import the Home Manager module and explicitly enable installation:

{
  imports = [ inputs.pi-tobserver.homeManagerModules.default ];
  programs.pi-tobserver.enable = true;
}

The package installs under ${package}/share/pi-tobserver. Installation does not write Pi settings, create autodiscovered extension links, install Herdr, or enable any tools. Do not use imperative npm/Pi package installation to bypass the declarative setup.

Explicit host-level activation

The task entrypoint is:

${package}/share/pi-tobserver/extensions/tobserver-task

Select it once in the host's existing Pi extension-list owner. Do not also load the package through settings.packages, a project setting, or an autodiscovery link. Different absolute paths to the old embedded source and this package are not assumed to deduplicate.

For dotfiles consumers with programs.tobs-pi.extraExtensions, the integration is:

{ config, lib, ... }:
let
  cfg = config.programs.pi-tobserver;
in
{
  programs.pi-tobserver.enable = true;

  programs.tobs-pi.extraExtensions = lib.optional cfg.enable
    "${cfg.package}/share/pi-tobserver/extensions/tobserver-task";

  assertions = [
    {
      assertion =
        !cfg.enable
        || (
          config.programs.tobs-pi.enable
          && config.programs.pi.coding-agent.enable
          && config.programs.tobs-pi.features.herdr
          && config.programs.tobs-pi.features.guardrails
        );
      message = "The TobServer extension requires the existing Pi, Herdr and guardrails integration.";
    }
  ];
}

The consumer must already configure those prerequisites; the extension package does not silently enable them. The new repository's Home Manager module does not depend on dotfiles-specific options.

Before switching from the embedded tobserverRemoteTask feature, disable/remove that old loader in the same reviewed consumer cutover. Do not layer this example on top of the still-enabled embedded extension. Retire the old flag with migration guidance only when the consumer has a published replacement pin; keep the original source available until then.

The inspected upstream pi.nix declares settings as a shallow attribute option. A separate module assignment to programs.pi.coding-agent.settings.extensions can replace another list rather than concatenate it. Compose the final list in one owner, preserving builtin and unrelated resources. Other consumers must do the equivalent in their own configuration.

After separately authorized activation, use a new local coordinating Pi process. Do not reload/restart existing coordinators, Herdr, remote agents, or operate saved tasks merely to verify installation. No state/record migration is needed.

Development checks

No runtime dependencies are installed, no SDK is bundled, and no automated tests, fixtures, mocks, or typecheck infrastructure are included.

From the repository:

nixfmt --check flake.nix nix/*.nix
for file in extensions/tobserver-task/*.mjs extensions/tobserver-common/*.mjs; do
  node --check "$file" || exit
done
git diff --check

Build lib.mkPackage pkgs with a consumer's pinned pkgs; the standalone flake deliberately has no default package backed by a second nixpkgs pin. Inspect the package and compare both runtime trees with the extraction baseline. The package completeness assertion covers the fourteen task files and both common helpers, including pr-rules.md.

These checks do not execute the TypeScript entrypoint or prove live SSH/Herdr/task/publication behavior. Do not invoke Pi normally or read/write live ledgers as a packaging smoke test. Existing state, locks, saved publishers, worktrees and processes remain untouched. Keep a known fj-v1-compatible package/source for owner-controlled rollback; do not blindly revert to an older incompatible coordinator.

TobServer handoffs

Explicitly loading this extension registers tobserver_task, tobserver_task_resume, tobserver_task_recover, tobserver_task_continue, tobserver_task_status and matching /tobserver-task, /tobserver-task-resume, /tobserver-task-recover, /tobserver-task-continue, /tobserver-task-status commands. It does not load a handoff skill, contact TobServer at startup or delegate work automatically. Installing the package alone registers none of these tools or commands. Herdr alone keeps its usual integration without the handoff capability.

Primary checkouts stay in /home/dev/src/<repo>. New task worktrees use /home/dev/worktrees/<repo>-<task-label>-<short-id>, for example /home/dev/worktrees/job-search-ranked-results-auto-keys-a1b2c3d4. Provide label: "ranked-results-auto-keys" in tobserver_task, or --label ranked-results-auto-keys in the command. The calling assistant chooses a concise nonsecret outcome label, not a sentence fragment such as implement-on-demand-complete; it honors a label Tobias provides. No extra model call is made by the extension.

Labels accept at most 80 input characters and become lowercase ASCII kebab-case, limited to 28 characters with no trailing hyphen. Whitespace-only, control-bearing and labels without ASCII letters/digits are rejected before any command. The slash command takes a single unquoted label token; the tool can also sanitize a short multiword label. Omission preserves the legacy brief-prefix naming for older callers.

The ID is the first eight characters of the handoff UUID. Task branches use agent/<task-label>-<short-id>. Agent names remain task-<short-id>; new PR handoffs use that feature branch, not an AGit topic. The label is not a PR title or a change in publication scope. Legacy handoffs retain their saved topics. The full UUID stays in the saved handoff record. Labels are excluded from the request fingerprint: changing a label cannot duplicate a submitted or uncertain handoff. Existing worktrees/branches are never renamed, and status, resume and continue retain their saved identities.

An explicit handoff request authorizes dispatch without a routine confirmation dialog. The default is implementation, checks/review, local commit, then a feature-branch push and stock-fj API-backed Forgejo PR. Tobias reviews remote implementations in Forgejo, so the remote prompt makes this an explicit exception to his local review-before-commit rule. Other repository restrictions still apply. It never authorizes merge, deployment or a direct push to the target branch.

PR-producing handoffs inline extensions/tobserver-task/pr-rules.md before the task brief. This shared policy asks for a short problem/fix description, check results, actual remote-model/Pi attribution at the end, and before/after screenshots for UI changes or a short video for animations. Baseline evidence must be captured before implementation. Unavailable evidence or unknown model metadata must be disclosed, never invented. Evidence does not authorize new credentials, external uploads, or changes to live services. Non-publishing and commit-only handoffs do not receive PR rules.

New PR records save publisher: "fj-v1" and omit AGit topics. The remote agent verifies its local worktree/branch/scope and completes checks/review, then commits only authorized task files before remote availability checks. A failed lookup (such as repo url cannot be a base) must not become a request for Tobias to certify an AGit topic or a reason to leave already-authorized work uncommitted.

Publication uses the existing Git SSH identity, a single explicit feature-branch refspec, and normal managed dev HOME/XDG authentication through stock fj. Using that authentication is allowed; reading/provisioning tokens or changing authentication is not. Do not isolate or erase real publisher credentials. Always pass -H git.tobiasostner.de and explicit repository arguments. Stock fj 0.6.0 and 0.7.0 still infer the checkout's scp-style origin even with explicit repository arguments, failing with repo url cannot be a base before PR creation. All fj preflight checks (including whoami and any auth list), PR inspection and ordinary PR creation therefore use -C with the same private directory outside Git, without changing managed HOME/XDG or credentials. The absolute /tmp location avoids an inherited TMPDIR inside the worktree. Verify neutrality, and stop if Git directory overrides interfere; never unset safety overrides or modify origin/authentication to force publication.

pr_api_cwd=$(mktemp -d /tmp/tobserver-fj-api.XXXXXX) || exit 1
if git -C "$pr_api_cwd" rev-parse --show-toplevel >/dev/null 2>&1; then exit 1; fi
fj whoami -H git.tobiasostner.de -C "$pr_api_cwd"
fj pr search --repo "$repo" --state all -H git.tobiasostner.de -C "$pr_api_cwd"
fj pr view "$repo#$number" -H git.tobiasostner.de -C "$pr_api_cwd"

Require whoami to report dev-sync. Generic Forgejo skill examples do not move account checks before the authorized local commit or permit extra bare fj whoami calls inside the worktree. A URL-parser error is not an authentication failure; only read-only invocation context may be corrected, never credentials or a failed/uncertain publication mutation. The handoff states this rule explicitly even when an older generic skill is loaded. Shared skill-source changes need separate publication and a reviewed agent-skills pin update in the dotfiles consumer to become installed; editing the local skill checkout does not update that pin.

Git identity/ref checks, commits and branch pushes stay in the assigned task worktree. Account checks and PR API commands use the neutral directory. After all first-creation gates pass, prepare pr_description and use an absolute private body file outside that directory. Require allocation/writing to succeed, recheck neutrality, and supply the title after --, with explicit head/base (no autofill):

body_file=$(mktemp /tmp/tobserver-pr-body.XXXXXX) || exit 1
printf '%s' "$pr_description" > "$body_file" || exit 1
if git -C "$pr_api_cwd" rev-parse --show-toplevel >/dev/null 2>&1; then exit 1; fi
fj pr create --repo "$repo" --head "$branch" --base "$target" \
  --body-file "$body_file" -H git.tobiasostner.de -C "$pr_api_cwd" -- "$pr_title"

This is an invocation-context correction, not permission to retry a failed or uncertain publication, including an earlier URL-parser failure. Existing tasks retain their attempt history and require owner-directed recovery. No live task is continued merely by installing this guidance.

The agent inspects exact live refs with Git and freshly checks any known PR before every push/update, including continuations. Closed/merged or unverifiable state stops the push; an open matching PR is reused. Only ordinary first creation without a known earlier attempt or unresolved uncertainty is allowed. Use a multiline UTF-8 body file, not AGit encoding. After a failed or uncertain publication mutation, preserve the commit/worktree, inspect read-only, and stop further mutations for that attempt; never blindly create another PR. Report the actual nonsecret failure instead of asking for topic certification. Read-only correction of a lookup invocation is not a publication retry and never authorizes another push/create or a change of authentication/transport.

After success, read back the actual known/reported PR ID using the neutral lookup context. When a body file was supplied, compare the returned title/body content, paragraph structure, attribution and evidence links with it. Branch-only updates must not demand an old temporary body file or claim comparison against it. Report only fields supported by actual successful reads. This verifies server-returned content/state to the extent exposed, not byte-identical raw Markdown or browser-rendered HTML. Browser rendering of the PR is not a routine publication requirement; application UI screenshots/animation evidence requirements remain unchanged.

Before scratch cleanup, retain a short publication evidence summary in the final report or approved artifact: repository, publisher, branch/commit, known PR ID, read commands/results, verified fields and remaining limitations. If readback is unresolved, preserve the expected private body file instead of deleting it with validation scratch. No new machine-verified publication ledger is implied. The empty owned lookup directory may be removed with rmdir; this never authorizes worktree cleanup or remote branch deletion.

Stock fj 0.6.0 search is not exhaustive pagination, and its human output is not a structured publication receipt. Titles/empty results cannot prove exact identity or historical absence. The extension does not scrape PR numbers/URLs from terminal output, track publication attempts, or claim duplicate-proof recovery. Those stronger machine-ledger guarantees are deferred; these are agent instructions, not a publisher engine or server-side validation.

Missing publisher metadata means legacy AGit. Its frozen initial/continuation instructions, original topic and authorization remain unchanged; no existing agent is migrated or messaged. Unknown/inconsistent publishers block sends. New topic-less PR records are also rejected by the known older resumers: do not relabel them as legacy or use an older coordinator to continue them after rollback. Keep the reviewed updated extension available for explicit recovery.

Review all changes and required local ancestry before committing/publishing. After separately approved consumer activation, start a new coordinating Pi process to use the selected package. Source edits are not installation; no active agent/Herdr restart or server pin/deployment is required for this Mac-only change. Server auth refresh still requires owner-controlled fj quiescence.

/tobserver-task --label pagination-tests -- Fix pagination and add regression tests
/tobserver-task --repo job-search --label ranked-results-auto-keys -- Implement the approved plan reproduced below...
/tobserver-task --repo demo --publication none -- Read-only audit of pagination
/tobserver-task --repo demo --publication commit-only -- Fix pagination
/tobserver-task --help
/tobserver-task-status
/tobserver-task-status <handoff-id>

For new handoffs without --base, the extension fetches one origin branch and saves that fetch's exact commit as the task base. --target BRANCH selects the source branch and, for PR work, the PR target. Otherwise it uses the branch currently checked out in TobServer's primary checkout, not a guessed main or origin default branch. A detached primary checkout requires an explicit target for automatic bases in every publication mode. For none/commit-only, target selection grants no publication.

--base FULL_COMMIT instead chooses a commit object already available in the TobServer repository. Its check is offline, with no lazy object fetching or new ancestry requirement. Explicit-base PRs still need a target when primary HEAD is detached; explicit-base non-PR tasks need no source branch.

Fetching writes Git objects and a private refs/tobserver/bases/<handoff-uuid> ref. It never pulls, switches, merges, resets or stashes the primary checkout, or updates its local branches, index or working files. Thus src/<repo> can remain at an older or dirty checkout while the new task worktree starts at the freshly captured commit. Ordinary unrelated fetches cannot overwrite this private capture; FETCH_HEAD and origin tracking refs are not used for the base. Tags, pruning, submodules, tracking-ref mapping, repository hooks and automatic maintenance are suppressed for this fetch. Required Git options are checked offline; unsupported versions stop without an automatic upgrade or fallback. The private ref is retained, including after failure; no automatic cleanup is introduced. Do not manually write that ref or change Git/SSH configuration concurrently with dispatch.

Freshness means the successful fetch's snapshot. A later upstream push does not trigger another fetch. Existing handoffs, status, resume, continuation and recovery keep their original saved bases and never fetch or rebase. Unpublished commits and uncommitted files in either checkout remain excluded. Put required plan content in the brief and publish required dependencies before dispatch; no files are silently copied.

Fetch intent is saved before the source operation, and the captured SHA is saved before worktree creation. Fetch/authentication/missing-branch/timeout/capture/ persistence failures stop without a cached-base fallback, task creation or prompt delivery. An identical attempted request returns its saved handoff rather than fetching or dispatching again. Inspect the record and ask Tobias about any recovery; there is no new fetch retry API. Source-fetch intent/capture, worktree creation and prompt submission are reported separately: an intent is not proof that its command ran or completed.

An explicit publication mode (or --publication) is authoritative and is never overridden by scanning the task brief. Thus --publication pr still publishes a PR when the brief says Do not commit logs or Do not push directly to main: those safeguards are not blanket publication opt-outs.

Only when the mode is omitted, conservative prose inference maps no PR, don't publish, leave uncommitted and read-only tasks to none; otherwise it defaults to pr. Tool guidance tells the model to interpret intent and supply the matching explicit mode. For ambiguous briefs, use --publication pr or --publication none rather than relying on the fallback. commit-only requires an explicit request. This changes new handoffs only; existing saved modes and already-delivered prompts are not rewritten, and no task is resent.

Genuine repository-identity ambiguity stops dispatch. After verifying the reported local/remote mapping, use identityConfirmed in the tool or --identity-confirmed in the command. Do not use this option to ignore a misconfigured Forgejo origin. SSH destinations are inspected using existing trusted OpenSSH configuration; PRs require forgejo-dev to resolve to git.tobiasostner.de on port 22 as forgejo. No credentials or configuration are provisioned or changed. Automatic fetching in every publication mode and PR publication fail closed on Git SSH transport overrides such as core.sshCommand or GIT_SSH_COMMAND; identity confirmation cannot bypass them. New dispatch/source preparation also rejects Git repository/index/object/ namespace/config-injection environment overrides, including defined-empty values. The checked local environment is the one used for subprocesses; remote Git checks use the actual remote environment. Overrides are never cleared to make an operation pass. Matching URLs alone do not establish the actual SSH destination. Normal owner-managed Git/SSH configuration and credential helpers remain trusted; this is not a configuration or permissions sandbox. Non-PR SSH/HTTPS origins do not acquire Forgejo PR publishing requirements. The remote agent rechecks URLs and transport overrides in its own publishing context.

The extension uses fixed subprocess operations, not model-generated bash. The installed guardrails' bash permission gate does not authorize these internal calls. The handoff's own profile, path, identity, state and argument checks apply instead. Ordinary bash/SSH calls retain their existing guardrails. This is a trusted extension, not an OS sandbox, and the remote worktree runs as dev on the live server.

Handoff records live in <agent-dir>/tobserver-handoffs, normally ~/.pi/agent/tobserver-handoffs, with private directory/file permissions. They retain IDs, resolved base (or an unresolved automatic capture), optional source branch/private-ref/fetch provenance, publication mode, saved publisher (or legacy topic), separate task-creation state, task SHA-256, available startup terminal/session bindings, prompt UTF-8 byte count and first-activity acknowledgment, but not task text or terminal output. A request fingerprint prevents identical tasks being accidentally dispatched twice, including after a restart. Status inspection is read-only and never resends a prompt.

Before writing any prompt, new handoffs wait up to 30 seconds for the Pi session/lifecycle hook on the original terminal: a herdr:pi session reference and active authoritative lifecycle reporting. Herdr's process/screen-based agent_started / interactive_ready alone are insufficient: a cold Pi process can appear ready before its TUI enables raw input, dropping a prompt written too early. This is a read-only readiness wait, not a fixed startup sleep. Missing hooks, busy/blocked startup, identity changes or timeout leave the task prompt not attempted; the retained agent/worktree is never restarted or replaced. The existing Pi integration must already be installed; nothing is upgraded.

New handoffs send the prompt exactly once with Herdr's agent prompt --wait, explicitly waiting for the first working or blocked activity rather than the whole task. The caller budget is 15 seconds; Herdr may report a stalled prompt sooner. Success also requires the same terminal identity and a newer activity sequence than the ready-state snapshot. Stalls, timeouts, cancellation, stale snapshots and mismatched identities leave delivery uncertain, preserve the resources and never trigger a resend. Missing prompt-wait capabilities stop before creating a worktree.

The summary separates transport submission, acknowledged prompt activity and current agent state. An activity acknowledgment is lifecycle evidence, not a byte-for-byte prompt receipt or proof of task completion. A blocked agent still needs Tobias's judgment. Older saved records have no activity evidence; status displays them as unverified and never retroactively acknowledges them because the current agent is working. Idle/unknown states do not establish completion or failed delivery.

Status takes lifecycle state from the identity-checked agent get response. Working agents require no terminal read. Other states use only a bounded visible snapshot, never application-history capture or scrolling: history capture can fail with agent_not_idle while a task is running or blocked. An unavailable snapshot is reported separately without discarding verified lifecycle or delivery evidence. Identity/query failures and cancellation still stop inspection; a snapshot warning never clears delivery uncertainty or authorizes another prompt. Visible output may omit earlier report text and does not establish completion. A historical needs-inspection phase is retained even when a later read-only query succeeds; status never rewrites the original receipt.

Failures and cancellations leave resources intact. Mutation timeouts trigger read-only reconciliation when possible. A killed process may leave a .lock file. Inspect saved records and remote state before manually removing that request's lock. There is no automatic stale-lock removal, resource cleanup or mutation retry. If a blocked startup question or uncertain delivery needs a decision, ask Tobias. Without UI, return that question rather than dispatching around it. Recovery that needs mutations remains an explicit operator task.

Submit a first brief after resolving a startup dialog

A startup not-attempted prompt is different from uncertain delivery. For example, Pi can stop at Trust project folder? before the first prompt. Tobias must resolve that native dialog himself. Status remains read-only; idle is not permission to submit, and continue cannot initialize a conversation.

After explicit first-delivery authorization, use tobserver_task_resume({ id, task }) with the full saved handoff UUID and complete original brief (including its plan, boundaries and checks):

/tobserver-task-status <handoff-uuid>
/tobserver-task-resume <handoff-uuid> <complete original brief, not just "proceed">
/tobserver-task-resume --help

Only an existing needs-inspection handoff stopped during agent startup with submission: not-attempted is eligible. The operation revalidates the saved profile, registered worktree, branch, origin/SSH destination, workspace, pane, agent and live Pi hook; it requires the worktree to be clean at its original base. Existing changes/commits are preserved and block first delivery, not reset or discarded. Saved terminal/session bindings cannot be replaced. No worktree or agent is created/restarted, and the saved base, scope, PR target, publisher, legacy AGit topic (where present) and publication authorization are never overridden.

Native human confirmation in Pi TUI is mandatory, including confirmation that this is the original Pi instance, the remote startup dialog was personally resolved, no original prompt is queued, and the remote editor is EMPTY and will remain unused through submission. Snapshots are not a lock against manual input. RPC/print/headless callers and model-supplied approval flags cannot bypass confirmation. If the operator cannot verify these facts, cancel.

New handoffs bind the original brief by SHA-256; resume requires that exact trimmed brief. Older records have neither the brief nor this hash. For those, a native multiline editor first displays the entire supplied brief and target identities for review against the original authorization, followed by explicit confirmation. Cancelling or editing that review sends nothing; corrections need a new explicit request. A successful first submission records its hash and current conversation binding. No brief text is stored in the ledger.

The original-dispatch lock and the continuation conversation-input lock protect this operation. Its initial-submission receipt is saved in the original handoff record with uncertain state before the sole prompt send. Fresh activity, not transport acceptance, acknowledges it. Repeated calls never send again; timeouts, cancellation or malformed acknowledgments stay uncertain. Neither resume, continue nor later idle status can turn uncertainty into a retry. After a successful first submission, ordinary authorized follow-ups use continue. A new blocked question is reported, never automatically answered.

Implementing, testing or activating this feature does not authorize submitting a particular saved task; that is a separate explicit owner request. Legacy review/confirmation is not a remote project-trust approval or a general permission to replace agents or broaden the task.

Recover an acknowledged inspection-only block

Use tobserver_task_recover({ id }) only after Tobias explicitly authorizes recovery of that saved handoff. This updates local control metadata only; it never sends a task/follow-up, starts an agent, answers a remote dialog or changes a worktree. Status remains read-only and cannot clear this block.

/tobserver-task-status <handoff-uuid>
/tobserver-task-recover <handoff-uuid>
/tobserver-task-recover --help

Eligibility requires needs-inspection with failedAt: submitted, recorded submission: submitted, valid working/blocked activity acknowledgment and the original bound terminal/Pi session. New failures must be explicitly classified post-ack-inspection; other persistence/setup failures are refused. Older records without a classification additionally require native owner confirmation that the original task was received and only inspection/reporting failed. Error message text and current idle/working state are never eligibility evidence. Uncertain/unattempted delivery, missing bindings, replacement or exited agents, and unresolved/malformed continuation receipts remain blocked. This operation does not repair continuation receipts or silently adopt status-reconciled handles.

Native Pi TUI confirmation is mandatory. RPC, print/headless mode and approval flags are refused. The original-dispatch and conversation-input locks cover both preflights and the atomic save. The profile, registered worktree, branch/origins, agent, terminal and Pi session are rechecked after confirmation. Ordinary task commits, dirty files and lifecycle progress are preserved; a working or blocked agent does not need to be stopped. Locks do not prevent manual ledger writers; keep local handoff/continuation records free of other writers during recovery.

One atomic record update stores the recovery receipt and previous failure along with the new observed/blocked phase. Original failure fields, task identity, base, publication limits and submission/activity evidence stay intact. Repeated recovery returns the same receipt without another change or confirmation. If a save fails or its outcome is unconfirmed, inspect status and ask Tobias; never retry automatically or edit JSON. No terminal output or task text is stored. Recovery is not completion and does not authorize input. Any later follow-up requires a separate owner request and all normal continuation checks, including idle/readiness and uncertainty guards. Implementing this capability is not permission to recover a live handoff.

Continue an existing handoff

Use tobserver_task_continue({ id, message }) only for an explicitly owner-authorized follow-up to the full saved handoff UUID. Inspect the current question and identities with tobserver_task_status first. This is new input to an already initialized conversation, not first submission, process resumption or a retry of an uncertain initial prompt. Use resume only for the known not-attempted startup case described above. Implementing the feature does not authorize using it on a real task.

/tobserver-task-continue <handoff-uuid> Proceed with the approved option; keep all original checks.
/tobserver-task-continue --help
/tobserver-task-status <handoff-uuid>

The extension rechecks the saved machine/session, registered linked worktree, workspace, pane, agent, branch, origin and Git transport, plus the terminal and Pi session identity. Only ready idle/done agents accept a continuation. Busy, unknown, blocked or replaced agents and incomplete/uncertain original handoffs are refused. An interactive trust/approval dialog must be handled separately by Tobias, not answered through this tool. Changed Git/profile/agent state between preflight snapshots also stops sending. These snapshots are not a lock against manual interaction; do not use the remote editor concurrently.

New handoffs require and record the original Pi session hook before sending. Legacy handoffs without that binding require native human confirmation in Pi TUI of the exact current conversation, after verifying that it received the original task and its editor is unused and clear. There is no headless/RPC confirmation flag. An acknowledged continuation receipt retains that binding for later follow-ups; status never silently adopts a session or rewrites the original handoff.

Dirty files and commits made by the existing task are expected and preserved, including legacy linked worktrees directly under /home/dev/src. Primary checkouts are never continued. No new worktree, agent, restart, cleanup, fetch, publication-mode change, deployment or merge is performed by this capability. The existing task's scope, checks and saved publisher/branch/target safeguards remain authoritative, including when follow-up wording asks for broader authority. Legacy AGit topics remain bound; new fj continuations freshly inspect a known PR before any branch push/update and never require an AGit topic.

Private receipts live under <agent-dir>/tobserver-handoffs/continuations and retain IDs, message fingerprints, target/session identity, byte counts and activity evidence, not follow-up text or terminal output. A per-handoff lock serializes different continuations. Each message is attempted once, with write-ahead uncertainty and first-activity verification. Identical attempted messages are not resent, even after restart. Any unresolved continuation blocks all new messages for that handoff, including differently worded retries. Read-only task status lists continuation receipt IDs and outcomes; it never retries or resolves uncertainty from a later idle/working observation. Recovery requires a separate explicit operator decision.

Review and Git-track all new extension modules before a normal Git-flake rebuild. Package evaluation fails early if any of the sixteen runtime files is missing, including the common helpers and publication policy. Source changes do not activate the configuration or continue a task.

Worktree cleanup is managed by the Hermes agent on TobServer, not Pi. Removing the former cleanup extension leaves existing cleanup records and worktrees untouched. Rebuild and start a new Pi process to stop loading its tools and commands; no Herdr restart or remote cleanup is needed.