diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 56aece23167..1fb71f5dfe0 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -5,7 +5,7 @@ scripts/release*.sh @cryppadotta @devinfoley @nickyleach @forgottendev
scripts/release-*.mjs @cryppadotta @devinfoley @nickyleach @forgottendev
scripts/create-github-release.sh @cryppadotta @devinfoley @nickyleach @forgottendev
scripts/rollback-latest.sh @cryppadotta @devinfoley @nickyleach @forgottendev
-doc/RELEASING.md @cryppadotta @devinfoley @nickyleach @forgottendev
+doc/RELEASING.md @cryppadotta @devinfoley @nickyleach @forgottendev @tonio-alucema @scotttong
doc/PUBLISHING.md @cryppadotta @devinfoley @nickyleach @forgottendev
doc/RELEASE-AUTOMATION-SETUP.md @cryppadotta @devinfoley @nickyleach @forgottendev
skills/** @cryppadotta @devinfoley @nickyleach @forgottendev
diff --git a/.github/workflows/runner-full-stack-e2e.yml b/.github/workflows/runner-full-stack-e2e.yml
index 0600886144d..97afd34eadc 100644
--- a/.github/workflows/runner-full-stack-e2e.yml
+++ b/.github/workflows/runner-full-stack-e2e.yml
@@ -1294,7 +1294,7 @@ jobs:
- name: Package pruned dashboard with declared screenshots for GitHub Pages
if: vars.RUNNER_FULL_STACK_E2E_PUBLISH_PAGES == 'true'
- uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
+ uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
name: ${{ steps.pages_artifact_name.outputs.name }}
path: runner-e2e-merged-report/pages
@@ -1313,7 +1313,7 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
- uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
+ uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
with:
# If only this failed job is rerun, GitHub retains the successful
# publisher job's output from the earlier workflow attempt.
diff --git a/AGENTS.md b/AGENTS.md
index c957ca41ead..53f25d6d514 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -152,6 +152,10 @@ Notes:
## 7. Verification Before Hand-off
+[feature-map/README.md](feature-map/README.md) is an optional reference for user
+entry points, verification recipes, and coverage gaps. The map records coverage
+scope, not proof that a live journey passed.
+
Default local/agent test path:
```sh
diff --git a/DESIGN.md b/DESIGN.md
index ef852568573..9924f21bf91 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -43,6 +43,26 @@ action on the left and the primary action on the right. A step owns its whole
footer: do not render Save & exit in a separate parent block below it. Check this
alignment in every step and conditional state, not just the first screen.
+## Mobile navigation and text fields
+
+The fixed bottom navigation uses an opaque surface so scrolling content cannot
+show through its labels. On touch devices, editable controls use at least the
+16px base typography token to prevent Safari's automatic focus zoom. Larger
+title sizes remain larger.
+
+The bottom navigation responds to accumulated scrolling, ignoring small
+reversals and Safari's edge bounce. It glides out and eases back in with shared
+motion tokens; the task composer follows the same motion. Keep page padding
+stable while the navigation moves, and honor reduced-motion preferences.
+
+Task conversations reveal their initial comments, interaction cards, plan, and
+relevant run history together after positioning the latest message. Keep the
+mobile loading surface at a stable viewport height while that history loads;
+concealed content must not stretch the document. Background refreshes keep an
+already revealed conversation and composer mounted and visible.
+Bound the initial wait to 15 seconds. If a request stalls, reveal the available
+conversation and composer with a notice that some history is still loading.
+
## Contextual feedback
Task chat shows execution errors and waits only while they remain relevant.
@@ -66,10 +86,16 @@ paused.” and “Resume this task to send a message.” with a “Resume task
Subtrees use “Subtree is paused.” and “Resume subtree.” The takeover cannot be
dismissed, retains drafts, and hides message inputs until the pause is released.
+Confirmations whose source work is still syncing show “Preparing approval…” and
+disable acceptance until the server reports readiness. Refresh that state automatically;
+rejection and revision remain available. Live tool reviews keep their own approval flow.
+
Pending questions, confirmations, and other task-thread inputs appear in a separate
card directly above the ordinary composer. The composer stays available for new
-messages while the card is open. Dismissing a card leaves a pending indicator that
-can reopen it; resolving or skipping the input removes that indicator.
+messages while the card is open. Questions use their compact history entry as the
+reminder; dismissing one clears the composer and stays effective after reload for
+that person and task. Other inputs keep a pending indicator that can reopen them;
+resolving or skipping the input removes that indicator.
## Enforcement (what "compliant" means for the extraction run)
@@ -95,6 +121,8 @@ How-to guide for day-to-day UI changes: see `doc/design/CHANGING-THE-UI.md`.
## Motion tokens (Task Chat Redesign)
+Mobile task panels fill the viewport within the safe area. Their top toolbar shows the current tab title, an open-tab count and selector, an add action, and an X to return to the feed. The selector lists tabs vertically with wrapping titles, an explicit current-tab check, and visible close controls. Each touch control uses the 44px size token. Desktop tabs keep their horizontal layout. Document links within the current task open through the router and retain the feed's reading position and query cache.
+
The redesigned task thread (flag `enableTaskChatRedesign`) is the first surface to
tokenize motion. Principles — reasoning only; values live in `ui/src/index.css`:
@@ -119,4 +147,4 @@ tokenize motion. Principles — reasoning only; values live in `ui/src/index.css
block collapses the duration/stagger tokens to zero, cascading to every scoped token,
in addition to each animation's own component-level guard.
-Agent Chat keeps pending questions as compact “Unanswered question” entries at their original position in history. A newer user message dismisses the old question form without resolving it. Opening the history entry restores the original form and its draft; submitting later uses the same durable question response path. Actual permission reviews retain their permission checks.
+Agent Chat and regular task chats keep pending questions as compact “Unanswered question” entries at their original position in history. Dismissing the form or sending a newer user message clears it from the composer without resolving it. Questions never contribute to composer pending counts or navigation. Opening the history entry restores the original form and its draft; submitting later uses the same durable question response path. Actual permission reviews retain their permission checks.
diff --git a/README.md b/README.md
index b3f130123d8..a0db4476643 100644
--- a/README.md
+++ b/README.md
@@ -417,6 +417,9 @@ This starts the UI and API at `http://localhost:3100`. An embedded PostgreSQL da
> **Requirements:** Node.js 24.11+, pnpm 9.15+
+Local Claude and Codex subscription sign-in also needs Python 3 and the
+corresponding provider CLI on the Paperclip host. The Docker image includes them.
+
Source development also builds the native Paperclip Runner when enabled (the self-hosted default). Install a Rust toolchain, or set `PAPERCLIP_RUNNER_BINARY` to a compatible prebuilt runner.
diff --git a/cli/src/__tests__/mcp-auth.test.ts b/cli/src/__tests__/mcp-auth.test.ts
new file mode 100644
index 00000000000..fb600afe63b
--- /dev/null
+++ b/cli/src/__tests__/mcp-auth.test.ts
@@ -0,0 +1,113 @@
+import fs from "node:fs/promises";
+import os from "node:os";
+import path from "node:path";
+import { spawn, spawnSync } from "node:child_process";
+import { once } from "node:events";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { credentialPath, mcpAccessToken, mcpResource, mcpRpc, replaceMcpCredential, withMcpCredentialLock } from "../client/mcp-auth.js";
+
+const resource = "https://paperclip.example/mcp/paperclip";
+let home: string;
+beforeEach(async () => { home = await fs.mkdtemp(path.join(os.tmpdir(), "mcp-credentials-")); vi.stubEnv("PAPERCLIP_HOME", home); });
+afterEach(async () => { vi.restoreAllMocks(); vi.unstubAllGlobals(); vi.unstubAllEnvs(); await fs.rm(home, { recursive: true, force: true }); });
+async function seed(value: unknown, mode = 0o600) {
+ const file = credentialPath(resource);
+ await fs.mkdir(path.dirname(file), { mode: 0o700 });
+ await fs.writeFile(file, typeof value === "string" ? value : JSON.stringify(value), { mode });
+ return file;
+}
+const stored = () => ({ resource, issuer: "https://paperclip.example", clientId: "client", companyId: "company", accessToken: "private-access", refreshToken: "private-refresh", expiresAt: 0 });
+describe("MCP protected credential transport", () => {
+ it("rejects noncanonical resources and isolates credential files by resource", () => {
+ for (const url of ["http://evil.example/mcp/paperclip", resource + "?token=secret", resource + "#x", "https://u:p@paperclip.example/mcp/paperclip", "https://paperclip.example/other"]) expect(() => mcpResource(url)).toThrow();
+ expect(mcpResource("http://127.0.0.1:3100/mcp/paperclip")).toContain("127.0.0.1");
+ expect(credentialPath(resource)).not.toBe(credentialPath("https://other.example/mcp/paperclip"));
+ });
+ it("serializes rotating refreshes and persists only the replacement token privately", async () => {
+ const file = await seed(stored()); let refreshes = 0;
+ vi.stubGlobal("fetch", vi.fn(async (url: string, init?: RequestInit) => {
+ expect(init?.redirect).toBe("error");
+ if (url.includes("oauth-protected-resource")) return Response.json({ resource, authorization_servers: ["https://paperclip.example"] });
+ if (url.includes("oauth-authorization-server")) return Response.json({ issuer: "https://paperclip.example", token_endpoint: "https://paperclip.example/mcp/oauth/token", device_authorization_endpoint: "https://paperclip.example/mcp/oauth/device_authorization", registration_endpoint: "https://paperclip.example/mcp/oauth/register" });
+ expect(url).toBe("https://paperclip.example/mcp/oauth/token");
+ expect(JSON.parse(init!.body as string).refresh_token).toBe("private-refresh"); refreshes++;
+ return Response.json({ access_token: "replacement-access", refresh_token: "replacement-refresh", token_type: "Bearer", expires_in: 900 });
+ }));
+ expect(await Promise.all([mcpAccessToken(resource), mcpAccessToken(resource)])).toEqual(["replacement-access", "replacement-access"]);
+ expect(refreshes).toBe(1);
+ expect((await fs.stat(file)).mode & 0o077).toBe(0);
+ expect(await fs.readFile(file, "utf8")).not.toContain("private-refresh");
+ });
+ it("never sends a stored credential to another issuer", async () => {
+ await seed({ ...stored(), issuer: "https://evil.example" }); const fetcher = vi.fn(); vi.stubGlobal("fetch", fetcher);
+ await expect(mcpAccessToken(resource)).rejects.toThrow("Connect first"); expect(fetcher).not.toHaveBeenCalled();
+ });
+ it("fails closed when discovery changes without sending refresh credentials", async () => {
+ await seed(stored()); const fetcher = vi.fn(async () => Response.json({ resource, authorization_servers: ["https://evil.example"] })); vi.stubGlobal("fetch", fetcher);
+ await expect(mcpAccessToken(resource)).rejects.toThrow("does not match"); expect(fetcher).toHaveBeenCalledTimes(1);
+ });
+ it("rejects readable or malformed credential files without echoing secrets", async () => {
+ const file = await seed(stored(), 0o644);
+ await expect(mcpAccessToken(resource)).rejects.toThrow("private");
+ await fs.chmod(file, 0o600); await fs.writeFile(file, '{private-secret');
+ await expect(mcpAccessToken(resource)).rejects.toThrow("Invalid MCP credential file. Sign in again.");
+ });
+ it("does not expose upstream response text in protocol errors or retry writes", async () => {
+ const fetcher = vi.fn(async () => new Response("private-upstream-token", { status: 200 })); vi.stubGlobal("fetch", fetcher);
+ await expect(mcpRpc(resource, "private-access", "tools/call", { name: "paperclip_create_task" })).rejects.toThrow("invalid response");
+ expect(fetcher).toHaveBeenCalledTimes(1);
+ });
+ it("releases the refresh mutex after failed work", async () => {
+ const file = credentialPath(resource);
+ await expect(withMcpCredentialLock(file, async () => { throw new Error("failed"); })).rejects.toThrow("failed");
+ await expect(withMcpCredentialLock(file, async () => "recovered")).resolves.toBe("recovered");
+ });
+ it("recovers an OS mutex after its owner is killed without a stale-file takeover", async () => {
+ const file = await seed(stored());
+ await fs.writeFile(file + ".mutex.sqlite", "", { mode: 0o600 });
+ const child = spawn(process.execPath, ["--input-type=module", "-e", 'import {DatabaseSync} from "node:sqlite"; const db=new DatabaseSync(process.argv[1]); db.exec("BEGIN IMMEDIATE"); console.log("locked"); setInterval(()=>{},1000);', file + ".mutex.sqlite"], { stdio: ["ignore", "pipe", "pipe"] });
+ try {
+ await once(child.stdout!, "data");
+ let entered = false;
+ const next = withMcpCredentialLock(file, async () => { entered = true; return "recovered"; });
+ await new Promise(resolve => setTimeout(resolve, 150));
+ expect(entered).toBe(false);
+ const exit = once(child, "exit"); child.kill("SIGKILL"); await exit;
+ await expect(next).resolves.toBe("recovered");
+ } finally { child.kill("SIGKILL"); }
+ });
+ it("preserves a working connection when replacement storage fails", async () => {
+ const file = await seed(stored());
+ const fetcher = vi.fn(); vi.stubGlobal("fetch", fetcher);
+ vi.spyOn(fs, "rename").mockRejectedValueOnce(new Error("disk failure"));
+ await expect(replaceMcpCredential(file, { ...stored(), accessToken: "new-access" }, vi.fn())).rejects.toThrow("disk failure");
+ expect(JSON.parse(await fs.readFile(file, "utf8")).accessToken).toBe("private-access");
+ expect(fetcher).not.toHaveBeenCalled();
+ });
+ it("keeps the OS lock held while a same-process caller waits", async () => {
+ const file = await seed(stored());
+ let release!: () => void;
+ let entered!: () => void;
+ const ready = new Promise(resolve => { entered = resolve; });
+ const held = new Promise(resolve => { release = resolve; });
+ const first = withMcpCredentialLock(file, async () => { entered(); await held; });
+ await ready;
+ let secondEntered = false;
+ const second = withMcpCredentialLock(file, async () => { secondEntered = true; });
+ try {
+ await new Promise(resolve => setTimeout(resolve, 100));
+ const probe = spawnSync(process.execPath, ["--input-type=module", "-e", 'import{DatabaseSync}from"node:sqlite";const db=new DatabaseSync(process.argv[1]);try{db.exec("BEGIN IMMEDIATE");process.exitCode=0}catch(e){process.exitCode=e.errcode===5?5:1}finally{db.close()}', file + ".mutex.sqlite"]);
+ expect(probe.status).toBe(5);
+ expect(secondEntered).toBe(false);
+ } finally { release(); await Promise.all([first, second]); }
+ });
+ it("retains the new saved credential and reports failed previous-grant cleanup", async () => {
+ const file = await seed(stored()); const notify = vi.fn();
+ vi.stubGlobal("fetch", vi.fn(async () => {
+ expect(JSON.parse(await fs.readFile(file, "utf8")).accessToken).toBe("new-access");
+ return new Response(null, { status: 503 });
+ }));
+ await replaceMcpCredential(file, { ...stored(), accessToken: "new-access" }, notify);
+ expect(notify).toHaveBeenCalledWith(expect.stringContaining("revoke it in Paperclip Connections"));
+ });
+});
diff --git a/cli/src/__tests__/worktree.test.ts b/cli/src/__tests__/worktree.test.ts
index 0fb6b2aee32..6d36e060357 100644
--- a/cli/src/__tests__/worktree.test.ts
+++ b/cli/src/__tests__/worktree.test.ts
@@ -511,7 +511,8 @@ describe("worktree helpers", () => {
expect(minimal.excludedTables).toContain("agent_task_sessions");
expect(minimal.nullifyColumns.issues).toEqual(["checkout_run_id", "execution_run_id"]);
- expect(full.excludedTables).toEqual([]);
+ expect(full.excludedTables).toEqual(["agent_identity_keys"]);
+ expect(minimal.excludedTables).toContain("agent_identity_keys");
expect(full.nullifyColumns).toEqual({});
});
@@ -1661,10 +1662,13 @@ describe("worktree helpers", () => {
// A lagging source must also have the prior schema. Deleting only the
// newest receipt from a fully migrated schema relied on that particular
// migration being idempotent and breaks when the new migration creates a
- // table. Build the actual all-but-last schema before shuffling its history.
+ // table. Build the schema before the identity-repair migration, so this
+ // regression keeps testing that repair as later migrations are added.
const migrationsRoot = new URL("../../../packages/db/src/migrations/", import.meta.url);
const journal = JSON.parse(fs.readFileSync(new URL("meta/_journal.json", migrationsRoot), "utf8"));
- const priorEntries = journal.entries.slice(0, -1);
+ const repairIndex = journal.entries.findIndex((entry: { tag: string }) => entry.tag === "0309_loving_the_hood");
+ expect(repairIndex).toBeGreaterThan(0);
+ const priorEntries = journal.entries.slice(0, repairIndex);
const priorMigrations = path.join(tempRoot, "prior-migrations");
fs.mkdirSync(path.join(priorMigrations, "meta"), { recursive: true });
fs.writeFileSync(path.join(priorMigrations, "meta", "_journal.json"), JSON.stringify({ ...journal, entries: priorEntries }));
@@ -1673,7 +1677,19 @@ describe("worktree helpers", () => {
}
const sourceDbClient = createDb(sourceDb.connectionString);
await migrate(drizzle(sourceDbClient.$client), { migrationsFolder: priorMigrations });
- await seedValidWorktreeSource(sourceDb.connectionString);
+ const seed = await seedValidWorktreeSource(sourceDb.connectionString);
+ // An older filtered JavaScript backup retained event IDs but lost the
+ // identity generator. The pending migration must repair that schema.
+ const legacyAgentId = randomUUID();
+ await sourceDbClient.$client`
+ INSERT INTO agents (id, company_id, name, status)
+ VALUES (${legacyAgentId}, ${seed.companyId}, 'Legacy paused agent', 'paused')
+ `;
+ await sourceDbClient.$client`
+ INSERT INTO resource_lifecycle_events (company_id, resource_type, resource_id, action)
+ VALUES (${seed.companyId}, 'agent', ${legacyAgentId}, 'pause')
+ `;
+ await sourceDbClient.$client.unsafe('ALTER TABLE resource_lifecycle_events ALTER COLUMN id DROP IDENTITY');
await sourceDbClient.$client.unsafe(`
WITH pair AS (
SELECT
@@ -1704,7 +1720,7 @@ describe("worktree helpers", () => {
if (laggingMigrationState.status !== "needsMigrations") {
throw new Error("Expected the source migration journal to lag the code journal");
}
- expect(laggingMigrationState.pendingMigrations).toHaveLength(1);
+ expect(laggingMigrationState.pendingMigrations).toHaveLength(journal.entries.length - repairIndex);
const expectedAppliedPrefix = laggingMigrationState.availableMigrations.slice(
0,
laggingMigrationState.appliedMigrations.length,
@@ -1786,6 +1802,16 @@ describe("worktree helpers", () => {
);
const seededUsers = await targetDb.select().from(authUsers);
expect(seededUsers.some((row) => row.email === "existing@paperclip.ing")).toBe(true);
+ const restoredEvents = await targetDb.$client`
+ SELECT id, action FROM resource_lifecycle_events WHERE resource_id = ${legacyAgentId} ORDER BY id
+ `;
+ expect(restoredEvents.map(row => row.action)).toEqual(["pause", "create"]);
+ expect(Number(restoredEvents[1].id)).toBeGreaterThan(Number(restoredEvents[0].id));
+ const [identity] = await targetDb.$client`
+ SELECT is_identity FROM information_schema.columns
+ WHERE table_schema = 'public' AND table_name = 'resource_lifecycle_events' AND column_name = 'id'
+ `;
+ expect(identity.is_identity).toBe("YES");
},
);
@@ -2045,8 +2071,8 @@ describe("worktree helpers", () => {
}
});
- it("uses streaming backup selection for full seeds and transformed backup selection for minimal seeds", () => {
- expect(resolveWorktreeSeedBackupEngine(resolveWorktreeSeedPlan("full"))).toBe("auto");
+ it("uses transformed backups for both seed modes to omit agent identities", () => {
+ expect(resolveWorktreeSeedBackupEngine(resolveWorktreeSeedPlan("full"))).toBe("javascript");
expect(resolveWorktreeSeedBackupEngine(resolveWorktreeSeedPlan("minimal"))).toBe("javascript");
});
diff --git a/cli/src/client/mcp-auth.ts b/cli/src/client/mcp-auth.ts
new file mode 100644
index 00000000000..47e185a9b2c
--- /dev/null
+++ b/cli/src/client/mcp-auth.ts
@@ -0,0 +1,210 @@
+import fs from "node:fs/promises";
+import { constants } from "node:fs";
+import path from "node:path";
+import { DatabaseSync } from "node:sqlite";
+import { createHash, randomUUID } from "node:crypto";
+import { setTimeout as sleep } from "node:timers/promises";
+import { PUBLIC_MCP_PATH, PUBLIC_MCP_SCOPES } from "@paperclipai/shared";
+import { resolvePaperclipHomeDir } from "../config/home.js";
+
+const deviceGrant = "urn:ietf:params:oauth:grant-type:device_code";
+type Json = Record;
+export interface McpCredential {
+ resource: string; issuer: string; clientId: string; companyId: string;
+ accessToken: string; refreshToken?: string; expiresAt: number;
+}
+export function mcpResource(raw: string) {
+ const url = new URL(raw);
+ if ((url.protocol !== "https:" && !(url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname)))
+ || url.username || url.password || url.search || url.hash || url.pathname !== PUBLIC_MCP_PATH) throw new Error("Use the exact Paperclip HTTPS MCP URL from Connections.");
+ return url.toString();
+}
+export function credentialPath(resource: string) {
+ return path.join(resolvePaperclipHomeDir(), "mcp", createHash("sha256").update(resource).digest("hex") + ".json");
+}
+async function readCredential(file: string): Promise {
+ let handle;
+ try { handle = await fs.open(file, constants.O_RDONLY | constants.O_NOFOLLOW); }
+ catch (error) { if ((error as NodeJS.ErrnoException).code === "ENOENT") return null; throw error; }
+ try {
+ const stat = await handle.stat();
+ if (!stat.isFile() || (stat.mode & 0o077) !== 0) throw new Error("MCP credential file must be private (mode 0600).");
+ let value: McpCredential;
+ try { value = JSON.parse(await handle.readFile("utf8")); }
+ catch { throw new Error("Invalid MCP credential file. Sign in again."); }
+ if (!value || typeof value !== "object" || ![value.resource, value.issuer, value.clientId, value.companyId, value.accessToken].every(v => typeof v === "string" && v.length > 0)
+ || !Number.isFinite(value.expiresAt) || (value.refreshToken !== undefined && typeof value.refreshToken !== "string")) throw new Error("Invalid MCP credential file. Sign in again.");
+ return value;
+ } finally { await handle.close(); }
+}
+async function saveCredential(file: string, credential: McpCredential) {
+ const temporary = file + "." + randomUUID();
+ try {
+ await fs.writeFile(temporary, JSON.stringify(credential), { mode: 0o600, flag: "wx" });
+ await fs.rename(temporary, file);
+ } finally { await fs.unlink(temporary).catch(() => {}); }
+}
+
+/** One refresh owner per resource, including independent CLI/bridge processes. */
+const processLocks = new Map>();
+export async function withMcpCredentialLock(file: string, work: () => Promise) {
+ const key = path.resolve(file);
+ const previous = processLocks.get(key) ?? Promise.resolve();
+ let release!: () => void;
+ const current = new Promise(resolve => { release = resolve; });
+ processLocks.set(key, current);
+ await previous;
+ try { return await withMcpOsLock(key, work); }
+ finally {
+ release();
+ if (processLocks.get(key) === current) processLocks.delete(key);
+ }
+}
+
+async function withMcpOsLock(file: string, work: () => Promise) {
+ const directory = path.dirname(file);
+ await fs.mkdir(directory, { recursive: true, mode: 0o700 });
+ const stat = await fs.lstat(directory);
+ if (!stat.isDirectory() || stat.isSymbolicLink() || (stat.mode & 0o077) !== 0) throw new Error("The MCP credential directory must be private (mode 0700).");
+ // SQLite's OS lock is released when a process exits, including during acquisition.
+ // No PID-file deletion or stale-lock takeover can race a new refresh owner.
+ const lockPath = file + ".mutex.sqlite";
+ // Never open/close an existing SQLite file outside SQLite: POSIX close can
+ // release another connection's process-owned lock. The in-process queue also
+ // serializes initial file creation before any SQLite descriptor is opened.
+ try {
+ await fs.writeFile(lockPath, "", { flag: "wx", mode: 0o600 });
+ } catch (error) { if ((error as NodeJS.ErrnoException).code !== "EEXIST") throw error; }
+ const lockStat = await fs.lstat(lockPath);
+ if (!lockStat.isFile() || lockStat.isSymbolicLink() || (lockStat.mode & 0o077) !== 0) throw new Error("The MCP mutex file must be private (mode 0600).");
+ const lock = new DatabaseSync(lockPath);
+ const deadline = Date.now() + 30_000;
+ try {
+ lock.exec("PRAGMA busy_timeout = 0");
+ while (true) {
+ try { lock.exec("BEGIN IMMEDIATE"); break; }
+ catch (error) {
+ if ((error as { errcode?: number }).errcode !== 5) throw error;
+ if (Date.now() >= deadline) throw new Error("Another Paperclip MCP login or refresh is in progress. Try again.");
+ await sleep(100);
+ }
+ }
+ try { return await work(); }
+ finally { lock.exec("ROLLBACK"); }
+ } finally { lock.close(); }
+
+}
+
+async function jsonRequest(url: string, body?: Json) {
+ const response = await fetch(url, { redirect: "error", signal: AbortSignal.timeout(20_000),
+ ...(body ? { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) } : {}) });
+ const data = await safeJson(response);
+ return { ok: response.ok, data };
+}
+async function safeJson(response: Response): Promise {
+ try {
+ const value = await response.json();
+ if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error();
+ return value as Json;
+ } catch { throw new Error("Paperclip returned an invalid response. Check the connection before retrying."); }
+}
+async function revoke(credential: McpCredential) {
+ const response = await fetch(credential.issuer + "/mcp/oauth/revoke", { method: "POST", redirect: "error", signal: AbortSignal.timeout(20_000),
+ headers: { "Content-Type": "application/json" }, body: JSON.stringify({ client_id: credential.clientId, token: credential.refreshToken ?? credential.accessToken }) });
+ if (!response.ok) throw new Error("Could not revoke the previous connection.");
+}
+async function discovery(resource: string) {
+ const origin = new URL(resource).origin;
+ const protectedResource = await jsonRequest(origin + "/.well-known/oauth-protected-resource" + PUBLIC_MCP_PATH);
+ if (!protectedResource.ok || protectedResource.data.resource !== resource || !Array.isArray(protectedResource.data.authorization_servers)
+ || !protectedResource.data.authorization_servers.includes(origin)) throw new Error("Paperclip resource discovery does not match this instance.");
+ const metadata = await jsonRequest(origin + "/.well-known/oauth-authorization-server");
+ if (!metadata.ok || metadata.data.issuer !== origin || metadata.data.token_endpoint !== origin + "/mcp/oauth/token"
+ || metadata.data.device_authorization_endpoint !== origin + "/mcp/oauth/device_authorization"
+ || metadata.data.registration_endpoint !== origin + "/mcp/oauth/register") throw new Error("This Paperclip instance does not support device login.");
+ return origin;
+}
+function tokens(data: Json, credential: Omit): McpCredential {
+ if (typeof data.access_token !== "string" || data.token_type !== "Bearer" || typeof data.expires_in !== "number" || data.expires_in <= 0) throw new Error("Invalid Paperclip token response. Reconnect.");
+ return { ...credential, accessToken: data.access_token, expiresAt: Date.now() + data.expires_in * 1000,
+ ...(typeof data.refresh_token === "string" ? { refreshToken: data.refresh_token } : {}) };
+}
+export async function mcpRpc(resource: string, token: string, method: string, params: Json = {}) {
+ const version = "2026-07-28";
+ const response = await fetch(resource, { method: "POST", redirect: "error", signal: AbortSignal.timeout(60_000),
+ headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json", "MCP-Protocol-Version": version, "Mcp-Method": method,
+ ...(method === "tools/call" && typeof params.name === "string" ? { "Mcp-Name": params.name } : {}) },
+ body: JSON.stringify({ jsonrpc: "2.0", id: randomUUID(), method, params: { ...params, _meta: {
+ "io.modelcontextprotocol/protocolVersion": version, "io.modelcontextprotocol/clientCapabilities": {},
+ "io.modelcontextprotocol/clientInfo": { name: "Paperclip CLI", version: "1" },
+ } } }),
+ });
+ if (!response.ok) throw new Error(`Paperclip MCP returned HTTP ${response.status}. Check the connection before retrying; a write may already have completed.`);
+ const data = await safeJson(response);
+ if (data.error || !data.result || typeof data.result !== "object") throw new Error("Paperclip could not complete this MCP request. Check the connection before retrying.");
+ return data.result as Json;
+}
+
+export async function loginMcpDevice(raw: string, companyId?: string, notify: (message: string) => void = console.error) {
+ const resource = mcpResource(raw);
+ const issuer = await discovery(resource);
+ const registration = await jsonRequest(issuer + "/mcp/oauth/register", { client_name: "Paperclip CLI (device)", redirect_uris: [], grant_types: [deviceGrant, "refresh_token"], response_types: [], token_endpoint_auth_method: "none" });
+ if (!registration.ok || typeof registration.data.client_id !== "string") throw new Error("Could not register the Paperclip device client.");
+ const clientId = registration.data.client_id;
+ const authorization = await jsonRequest(issuer + "/mcp/oauth/device_authorization", { client_id: clientId, resource, scope: PUBLIC_MCP_SCOPES.join(" "), ...(companyId ? { company_id: companyId } : {}) });
+ const device = authorization.data;
+ if (!authorization.ok || typeof device.device_code !== "string" || typeof device.user_code !== "string"
+ || device.verification_uri !== issuer + "/mcp-device" || typeof device.expires_in !== "number") throw new Error("Could not start device authorization.");
+ const verification = new URL(device.verification_uri); verification.searchParams.set("user_code", device.user_code);
+ notify(`Approve Paperclip access in your browser: ${verification}\nConfirm code: ${device.user_code}\nWaiting for your approval…`);
+ let interval = typeof device.interval === "number" ? Math.max(5, device.interval) : 5;
+ const deadline = Date.now() + Math.min(600, device.expires_in) * 1000;
+ while (Date.now() < deadline) {
+ await sleep(interval * 1000);
+ const result = await jsonRequest(issuer + "/mcp/oauth/token", { grant_type: deviceGrant, client_id: clientId, resource, device_code: device.device_code });
+ if (!result.ok) {
+ if (result.data.error === "authorization_pending") continue;
+ if (result.data.error === "slow_down") { interval += 5; continue; }
+ throw new Error(result.data.error === "access_denied" ? "Connection declined. No access was granted." : "Device authorization expired or failed. Start login again.");
+ }
+ const credential = tokens(result.data, { resource, issuer, clientId, companyId: companyId ?? "" });
+ const identity = await mcpRpc(resource, credential.accessToken, "tools/call", { name: "paperclip_connection", arguments: {} });
+ const connected = identity.structuredContent as Json | undefined;
+ if (identity.isError || typeof connected?.companyId !== "string" || (companyId && connected.companyId !== companyId)) throw new Error("The approved organization did not match. Reconnect before doing work.");
+ credential.companyId = connected.companyId;
+ const file = credentialPath(resource);
+ await replaceMcpCredential(file, credential, notify);
+ return { resource, companyId: credential.companyId };
+ }
+ throw new Error("Device authorization expired. Start login again.");
+}
+
+export async function replaceMcpCredential(file: string, credential: McpCredential, notify: (message: string) => void) {
+ await withMcpCredentialLock(file, async () => {
+ const previous = await readCredential(file);
+ // Persist the working replacement before changing authority on the server.
+ await saveCredential(file, credential);
+ if (previous && previous.resource === credential.resource && previous.issuer === credential.issuer) {
+ try { await revoke(previous); }
+ catch { notify("Connected. The previous connection could not be revoked; revoke it in Paperclip Connections."); }
+ }
+ });
+}
+
+export async function mcpAccessToken(raw: string) {
+ const resource = mcpResource(raw);
+ const file = credentialPath(resource);
+ return withMcpCredentialLock(file, async () => {
+ const credential = await readCredential(file);
+ if (!credential || credential.resource !== resource || credential.issuer !== new URL(resource).origin) throw new Error("Connect first with paperclipai mcp login --device --url .");
+ if (credential.expiresAt > Date.now() + 30_000) return credential.accessToken;
+ if (!credential.refreshToken) throw new Error("Paperclip access expired. Sign in again.");
+ // Validate issuer discovery again before sending a stored credential.
+ await discovery(resource);
+ const result = await jsonRequest(credential.issuer + "/mcp/oauth/token", { grant_type: "refresh_token", client_id: credential.clientId, resource, refresh_token: credential.refreshToken });
+ if (!result.ok) throw new Error("Paperclip access was revoked or expired. Sign in again.");
+ const updated = tokens(result.data, credential);
+ await saveCredential(file, updated);
+ return updated.accessToken;
+ });
+}
diff --git a/cli/src/commands/mcp.ts b/cli/src/commands/mcp.ts
new file mode 100644
index 00000000000..bf080ae04b6
--- /dev/null
+++ b/cli/src/commands/mcp.ts
@@ -0,0 +1,38 @@
+import type { Command } from "commander";
+import { createInterface } from "node:readline";
+import { loginMcpDevice, mcpAccessToken, mcpResource, mcpRpc } from "../client/mcp-auth.js";
+
+export function registerMcpCommands(program: Command) {
+ const mcp = program.command("mcp").description("Connect an assistant to Paperclip as a consenting human");
+ mcp.command("login").requiredOption("--device", "Authorize in a browser without a callback listener")
+ .requiredOption("--url ", "Canonical Paperclip MCP URL").option("--company ", "Restrict consent to this organization")
+ .action(async (options: { url: string; company?: string }) => {
+ const result = await loginMcpDevice(options.url, options.company);
+ console.log(`Connected to ${result.resource}\nOrganization: ${result.companyId}`);
+ });
+ mcp.command("proxy").description("Expose the authorized Paperclip tools over local MCP stdio")
+ .requiredOption("--url ", "The exact MCP URL used during login")
+ .action(async (options: { url: string }) => {
+ const resource = mcpResource(options.url);
+ const lines = createInterface({ input: process.stdin, crlfDelay: Infinity });
+ for await (const line of lines) {
+ let message: { id?: string | number; method?: string; params?: Record };
+ if (Buffer.byteLength(line) > 1024 * 1024) continue;
+ try { message = JSON.parse(line); } catch { continue; }
+ if (!message || typeof message !== "object" || Array.isArray(message)) continue;
+ if (message.id === undefined) continue;
+ try {
+ let result: unknown;
+ if (message.method === "initialize") result = { protocolVersion: "2025-03-26", capabilities: { tools: {} }, serverInfo: { name: "paperclip", version: "1" } };
+ else if (message.method === "ping") result = {};
+ else if (message.method === "tools/list" || message.method === "tools/call") result = await mcpRpc(resource, await mcpAccessToken(resource), message.method, message.params ?? {});
+ else { process.stdout.write(JSON.stringify({ jsonrpc: "2.0", id: message.id, error: { code: -32601, message: "Method not supported." } }) + "\n"); continue; }
+ process.stdout.write(JSON.stringify({ jsonrpc: "2.0", id: message.id, result }) + "\n");
+ } catch (error) {
+ // Never log request arguments, raw provider responses, or credentials.
+ const text = "Paperclip connection failed. Check access before retrying; a write may already have completed.";
+ process.stdout.write(JSON.stringify({ jsonrpc: "2.0", id: message.id, error: { code: -32603, message: text } }) + "\n");
+ }
+ }
+ });
+}
diff --git a/cli/src/commands/worktree-lib.ts b/cli/src/commands/worktree-lib.ts
index 4cdf7ef5364..8d3aa01f6fe 100644
--- a/cli/src/commands/worktree-lib.ts
+++ b/cli/src/commands/worktree-lib.ts
@@ -58,6 +58,7 @@ export type WorktreeSeedPlan = {
};
const MINIMAL_WORKTREE_EXCLUDED_TABLES = [
+ "agent_identity_keys",
"activity_log",
"agent_runtime_state",
"agent_task_sessions",
@@ -118,7 +119,7 @@ export function resolveWorktreeSeedPlan(mode: WorktreeSeedMode): WorktreeSeedPla
if (mode === "full") {
return {
mode,
- excludedTables: [],
+ excludedTables: ["agent_identity_keys"],
nullifyColumns: {},
};
}
diff --git a/cli/src/index.ts b/cli/src/index.ts
index b2f722a4a00..8d924786bf0 100644
--- a/cli/src/index.ts
+++ b/cli/src/index.ts
@@ -1,4 +1,5 @@
import { registerEmailCommands } from "./commands/client/email.js";
+import { registerMcpCommands } from "./commands/mcp.js";
import { Command } from "commander";
import { warnIfUnsupportedNodeVersion } from "@paperclipai/shared/node-version";
import { onboard } from "./commands/onboard.js";
@@ -276,6 +277,7 @@ auth
.action(bootstrapCeoInvite);
registerClientAuthCommands(auth);
+registerMcpCommands(program);
async function main(): Promise {
warnIfUnsupportedNodeVersion(process.versions.node, (message) => console.warn(message));
diff --git a/doc/AGENT-IDENTITY.md b/doc/AGENT-IDENTITY.md
new file mode 100644
index 00000000000..f8dabb3c54a
--- /dev/null
+++ b/doc/AGENT-IDENTITY.md
@@ -0,0 +1,100 @@
+# Agent cryptographic identity
+
+Each agent has one persistent Ed25519 keypair. New agents receive it in the
+agent-creation transaction. Existing agents receive it when Paperclip prepares
+their next managed run. Migration, startup, public API reads, and opening the
+agent page do not provision existing agents. There is no backfill command.
+
+## Storage
+
+`agent_identity_keys` lives in the agent's home instance database, including a
+hosted stack's database. Its agent primary key and composite company/agent
+foreign key enforce one identity and company-consistent ownership. Deleting an
+agent cascades to its identity. Creation locks the agent row inside a transaction,
+so simultaneous first runs use the same stored pair.
+
+Public keys use SPKI PEM and private keys use PKCS#8 PEM. `keyId` is `sha256:`
+followed by the base64url SHA-256 digest of the public key's SPKI DER bytes.
+Private material is encrypted using the existing `local_encrypted` provider and
+stored separately from company secrets. The wrapping key is the stack's
+`PAPERCLIP_SECRETS_MASTER_KEY` or the local instance's secrets master-key file.
+The file is published atomically with mode `0600` on first use. No per-agent
+Cloud secret or Cloud registry record is needed.
+
+Decryption and public/private key validation happen before launch. A wrong
+master key, corrupt ciphertext, or mismatched public key fails the run; none
+causes automatic key replacement. Renames, model changes, pauses, resumes, and
+restarts preserve the keypair.
+
+## Managed runs
+
+Paperclip supplies these server-owned environment variables:
+
+```text
+PAPERCLIP_AGENT_KEY_ID
+PAPERCLIP_AGENT_PUBLIC_KEY
+PAPERCLIP_AGENT_PRIVATE_KEY
+```
+
+The two key values are multiline PEM strings. Runtime-only adapter context and
+native runner environment fields deliver them to managed processes. Configured
+or inherited environment values cannot replace the assigned identity. Session
+compatibility includes the public key ID, so an older warm process is replaced
+before its next turn. Private values are excluded from invocation metadata and
+execution configuration; output and failure diagnostics redact known private
+material. The run-log redactor handles split stdout/stderr chunks independently.
+Native output deltas also buffer potential key fragments before persistence.
+Raw provider trace contents are suppressed for identity-enabled runs; trace
+routing, timing, and interpretation metadata remain available.
+
+Managed remote providers, including Cursor Cloud, receive the same private key
+as managed local processes. Selecting a runtime therefore trusts its host with
+the agent's persistent identity: the agent and its host can retain the key and
+sign outside Paperclip. Encryption at rest protects database storage, not an
+executing runtime. Move an agent only between runtime hosts trusted with that
+identity.
+
+Independently hosted HTTP and gateway agents, including Runner's API-hosted Claude Managed and AWS AgentCore providers, do not receive private keys in v1.
+Their new agent records still get stored identities; their existing records stay
+unprovisioned until a supported managed run.
+
+An agent can sign using an ordinary cryptographic library, for example Node.js:
+
+```js
+import { sign } from "node:crypto";
+const signature = sign(null, challengeBytes, process.env.PAPERCLIP_AGENT_PRIVATE_KEY);
+```
+
+This identity does not change Paperclip bearer-token authentication. There is no
+signing API, private-key download endpoint, Git integration, rotation UI, or
+external-key import. Agents possess their private keys. External consumers must
+define their own authorization, expiry, and revocation rules.
+
+## Public identity
+
+`GET /api/agents/:id/identity` applies the existing agent-read access checks. It
+returns `null` before provisioning, otherwise:
+
+```ts
+{ algorithm: "Ed25519", keyId: string, publicKeyPem: string, createdAt: string }
+```
+
+The agent's Identity section shows a shortened fingerprint and copies the full
+public PEM. Before provisioning it shows “Not created yet” and explains that
+creation happens on the next managed run.
+
+## Copies and recovery
+
+Company/template imports and duplication use normal agent creation and get new
+identities. Minimal and full development seeds omit identity **rows**, while
+retaining the schema, even with live-work preservation. Those copied agents get
+fresh identities on their next managed runs.
+
+Ordinary disaster-recovery backups include encrypted identities. Recovery needs
+both the database and the matching wrapping key; back up the key separately.
+Do not use a disaster-recovery backup as a development clone when agents should
+have distinct identities.
+
+Native failure records and reports redact the assigned key before truncating diagnostics. Streaming output buffers settle at item or turn completion: short structural prefixes (such as a trailing dash) are preserved, longer interrupted key fragments become redaction markers, and pending buffers are cleared. Terminal events carry these settled `outputTails`; transcript projection displays them as deltas without changing the source event receipt.
+
+Codex shell delivery preserves its default `KEY`/`SECRET`/`TOKEN` name exclusions for other configured credentials. The exceptions are the three identity variables and `PAPERCLIP_API_KEY`: the latter is the short-lived, scoped run/bridge credential required by the Paperclip agent skill’s Bash/curl API calls. Disabling Codex’s automatic exclusions is paired with this explicit filtered allowlist; it does not admit arbitrary host environment variables. Provider authentication secrets can still reach the provider process without being newly exposed to shell commands by this feature.
diff --git a/doc/DATABASE.md b/doc/DATABASE.md
index b6258c21acb..c6d747b45bc 100644
--- a/doc/DATABASE.md
+++ b/doc/DATABASE.md
@@ -177,12 +177,20 @@ idempotent actor synchronization operations, not arbitrary transactions. A
persistent outage still fails the request after the bounded retries; each
connection attempt remains subject to the configured database connect timeout.
-The dashboard's company lookup, task counts, pending approval count, and
-monthly spend each retry these connection errors at most twice. Each callback
-is read-only and rebuilds its query for each attempt. A failed read
-does not replay completed reads or the budget workflow. Missing companies,
-authentication errors, and other database errors propagate without retry.
-This does not enable general SQL replay.
+The dashboard's company lookup, agent and task counts, pending approval count,
+monthly spend, and run activity aggregate each retry these connection errors
+at most twice. The heartbeat run list and base issue lookup by UUID or identifier
+use the same bounded retries. Each callback is read-only and rebuilds its query
+for each attempt. A failed read does not replay completed reads, the budget
+workflow, or issue label and watchdog enrichment. Missing resources,
+authentication errors, and other database errors retain their usual behavior.
+This does not enable general SQL replay or retry a full request.
+
+The task run list also opts its execution-status projection into these bounded
+retries. Each of its four read-only lookups rebuilds only the failed query;
+completed lookups and the separate liveness backfill are not replayed. Projection
+callers that use a transaction retain single-attempt reads. The opt-in is only
+for a pooled database handle outside a transaction.
## Execution identity row locks
@@ -239,6 +247,38 @@ public identity, and the existing unique singleton-key index makes concurrent
or later attempts to replace it fail closed. The server loads the row before
constructing URL-dependent runtime services on every boot.
+### Unclaimed Cloud warm standby
+
+`PAPERCLIP_CLOUD_WARM_STANDBY=1` is an opt-in control-plane marker for an
+unclaimed warm application. It requires Cloud configuration, a stack identity,
+and runtime identity verification keys. After restoring the durable identity,
+startup checks once for company data. Existing companies or a persisted claim
+keep the application fully active. A failed database check fails startup.
+
+An empty unclaimed application keeps its HTTP server and sandbox plugins ready,
+but skips recurring database work: chat/email delivery, plugin jobs, browser
+cleanup, feedback export, import cleanup, execution reconciliation, heartbeat
+schedules, and automatic backups. Startup migrations, plugin installation, and
+other one-time preparation still run. Normal anonymous health probes return
+`warmStandby: true` without SQL or session lookups. This is application liveness,
+not a current database connectivity check. Other API requests and WebSocket upgrades return 503 until
+the signed claim succeeds. Page and asset requests serve only the static UI
+router, bypassing session, bearer-key, tenant, and other dynamic handlers.
+
+The existing signed claim on `GET /api/health` writes the identity durably before
+normal requests and polling resume. No polling discovers claims and no process
+restart is required. Timers resume on their next normal tick; request-driven
+work can proceed immediately. Claim failure leaves standby intact. A restart
+restores the claim even if provider environment alignment has not completed.
+Deleting a claimed workspace's last company never puts it back into standby.
+
+Deploy support before enabling the marker. Validate idle database transactions
+and health probes, claim/bootstrap latency, recurring work after claim, and a
+restart with stale provider variables on an isolated warm application first.
+Rollback by setting the marker to `0` and restarting. No schema changes are
+required. This mechanism does not sleep claimed workspaces or replace a durable
+scheduler for their background work.
+
## Resource membership tables
Paperclip stores current-user sidebar membership state in:
@@ -450,6 +490,74 @@ Hosted AWS provider notes live in [SECRETS-AWS-PROVIDER.md](./SECRETS-AWS-PROVID
Migration `0274_agent_chat.sql` adds conversation identity/state and session generation/boundary columns to `issues`, plus idempotent client request IDs and processed session-boundary generations to `issue_comments`. The company/agent/user unique index resolves concurrent first writes to one issue. A check constraint preserves the assigned-agent identity and prevents terminal conversation status. Comment request IDs are unique per issue and user. There is no separate chat/message store. Provider sessions continue to use `agent_task_sessions`; `/new` removes only the matching conversation session, and session writers fence stale generations against the issue row.
+## Resource lifecycle events
+
+`resource_lifecycle_events` records content-free lifecycle hooks in the same
+transaction as the resource change. Hired agents and new projects emit `create`.
+Pending hires emit creation only when `activatePendingApproval` succeeds.
+Rejected hires emit termination without creation. Agents created as terminated
+emit no creation event. Capture is generic and works on self-hosted and managed
+instances; recording an event does not authorize a provider operation.
+
+A partial unique `(company_id, resource_type, resource_id)` index deduplicates
+creation. Each actual agent pause, resume, or termination appends another event,
+including budget actions and generic status updates. The agent row stays locked
+until status and event commit, so concurrent repeat requests emit one hook.
+Project edits and workspace additions, updates, and removals append `update`.
+Repository replacement emits one aggregate update; project creation with repositories
+emits only creation. Project mutations hold the project row lock until their record
+commits. An active-to-archived transition emits `archive`; restoring an archived
+project emits `update`. Repeat archive or restore requests emit no new status
+record. An edit combined with archive emits `update` followed by `archive` in
+the same transaction. Archiving preserves workspace records and authorizes no
+provider cleanup.
+Termination commits API-key revocation in that same transaction.
+Hire approval and rejection commit with agent activation or termination, so a
+failed event write leaves the decision pending and retryable.
+
+Creation is delivered first for each resource, including a backfilled creation
+whose ID is newer than earlier captured transitions. The remaining events follow
+numeric ID order. Plugin delivery
+must enforce company scope, preserve resource order, and track acknowledgments
+per plugin. A global high-water mark can skip transactions that have not yet
+committed; it is not a safe delivery cursor. The journal stores only identity,
+action, and timestamps, not repository snapshots, credentials, provider config,
+or resource health. Company deletion cascades to its events. Resource deletion
+retains events, so consumers must revalidate existence and eligibility and load
+current authorized repository data. A termination hook does not authorize
+provider cleanup without the plugin's own authorization and retention policy.
+
+Migration `0309_loving_the_hood.sql` seeds a one-time current-state baseline before
+plugin delivery is available. It records creation for existing hired agents and
+all projects, including archived projects. Pending hires stay behind approval.
+Paused and terminated agents receive missing final status intents. A partial
+journal ending at pause receives resume when the current agent is running.
+Archived projects receive missing archive intents. A partial journal ending at
+archive receives update when the current project is active.
+Existing records remain intact, and rerunning the baseline does not duplicate it.
+The migration also repairs the journal ID generator in older JavaScript restores
+that lost identity metadata, starting above existing IDs. New JavaScript backups
+preserve identity generation, sequence options, and sequence progress.
+Resource writes wait for the migration transaction to commit. These records
+represent current desired state, not reconstructed historical transitions.
+There is no later or runtime journal backfill. Plugins use `ctx.events.listLifecycle(companyId, limit?, afterId?)` and
+`ctx.events.acknowledgeLifecycle(companyId, eventId)` with `events.subscribe`.
+The host requires a matching company invocation (or configured-company proactive
+access) and a ready plugin enabled for that company.
+`plugin_lifecycle_acknowledgments` stores progress independently
+for each plugin and event; plugin and event deletion cascade acknowledgments.
+Reads return creation first, then the earliest unacknowledged transition for each resource, up to 100
+resources. Acknowledging a later event is rejected. Reads never consume work, so
+crashes, retries, and restarts cannot lose a hook; concurrent reads can repeat an
+event. There is no global cursor or runtime backfill scan. Consumers must serialize their
+processing and make provider operations idempotent before acknowledging success.
+Retention and provider integration remain separate work.
+
+Lifecycle polls can page past failed resources using the last returned event id as
+`afterId`. Reset `afterId` at the start of every polling sweep: it is a page
+cursor, never a persisted high-water mark. This retries failures and includes
+transactions that commit later with lower ids.
+
## Legacy controller ownership
Legacy run claims atomically record `controller_boot_id`, a database-clock
@@ -491,3 +599,21 @@ reservation cannot silently disappear. Failed cleanup or an ambiguous storage
write requires operator reconciliation before an unattached reservation is
removed. The table stores no response bodies. See `doc/runner-api-tools.md` for
limits and the operator override.
+
+## Internal agent commentary
+
+`agent_commentary` stores company-scoped, attributed complaints and suggestions
+as free-form text in the instance database. Legacy agents use the default
+`complain` and `suggestion-box` runtime skills; native runs use dedicated tools
+in standard, ask, and planning modes. Submission never changes task disposition
+or routes feedback externally. See [Agent commentary](agent-commentary.md) for
+authentication, replay, document-sized limits, inspection, and deletion semantics.
+
+## Agent identity keys and backups
+
+`agent_identity_keys` stores one encrypted Ed25519 identity per agent. Its migration
+creates schema only: existing agents provision on their next managed run. Public
+reads and server startup do not provision them. Normal backups preserve identity
+rows and need the matching secrets master key for recovery. Both development seed
+modes omit identity rows, including with live-work preservation, so copied agents
+get fresh identities. See [Agent cryptographic identity](AGENT-IDENTITY.md).
diff --git a/doc/DEVELOPING.md b/doc/DEVELOPING.md
index c88890e98a9..fede68c1399 100644
--- a/doc/DEVELOPING.md
+++ b/doc/DEVELOPING.md
@@ -103,6 +103,12 @@ pnpm build-storybook
These run the `@paperclipai/ui` Storybook on port `6006` and build the static output to `ui/storybook-static/`.
+**Composer → New task** includes agent/user/project/task mentions, skill and
+routine slash commands, and populated rich chips on desktop and mobile. Agent
+mentions use the same avatars in suggestions, inserted chips, and the mocked
+creation receipt. The creation stories preserve the original Markdown references;
+they do not create real tasks or run agents.
+
Use **Components → Agent setup prompt** to review the shared setup handoff:
hover/focus logo motion, one-click copying with a prompt preview, animated
confirmation, and manual-copy recovery. Opening the preview copies immediately;
@@ -140,11 +146,61 @@ choices, item verdicts, suggested tasks, tool reviews, runtime questions, and ph
the bottom navigation. The normal message composer remains usable below the
pending card.
+Use **Chat & Comments → Task Chat Unanswered Questions → Test Drive** to
+try a regular task question: dismiss it, reload, reopen its compact feed entry,
+and submit the preserved draft. The composer has no question pending badge.
+The demo uses real thread/form components with fixture response callbacks.
+The Agent Chat stories share the same component fixture.
+
+Use **Composer → New task** to review task creation through the production
+`TaskChatComposer`. The editor, file menu, work modes, assignee/model picker,
+and send control are shared with task chat. An inset bar above the composer uses
+the queued-message container and holds Project on the left. Its searchable picker
+shows project colors. Worktrees sits beside Project when the selected project has
+isolation enabled. Choose a new worktree, reuse an eligible worktree from that
+project, or keep the shared project workspace. Reuse carries the worktree's source
+checkout, including a non-primary checkout. Changing projects clears the
+previous worktree choice. Switching from reuse to a new worktree or the project
+workspace restores the project default checkout. Task creation uses the selected company and has
+no separate heading or settings control.
+Fresh tasks start with an empty request and the last task assignee chosen in that
+company, including a human. If that assignee is unavailable, the CEO is the
+default, or the first eligible agent when the company has no CEO. Explicit launch
+assignees and saved drafts keep their selection. Selecting an assignee never
+inserts a mention. Clicking the assignee opens its searchable list directly;
+model and effort have a separate trigger and appear only for agents whose
+harness supports those settings.
+Fresh tasks also keep the company's last project (including No project); launch
+context and saved drafts take precedence. New projects receive a random palette
+color and become the remembered project. The shared composer remembers the last
+effort within the company and applies it only when the selected model supports
+that level. Explicit task overrides and drafts take precedence. Default model
+labels show the configured or known adapter model, otherwise simply Default.
+Claude defaults supplied by the server's host environment remain Default unless
+the agent explicitly configures the model. Project edits on an existing task
+become the remembered project only after the task update succeeds.
+Clicking or tapping outside either selector dismisses it and preserves the task
+draft and selections. Mobile sheets return focus to the trigger without reopening.
+Stories cover empty and prefilled drafts, remembered, human, and unassigned
+selections, the direct assignee picker, sub-tasks, planning, files, saving,
+retryable failures, creation, light theme, and mobile, plus worktree reuse,
+loading, empty, error, and isolation-disabled states. Story submissions use local
+fixtures and never start an agent.
+
Use **Composer → Model and effort picker** to review harness-specific model
choices. Codex uses the curated adapter catalog unless the instance declares
`PAPERCLIP_ADAPTER_MODELS`; general OpenAI API models are not Codex choices.
The Paperclip Runner Codex profile shows the same known model effort levels.
Its selected effort is saved with the run and sent to Codex for each turn.
+When Codex reports that a selected model is not supported with a ChatGPT account,
+the task shows **Model unavailable**, the provider's account restriction, and
+guidance to choose a supported model or clear the task's model override before
+retrying. The run retains this reason even when the runner saves a generic
+failure result.
+When a committed Codex terminal reports `serverOverloaded`, the task displays
+the model capacity error and **Model at capacity** on its scheduled retry card.
+Automatic retries wait one and two minutes, then stop. Use
+**Tasks → Model capacity retry** in Storybook to inspect the waiting state.
Claude Code uses model-specific effort levels; Haiku has no effort slider.
Grok uses its adapter's reasoning levels, including for its default model.
Kimi shows effort only when its agent uses the CLI engine, including with its
@@ -228,10 +284,14 @@ are not automatically deleted and will accumulate until an operator prunes them.
Publishing requires both the original actor and the current rerunner to be
individual GitHub accounts named in `.github/CODEOWNERS` on the current default
-branch. Comments, teams and email entries do not grant access. Authorization runs
-before the build and again before deployment, including deployment-only reruns.
+branch. Individual accounts from every ownership rule are included, regardless
+of which paths they own. Comments, teams and email entries do not grant access.
+Authorization runs before the build and again before deployment, including
+deployment-only reruns.
GitHub also requires a CODEOWNER environment approval, so editing authorization
code on a branch cannot grant AWS access without an authorized reviewer.
+CODEOWNERS membership does not automatically add an account to the environment's
+required reviewers; a configured reviewer must approve each deployment.
The build downloads the public source archive with no GitHub token permissions,
AWS credentials or repository secrets. Dependency caching and install lifecycle
@@ -409,6 +469,11 @@ npx paperclipai allowed-hostname dotta-macbook-pro
## Test Commands
+The [feature map](../feature-map/README.md) is an optional reference for user
+entry points, targeted tests, manual verification recipes, and coverage gaps.
+Its page inventory is a source snapshot. The documented journeys have separate
+verification steps and do not run automatically from the map.
+
Use the cheap local default unless you are specifically working on browser flows:
```sh
@@ -1152,6 +1217,11 @@ operator-controlled [runner API tools](runner-api-tools.md) rollout; enabling
Agent Chat does not enable that API surface. Failed-turn retries restore the
selected run's user comments so the agent can answer the original request.
+An unsaved Agent Chat uses an ephemeral `chat:` view-model ID. Task
+browser polling starts after the first send or upload creates a persisted task
+UUID. Saved chats retain the task browser's company and credential access checks.
+Task browser routes reject malformed task IDs with `404` before querying PostgreSQL.
+
A native continuation that requires reconciliation shows **Recovery needed**
with **Inspect run**; inspect the original outcome before resolving its recovery
hold. A generic retry cannot resolve this incident. The runner's
@@ -1212,6 +1282,29 @@ the updated sandbox image with the matching runner qualification changes.
### Native runner restart recovery
+Project discovery through `list_projects` returns up to 50 compact summaries.
+It uses `GET /api/companies/:companyId/projects?view=summary&limit=50&cursor=...`;
+the cursor is optional. The database reads bounded summary projections. Agent
+and run trust boundaries narrow database candidates before per-project access
+checks. Projects with their own authorization policy remain candidates because
+that policy can contribute scope; every result still passes the full access check.
+Only visible projects determine page boundaries and continuations.
+The default project-list API response remains unchanged.
+Use its `nextCursor` as the next call's `cursor` until it is null; `limit` accepts
+1–50. Descriptions include at most 1,000 characters and an explicit truncation
+flag. Full project records remain available through the authorized project API.
+Workspace configuration is excluded from discovery responses so large projects
+cannot overflow the runner's durable tool-result command limit.
+
+When an accepted result survives a shutdown failure, workspace repair uses a
+new assessment for the repaired workspace state. Its status decision and
+assessment reference commit together. Recovery completes from the saved result
+without another provider turn, clears stale successful-run errors, and retains
+the original error in `recoveredExecutionFailure`. Exact-state session cleanup
+recognizes both the legacy `adapter_failed` and current `provider_transport_failed`
+close-failure labels. Process ownership, pending tool outcomes, and checkpoint
+verification still control whether that session can be reused.
+
Paperclip Runner keeps its heartbeat run, native session, logical runner, and
provider session identities across server restarts. A coordinated hot restart
registers a correlated recovery request before it signals the dev supervisor.
@@ -1309,7 +1402,9 @@ Skill-capable legacy local adapters always select the bundled
runtime inventory. This applies to existing agents without a stored skill
preference and to explicit empty optional-skill selections. The operational
skill supplies the control-plane workflow that those adapters need for
-heartbeats. Other runtime skills remain controlled by
+heartbeats. The `complain` and `suggestion-box` runtime skills are also selected
+automatically alongside it; see [Agent commentary](agent-commentary.md).
+Other runtime skills remain controlled by
`paperclipSkillSync.desiredSkills`. The native `paperclip_runner` does not use
this legacy default because its protocol supplies the control-plane contract.
diff --git a/doc/DOCKER.md b/doc/DOCKER.md
index 7d9bb1ea954..d59ddc102bd 100644
--- a/doc/DOCKER.md
+++ b/doc/DOCKER.md
@@ -212,24 +212,25 @@ The image pre-installs:
- `claude` (Anthropic Claude Code CLI)
- `codex` (OpenAI Codex CLI)
+- `python3` (used to run local subscription sign-in in a pseudo-terminal)
-If you want local adapter runs inside the container, pass API keys when starting the container:
+Start the container, then open **Apps → Connections** to connect a Claude or
+Codex subscription in your browser. You can also enter a provider API key there.
+You do not run a shell command or configure a CLI home.
```sh
docker run --name paperclip \
-p 3100:3100 \
-e HOST=0.0.0.0 \
-e PAPERCLIP_HOME=/paperclip \
- -e OPENAI_API_KEY=... \
- -e ANTHROPIC_API_KEY=... \
-v "$(pwd)/data/docker-paperclip:/paperclip" \
paperclip-local
```
Notes:
-- Without API keys, the app still runs normally.
-- Adapter environment checks in Paperclip will surface missing auth/CLI prerequisites.
+- The image provides the CLI and Python prerequisites for local subscription sign-in.
+- Adapter environment checks in Paperclip surface missing authentication or CLI prerequisites.
## Podman Quadlet (systemd)
diff --git a/doc/PRODUCT.md b/doc/PRODUCT.md
index 15ab6854106..502b1d42dd9 100644
--- a/doc/PRODUCT.md
+++ b/doc/PRODUCT.md
@@ -209,10 +209,26 @@ telemetry. See [Announcements](ANNOUNCEMENTS.md).
### Agent chat discovery
-With Agent Chat enabled, the Chats sidebar always includes the company's
-earliest-created agent, plus personal starred agents and up to four other recent
-conversations. First use has the same compact rows as returning use. The compose
-icon shares a column with stars and appears on hover or keyboard focus (always on
-touch). It opens a company-wide name/role search, independent of sidebar membership.
+With Agent Chat enabled, Chat is the first row of the Work section and opens a
+secondary sidebar beside the primary nav. It lists every agent you can chat
+with: the open conversation first, then your other conversations by recent
+activity, then the rest of the roster alphabetically. Terminated agents and
+agents you have left are omitted unless you have history with them. Search
+filters by name, title, or role; **+** starts or reopens a conversation.
Selecting an agent opens their persistent conversation; it does not reset history
or create a task until the existing first-write flow requires one.
+
+Beside a conversation, the side panel opens on the agent's tasks: one card per
+task the agent created, was assigned, commented on, or acted on, newest first,
+with the task list's filters and a sort control. The agent's artifacts are a
+second card stack available from the panel's **+** menu. Both open in a new tab
+so the conversation stays open.
+
+### Combined Inbox + Task List
+
+An opt-in experimental setting (`enableCombinedInboxTasks`, off by default)
+folds Inbox into Tasks. The Inbox nav row goes away and its unread badge moves
+to Tasks. A Views menu on the task list covers the inbox views (Mine, Unread,
+Blocked, Recent, Everything) and the task-status views (All, Active, Backlog,
+Done). Bare `/issues` opens the last-used view, defaulting to Mine; links that
+carry a task filter open All. Old `/inbox` links redirect to the matching view.
diff --git a/doc/SPEC-implementation.md b/doc/SPEC-implementation.md
index 533a41e49cb..93a81ac6fcc 100644
--- a/doc/SPEC-implementation.md
+++ b/doc/SPEC-implementation.md
@@ -188,6 +188,18 @@ Invariants:
Invariant: plaintext key shown once at creation; only hash stored.
+### Agent cryptographic identity
+
+Each agent also has one Ed25519 identity in `agent_identity_keys`, separate from
+API bearer keys and company secrets. New-agent creation provisions it atomically;
+existing agents provision lazily before their first managed run. The schema-only
+migration and public reads never provision existing agents. Private PKCS#8 PEM
+material uses `local_encrypted`; public SPKI PEM and its SHA-256 key ID are readable
+through `GET /api/agents/:id/identity` and the agent Identity section. Managed
+processes receive the pair through runtime-only environment fields. See
+[Agent cryptographic identity](AGENT-IDENTITY.md) for storage, runtime, and copy
+semantics.
+
## 7.4 `goals`
- `id` uuid pk
@@ -548,7 +560,7 @@ V1 non-terminal liveness rule:
- recovery-action ownership is separate from source-task ownership: automatic repair and board escalation preserve both source assignee fields; reassignment requires an explicit board decision or a policy-defined serious failure
- source-scoped recovery routing is cause-keyed: bounded continuity and disposition repair may retry only the original agent; provider-quota failures create/reuse a scheduled wait-recovery monitor; every other exhausted or unsafe path creates/reuses a board-owned recovery action with `routingPolicy: board_escalation_no_takeover_v1` and no substitute-agent wake
- legacy active agent-owned recovery actions remain readable, resolvable, and API-compatible after upgrade, but reconciliation does not enqueue another takeover wake for them
-- active-run output silence is an informational board UI signal at one hour (`suspicious`) and four hours (`critical`); it does not create or update issues or recovery actions, comment on or block source work, change assignments, or wake an agent
+- active-run output silence is an informational board UI signal at five minutes (`suspicious`) and fifteen minutes (`critical`); it does not create or update issues or recovery actions, comment on or block source work, change assignments, or wake an agent
- board snooze and continue decisions suppress the run signal until their stored re-arm time; a false-positive decision suppresses it permanently for that run; open legacy evaluation issues remain readable and manually resolvable without automatic refresh
Detailed ownership, execution, blocker, active-run watchdog, crash-recovery, and non-terminal liveness semantics are documented in `doc/execution-semantics.md`.
@@ -572,6 +584,18 @@ conversation lifecycles, and protection against replaying superseded requests.
- Board has full read/write across all companies in deployment
- Every board mutation writes to `activity_log`
+Human invitations default to the Operator role. Its default grants allow agent
+creation and configuration, skill editing, environment management, invitations,
+task assignment, pipeline editing, connection and tool management/use, and tool
+and agent-action audit views. Operators do not receive `joins:approve` or
+`users:manage_permissions`. Explicit invitation grants remain authoritative.
+Creating a human invitation also requires any of these two membership powers
+included in its selected role. Operators can invite Operators and Viewers;
+inviting an Admin requires join approval, and inviting an Owner also requires
+member-permission management.
+This preset change adds no database migration; existing role-default seeding
+continues to insert missing grants without replacing custom scopes.
+
## 9.2 Agent Auth
- Bearer API key mapped to one agent and company
@@ -592,7 +616,7 @@ conversation lifecycles, and protection against replaying superseded requests.
| Action | Board | Agent |
|---|---|---|
| Create company | yes | no |
-| Hire/create agent | yes (direct) | request via approval |
+| Hire/create agent | yes (direct) | new standard agents: direct via `canCreateAgents`; low-trust policy or approval gates can restrict |
| Pause/resume agent | yes | pause: no; resume: direct `agents:configure` grant only |
| Create/update task | yes | yes |
| Force reassign task | yes | limited |
@@ -611,6 +635,14 @@ access does not bypass that decision, and `agents:suggest-changes` alone cannot
apply the lifecycle change. Pause, clear-error, terminate, approval, and
key-management routes remain board-only.
+An ordinary standard agent receives a direct `agents:configure` grant on
+creation. Existing agents keep their current permissions; no backfill runs.
+Low-trust and managed built-in agents do not receive this default. See
+[agent permission defaults](agent-permission-defaults.md) for the full inventory.
+Agent-authenticated changes cannot set or restore host-executed process adapter
+configuration, including commands and environment values. Agent-authenticated
+rollbacks cannot restore host-executed workspace commands either.
+
### 9.3.1 Shared default-open issue writes
For standard-trust agents, issue comments, issue field/status updates, child
@@ -1502,6 +1534,13 @@ Required UX behaviors:
- conflict toasts on atomic checkout failure
- no silent background failures; every failed run visible in UI
+Regular task chats and Agent Chat keep unanswered questions as compact,
+reopenable entries at their original position in the feed. Dismissing a question
+or sending a newer message clears its form from the composer without resolving
+the saved question. Questions do not contribute to composer pending counts.
+Dismissal persists locally for the person and task across reloads; reopening
+restores the original form and draft. Approval and permission gates are unchanged.
+
## 15. Operational Requirements
## 15.1 Environment
@@ -1702,12 +1741,18 @@ Confirmed project creation appears as a durable card in the shared task transcri
### User continuation after execution recovery stops
-An authenticated user message or an exact failed-run Retry can start a fresh
+An authenticated user message, a validated undelivered native message queue, or an exact failed-run Retry can start a fresh
native or legacy conversation turn once the prior execution is confirmed stopped. Retain the source history and uncertain
action outcomes; do not replay tool calls or reset the failed incident's automatic
retry budget. Existing pause, approval, budget, ownership, and dependency gates
remain in effect. See `doc/execution-semantics.md` for admission and stop-proof
requirements.
+The task recovery notice offers Retry for eligible failures and verified native
+startup cancellations, with failed attempts explained inline. Preparing native
+turns keep the Steer label. Steer and Interrupt immediately move the submitted
+messages from the composer queue into the conversation while delivery proceeds.
+Provider acknowledgement remains authoritative; failed delivery restores the
+latest queue with an inline error. Neither action produces a toast.
### Managed AI authentication
@@ -1720,6 +1765,13 @@ Legacy agents retain their authentication until validated adoption. See
[AI Connections](connections/AI-CONNECTIONS.md) for company isolation, compatible
methods, lifecycle, runtime enforcement, and migration details.
+Missing personal AI credentials detected before adapter dispatch also produce
+the inline connection card. Every missing binding must belong to the same
+compatible AI provider. The responsible user connects their own account and
+explicitly adopts Connections; another user's onboarding key is never reused.
+Acceptance resumes only the matching configuration-blocked task through durable
+continuation delivery. Unrelated configuration gaps retain operator recovery.
+
The selected AI connection supports an on-demand usage probe through the common
connection service, independent of legacy/native execution. The board usage
endpoint rechecks company membership and the credential's human audience before
@@ -1905,3 +1957,49 @@ See [Public MCP](public-mcp.md) for the implemented instance-side boundary,
configuration, plugin packages and outstanding hosted release gates. The
[delivery plan](plans/2026-09-30-paperclip-public-mcp-and-plugins.md) separates
external agent participation and granted third-party tools into later releases.
+
+The experimental OpenAI Dot Runner provider uses a separate `/mcp/runner`
+agent OAuth resource. It reuses the public gateway's browser/device consent,
+client metadata verification and signed event delivery, but requires one-use
+agent pairing and normal run admission. Personal grants cannot authorize
+Runner operations. See [OpenAI Dot Runner](openai-dot-runner.md) for the
+self-hosted release boundary and remaining account qualification.
+
+### Experimental AI connection routing
+
+Opt-in plugin routers may represent a pool as an AI runtime binding. Core keeps
+company and credential authorization, atomically records task/agent affinity and
+a pool cursor, and persists concrete native recovery evidence. The full contract
+is in [AI-CONNECTION-ROUTERS.md](connections/AI-CONNECTION-ROUTERS.md). Disabled
+routing cannot allocate new tasks; already admitted native runs remain recoverable.
+
+### Connection instructions
+
+Connections can store optional, versioned agent instructions independently of
+provider and transport. Catalog templates control editor visibility; saved
+settings and runtime delivery also support connections without a template.
+The server includes instructions only when the connection and at least one
+action are available to the run's agent and responsible identity. An immutable
+per-turn snapshot participates in session compatibility, so subsequent turns
+remove stale instructions after edits or access revocation. See
+[Connection instructions](connections/CONNECTION-INSTRUCTIONS.md) for contracts,
+UI conventions, custom adapter integration, and initial memory templates.
+
+### Native provider capacity retry
+
+Committed, run-bound Codex `serverOverloaded` terminal failures display the model
+capacity error directly and schedule at most two automatic retries, after one
+and two minutes. Retries share the execution failure budget, retain task history,
+and honor current ownership, review, governance, pause, dependency, budget, and
+cleanup gates. Restart or duplicate finalization must not create another
+successor. Permanent model/auth incompatibility and usage-limit exhaustion retain
+their existing operator recovery requirements.
+
+## Internal agent commentary
+
+`agent_commentary` stores company-scoped, attributed complaints and suggestions
+as free-form text in the instance database. Legacy agents use the default
+`complain` and `suggestion-box` runtime skills; native runs use dedicated tools
+in standard, ask, and planning modes. Submission never changes task disposition
+or routes feedback externally. See [Agent commentary](agent-commentary.md) for
+authentication, replay, document-sized limits, inspection, and deletion semantics.
diff --git a/doc/SPEC.md b/doc/SPEC.md
index 3382f5474b4..b892429d97a 100644
--- a/doc/SPEC.md
+++ b/doc/SPEC.md
@@ -21,6 +21,12 @@ A Company is a first-order object. One Paperclip instance runs multiple Companie
Every Company has a **Board** that governs high-impact decisions. The Board is the human oversight layer.
+Human invitations default to Operator, with company editing, invitations,
+connections, tools, environments, pipelines, and audit views available by
+default. Join approval and member-permission management remain separate grants.
+An inviter must hold these membership grants to invite a role that includes them.
+See [human Operator defaults](SPEC-implementation.md#91-board-auth).
+
**V1: Single human Board.** One human operator.
#### Board Approval Gates (V1)
@@ -37,6 +43,8 @@ outcome. See [the implementation contract](SPEC-implementation.md#124-connection
Model authentication failures also surface a provider-specific Connections card
on the task immediately after failure. Users can reconnect inline and resume;
legacy agents keep their authentication until an explicit, validated adoption.
+Missing personal AI credentials found before a run starts use the same card.
+The responsible user connects their own account inside the task and continues.
See [AI Connections](connections/AI-CONNECTIONS.md).
AI connections also expose an on-demand, credential-scoped usage probe. It
@@ -85,6 +93,15 @@ The Board sets Company-level budgets. The CEO can set budgets for Agents below t
Every employee is an agent. Agents are the workforce.
+### Cryptographic identity
+
+Agents have persistent Ed25519 identities, encrypted in their home instance.
+New agents receive keys during creation; existing agents receive them lazily on
+their next managed run. Agents can read their keys from the managed process
+environment, and authorized readers can view or copy the public key from the
+agent page. This does not grant external authorization or change bearer-token
+access. See [the implementation contract](AGENT-IDENTITY.md).
+
### Agent Identity (Adapter-Level)
Concepts like SOUL.md (identity/mission) and HEARTBEAT.md (loop definition) are **not part of the Paperclip protocol**. They are adapter-specific configurations. For example, an OpenClaw adapter might use SOUL.md and HEARTBEAT.md files. A Claude Code adapter might use CLAUDE.md. A bare Python script might use command-line args.
@@ -299,7 +316,7 @@ should name the rejected action and the specific restriction.
There is no separate messaging or chat system. Tasks are the communication channel. This keeps all context attached to the work it relates to and creates a natural audit trail.
-Experimental Agent Chat presents one persistent task per person and agent as a simplified conversation. Chat has a searchable secondary sidebar with agent avatars; adding an agent starts or reopens their single conversation. It retains the task composer, transcript, tools, attachments, documents, and existing Subtasks panel, with ordinary company visibility. New execution tasks are ordinary project tasks, not children of the conversation. Idle conversations wait for a message without entering execution-task work queues. Agents clarify goals here and create assigned tasks for substantial execution. `/new` resets provider context at an ordered session boundary within the same task while preserving visible history. `enableAgentChat` is disabled by default; the V1 lifecycle and rollout contract is specified in `SPEC-implementation.md`.
+Experimental Agent Chat presents one persistent task per person and agent as a simplified conversation. Chat has a searchable secondary sidebar with agent avatars that lists every eligible agent, conversations first; adding an agent starts or reopens their single conversation. It retains the task composer, transcript, tools, attachments, documents, and existing Subtasks panel, with ordinary company visibility. New execution tasks are ordinary project tasks, not children of the conversation. Idle conversations wait for a message without entering execution-task work queues. Agents clarify goals here and create assigned tasks for substantial execution. `/new` resets provider context at an ordered session boundary within the same task while preserving visible history. `enableAgentChat` is disabled by default; the V1 lifecycle and rollout contract is specified in `SPEC-implementation.md`.
### Question recipients
@@ -698,3 +715,25 @@ See [Public MCP](public-mcp.md) for the implemented instance-side boundary,
configuration, plugin packages and outstanding hosted release gates. The
[delivery plan](plans/2026-09-30-paperclip-public-mcp-and-plugins.md) separates
external agent participation and granted third-party tools into later releases.
+
+The experimental OpenAI Dot Runner provider uses a separate `/mcp/runner`
+agent OAuth resource. It reuses browser/device consent and signed event delivery
+while preserving agent pairing, normal run admission and task authority.
+Personal grants cannot authorize Runner operations. See
+[OpenAI Dot Runner](openai-dot-runner.md) for its supported release boundary.
+
+### Experimental connection routing
+
+A virtual AI connection can rotate new task/agent allocations through an
+authorized pool while preserving session affinity. Admission, credentials and
+durable recovery remain host responsibilities; policy can be supplied by an
+opt-in plugin. See [the experimental contract](connections/AI-CONNECTION-ROUTERS.md).
+
+## Internal agent commentary
+
+`agent_commentary` stores company-scoped, attributed complaints and suggestions
+as free-form text in the instance database. Legacy agents use the default
+`complain` and `suggestion-box` runtime skills; native runs use dedicated tools
+in standard, ask, and planning modes. Submission never changes task disposition
+or routes feedback externally. See [Agent commentary](agent-commentary.md) for
+authentication, replay, document-sized limits, inspection, and deletion semantics.
diff --git a/doc/adapter-model-audit-2026-10-02.md b/doc/adapter-model-audit-2026-10-02.md
new file mode 100644
index 00000000000..5c86e25bd68
--- /dev/null
+++ b/doc/adapter-model-audit-2026-10-02.md
@@ -0,0 +1,93 @@
+# Adapter model and harness audit: October 2, 2026
+
+This audit follows the [September 22, 2026 audit](adapter-model-audit-2026-09-22.md).
+It covers model selection in the coding-agent adapters and the shared harness
+pins in the runner, the provider pack, and the evaluation image. Catalog
+entries identify models; provider accounts and installed CLIs determine access.
+No agent defaults or saved model selections are migrated.
+
+## Model changes
+
+| Adapter | Changes from the audit |
+| --- | --- |
+| Codex and the Codex runner catalog | Add GPT-6.1 Sol (`gpt-6.1-sol`). Expose efforts through Ultra and Fast mode, as documented. Keep `gpt-5.6-sol` as the default. |
+| Claude on Bedrock | Add Sonnet 5.5 (`us.anthropic.claude-sonnet-5-5`), using the catalog's existing US inference-profile convention. Sonnet 5.5 IDs (direct or Bedrock-qualified) get the documented `xhigh` and `max` efforts and require Claude Code 2.1.284 or later on the CLI lane. |
+| OpenCode | Add `openai/gpt-6.1-sol` and `anthropic/claude-sonnet-5-5` to the static fallback used by remote environments. Both IDs are present in the OpenCode model registry. |
+| Claude Code (direct) | No change in this audit. [#14993](https://github.com/paperclipai/paperclip/pull/14993) (merged October 5, 2026, superseding #14816) adds Sonnet 5.5 (`claude-sonnet-5-5`, Claude Code 2.1.284 or later) and refreshes the Claude runtime. |
+| Grok Build, Gemini CLI, Kimi Code, Cursor | No new verified model IDs. Grok 4.7, Gemini 3.8 Flash, and Kimi K3 remain the newest documented models. |
+
+## Harness changes
+
+| Harness | Before | After |
+| --- | --- | --- |
+| Codex CLI (shared provider pack) | 0.156.0 | 0.160.0 |
+| OpenCode (shared provider pack) | 1.18.32 | 1.18.34 |
+| Grok CLI (`@xai-official/grok`) | 1.0.41 | 1.0.46 |
+| Gemini CLI | 0.60.0 | 0.62.0 |
+| Kimi Code CLI | 2.0.2 | 2.1.1 |
+| Cursor CLI | 2026.09.18-9a7762b | 2026.10.01-e373342 |
+| GitHub CLI | 2.101.0 | 2.102.0 |
+| Claude Agent SDK / Claude Code | 0.3.280 / 2.1.280 | 0.3.286 / 2.1.286 via #14993 (merged); this branch keeps that pin |
+| Hermes | 0.19.0 | 0.19.0 (current) |
+| ACPX, `claude-agent-acp`, `codex-acp` bridges | 0.13.1 / 0.73.0 / 1.6.2 | Unchanged; separately qualified |
+| Pi (`@earendil-works/pi-coding-agent`) | 0.87.1 (fleet image) | Unchanged; Pi 1.0 is qualified upstream in the Pi runner stack |
+
+The remote Codex compatibility window moves to `>=0.149.0 <0.161.0`. The
+minimum stays fixed. See
+[paperclip-runner-compatibility.md](architecture/paperclip-runner-compatibility.md).
+
+## Sources and verification
+
+- [OpenAI's Codex model guide](https://learn.chatgpt.com/docs/models) lists
+ GPT-6.1 Sol (`gpt-6.1-sol`) with reasoning efforts from Light to Ultra and
+ Standard and Fast modes at launch. The bundled Codex 0.160.0 model metadata
+ also contains `gpt-6.1-sol`. The same page records that `gpt-5.4` and
+ `gpt-5.4-mini` retired from Codex with ChatGPT sign-in on August 31, 2026,
+ and that `gpt-5.5` retires from Codex with ChatGPT sign-in on October 14,
+ 2026. Neither retirement applies to the OpenAI API, so the picker keeps
+ those IDs for API-key users; see "Deferred items".
+- [Codex CLI releases](https://github.com/openai/codex/releases) 0.157.0
+ through 0.160.0 add GPT-6 Sol and Luna metadata, app-server pagination, and
+ authoritative provider catalogs. The Linux x64 executable digest comes from
+ the integrity-verified `@openai/codex@0.160.0-linux-x64` archive.
+- [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview)
+ documents the Bedrock ID `anthropic.claude-sonnet-5-5` and the September 28,
+ 2026 release. The [Claude Code changelog](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md)
+ entry for 2.1.284 adds `claude-sonnet-5-5`, so that version is the CLI minimum. [Models overview](https://platform.claude.com/docs/en/about-claude/models/overview)
+ lists `xhigh` and `max` effort support for the 5.5 generation.
+- [OpenCode releases](https://github.com/anomalyco/opencode/releases)
+ 1.18.33 and 1.18.34 contain fixes only. The OpenCode model registry at
+ models.dev lists both added provider-qualified IDs.
+- Grok CLI 1.0.46 is the `latest` tag on npm. [xAI's model list](https://docs.x.ai/docs/models)
+ still ends at Grok 4.7. Gemini CLI 0.62.0 and Kimi Code 2.1.1 are the
+ `latest` tags on npm; [Google's model catalog](https://ai.google.dev/gemini-api/docs/models)
+ and [Kimi's model page](https://www.kimi.com/code/docs/en/kimi-code/models.html)
+ list no newer coding models.
+- Cursor CLI 2026.10.01-e373342 is the version the official installer
+ resolves; the pinned archive digest comes from the versioned tarball, and
+ the extracted binary reports that version. [Cursor's catalog](https://cursor.com/docs/models-and-pricing)
+ shows new Grok 4.7 500k and Kimi K3 rows without exact CLI IDs, so no
+ fallback IDs were added.
+- [GitHub CLI 2.102.0](https://github.com/cli/cli/releases/tag/v2.102.0)
+ contains security fixes for download commands. The pinned digest matches the
+ release `checksums.txt`.
+- [Hermes on PyPI](https://pypi.org/project/hermes-agent/) remains at 0.19.0.
+
+## Deferred items
+
+- `gpt-5.4` and `gpt-5.4-mini` stay in the Codex picker because the OpenAI API
+ still serves them. A later audit can remove them once API retirement is
+ published or operators confirm no API-key agents depend on them. `gpt-5.5`
+ needs the same review after October 14, 2026.
+- The ACP bridges (ACPX 0.19.4, `claude-agent-acp` 0.85.1, `codex-acp` 2.1.1)
+ are newer upstream. They carry reviewed patches and qualified executable
+ digests, so they need a separate qualification campaign rather than a pin
+ bump. ACPX 0.15.1 and 0.17.0 also change message limits and session
+ journal records.
+- Pi 1.0.0 is published, but the runner's Pi profile and the fleet image stay
+ on the qualified 0.84.2 / 0.87.1 pins until the Pi 1.0 runner stack lands.
+- The native Grok runtime (`native:grok` 1.0.13) is bound by a qualified
+ profile digest and is not refreshed by this audit.
+- Claude Mythos 5.1 remains invitation-only with no public selectable ID.
+- Cursor's exact IDs for Grok 4.7 500k, Kimi K3, and GLM 5.3 are not shown
+ in the documentation and the unauthenticated CLI returns no list.
diff --git a/doc/agent-commentary.md b/doc/agent-commentary.md
new file mode 100644
index 00000000000..2fe7ee8cdd3
--- /dev/null
+++ b/doc/agent-commentary.md
@@ -0,0 +1,155 @@
+# Agent complaints and suggestions
+
+Agents submit incidental feedback into the current instance's `agent_commentary`
+table. Complaints preserve a raw reaction; suggestions describe an improvement.
+Both are free-form, internally attributed records, not anonymous feedback.
+
+## Agent entry points
+
+Skill-capable legacy adapters automatically receive `complain` and
+`suggestion-box` alongside the `paperclip` operational skill, including existing
+agents with empty optional-skill selections. The shared helper lives in that
+operational skill at `scripts/submit-agent-commentary.mjs`. It reads the body
+from stdin and uses the existing `PAPERCLIP_API_URL`, `PAPERCLIP_API_KEY`,
+`PAPERCLIP_COMPANY_ID`, and `PAPERCLIP_RUN_ID`. The helper uses the existing
+Node.js runtime with no additional dependencies; custom runtimes can call HTTP
+directly. Sandboxed runs use the callback bridge.
+
+Native runs receive `submit_complaint({body, idempotencyKey})` and
+`submit_suggestion({body, idempotencyKey})` in standard, ask, and planning modes.
+Specialized completion-review runs retain their restricted tool set. Native
+submission uses the bound authority without a shell or API credential.
+Submit before finishing the run.
+
+Instructions closely adapt Warp's
+[complain](https://github.com/warpdotdev/common-skills/blob/main/.agents/skills/complain/SKILL.md)
+and [suggestion-box](https://github.com/warpdotdev/common-skills/blob/main/.agents/skills/suggestion-box/SKILL.md)
+skills, with their MIT notices included. Paperclip changes the transport,
+attribution, suggestion form, and size limit. Agents submit proactively when
+warranted, without routine previews or announcements, then continue working.
+Answer truthfully if a user asks about feedback or submitted content. Operators
+can exclude these legacy skills through the existing runtime skill policy.
+Brevity and at most three suggestions per run are guidance, not server quotas.
+Do not report the same incident through both paths or retry failed submissions.
+
+## HTTP contract
+
+`POST /api/companies/:companyId/agent-commentary` accepts an authenticated agent
+and its active run (`Authorization: Bearer …`, `X-Paperclip-Run-Id: …`):
+
+```json
+{"kind":"suggestion","body":"The tool returned before persistence completed. Wait for the write before returning success.","idempotencyKey":"write-completion-1"}
+```
+
+Only these three fields are accepted. Identity and the optional task reference
+are server-derived. Board callers cannot impersonate agent feedback. Native runs
+use their dedicated tools rather than this legacy HTTP path.
+
+Bodies must contain non-whitespace text and may contain up to 524,288 JavaScript
+string code units, matching ordinary issue documents. No truncation is applied.
+Existing 10 MiB HTTP and callback bridge request limits remain. Keys are nonempty
+and at most 240 characters.
+
+Creation returns HTTP 201 with `{id, kind, createdAt, replayed:false}`. Identical
+replay in the same company/run returns HTTP 200 with the same ID and timestamp
+and `replayed:true`. Conflicting key reuse returns 409. Invalid input returns 400;
+invalid authority returns 401/403; storage failure returns a sanitized 503.
+Authorization precedes replay. The helper accepts an optional second argument
+for a stable key, generating one otherwise. It makes one request with a
+10-second HTTP deadline and exits zero on failure with a content-free diagnostic.
+It never follows redirects with credentials or claims an uncertain write succeeded.
+
+## Storage and inspection
+
+Rows contain company, agent, run, nullable issue, kind, body, retry key, payload
+hash, and timestamp. Known run secrets and credential syntax are redacted before
+storage; instructions remain essential because redaction cannot guarantee
+secrecy. Writes and one content-free activity record commit together. Feedback
+bodies are excluded from HTTP diagnostics and dedicated mutation receipts.
+
+There is no feedback UI, read API, notification, automatic task creation, or
+external forwarding. This is separate from first-party Telemetry, OpenTelemetry
+Observability, and the run log. Ordinary provider transcripts can still contain
+submitted tool arguments; there is no anonymity or ephemeral-storage promise.
+
+Authorized operators inspect the instance database, for example:
+
+```sql
+SELECT id, kind, body, agent_id, run_id, issue_id, created_at
+FROM agent_commentary
+WHERE company_id = ''
+ORDER BY created_at DESC;
+```
+
+The service enforces company/run ownership. Foreign keys clear the task reference
+on task deletion and cascade deletion with its run, agent, or company. Normal
+logical database backups include these rows. No retention scheduler or backfill.
+
+## Verification
+
+Focused coverage lives in `server/src/__tests__/agent-commentary.integration.test.ts`,
+`agent-commentary-helper.test.ts`, `agent-commentary-skills.test.ts`, the shared validator tests, and the HTTP logger
+and sandbox callback bridge suites. These exercise real PostgreSQL and routes,
+atomic audit rollback, replay races, authority changes, deletion, default mounts,
+Unicode, and the exact document-body boundary.
+
+The opt-in live smoke uses existing Codex login credentials, copied to a private
+temporary home, and a disposable instance database. It calls the real legacy
+adapter and production native-session executor. It incurs normal provider usage:
+
+```sh
+node cli/node_modules/tsx/dist/cli.mjs server/scripts/verify-agent-commentary-live.ts
+```
+
+To run the same checks on real Daytona sandboxes, install the standalone
+provider's dependencies, provide its API key and an immutable image reference,
+and specify a Linux amd64 runner built from this checkout:
+
+```sh
+pnpm --dir packages/plugins/sandbox-providers/daytona install --frozen-lockfile
+PAPERCLIP_LIVE_ENVIRONMENT=daytona \
+PAPERCLIP_LIVE_DAYTONA_ENV_FILE=/path/to/private.env \
+PAPERCLIP_LIVE_LINUX_RUNNER=/path/to/linux-amd64/paperclip-runnerd \
+PAPERCLIP_LIVE_EVIDENCE_PATH=/tmp/commentary-evidence.json \
+node cli/node_modules/tsx/dist/cli.mjs server/scripts/verify-agent-commentary-live.ts
+```
+
+The private env file needs only `DAYTONA_API_KEY` and
+`PAPERCLIP_E2E_DAYTONA_IMAGE` (`...@sha256:...`). Alternatively, export those
+variables directly. A positional `legacy` or `native` argument selects one path.
+For a current Linux runner, add an export stage to a temporary copy of the root
+Dockerfile and build it with `--platform linux/amd64 --target commentary-runner-export
+--output type=local,dest=/tmp/commentary-runner-linux`:
+
+```dockerfile
+FROM scratch AS commentary-runner-export
+COPY --from=runner-build /app/packages/paperclip-runner/runner/target/release/paperclip-runnerd /paperclip-runnerd
+```
+
+The smoke calls the production Daytona provider hooks for creation, execution,
+file transfer, private ingress, and confirmed deletion. Legacy feedback crosses
+the sandbox queue callback bridge. Native feedback crosses the runner's private
+WebSocket and live tool authority. The current Linux runner is staged and
+verified independently of the base image. Fixture setup creates authority;
+the real agent submits all feedback. This is a focused feedback transport smoke,
+not a full Runner E2E catalog qualification or browser onboarding test.
+
+Both paths passed locally and on Daytona on 2026-10-06. Each persisted one complaint and one suggestion
+with company, agent, run, and task attribution; each then wrote the continuation
+marker. Both exited zero, left task status unchanged, created no task comments,
+and recorded two content-free activity entries. The script emits the attributed
+row IDs and timestamps as evidence, optionally saves a JSON report, and deletes
+its temporary data, credentials, and remote sandboxes. Remote reports are emitted
+only after confirmed sandbox deletion.
+
+The Daytona verification used base image
+`ghcr.io/paperclipai/paperclip-daytona-runner@sha256:b81a86d5242088f9d832666a411f09da7438d92e99f9962ccf88ebe439cd3b32`
+and the Linux runner built from `abf47b5953d14aa7a8dbf2941460b5df8a4d66c3`
+(binary SHA-256 `c794141152ae2e2986da0df14b01a54e4448949e06ec4031c83bad8a9fff8bac`).
+
+| Environment | Runner | Complaint row | Suggestion row | Submitted at (UTC) |
+| --- | --- | --- | --- | --- |
+| Local | Legacy Codex | `59413a00-1de2-4bb1-bcc6-9c4b54c64aa6` | `3db2364d-3e15-4f47-846f-875d3902999d` | 20:35:10 |
+| Local | Native Codex | `5da22b5f-41df-4de5-8ba0-d9345ab01267` | `2d5abe17-dd41-403c-a5ee-4729f2d58921` | 20:35:26–20:35:27 |
+| Daytona | Legacy Codex | `27c9d0aa-8477-409f-9da0-e8ffa48dee50` | `209681c9-d1e9-4ce1-999e-48fa07692389` | 20:33:07–20:33:09 |
+| Daytona | Native Codex | `6eb001bb-4bcf-43f7-8717-f662f53dc7c3` | `77c383d8-a997-49e5-a33e-25c70e15c0b2` | 20:31:54 |
diff --git a/doc/agent-files.md b/doc/agent-files.md
index 2cfd67c668a..a4154551f19 100644
--- a/doc/agent-files.md
+++ b/doc/agent-files.md
@@ -180,6 +180,12 @@ unavailable local copy can still contain uncollected edits; this cleanup path
preserves those bytes even if local stop proof arrives later.
Deferred cleanup retries after a
delay so one blocked copy does not prevent other copies from being cleaned.
+If releasing a run's instruction copy fails, the run records a cleanup warning
+and leaves the durable copy for the recovery sweep. Cleanup does not replace the
+provider's result, discard usage accounting, or prevent environment lease release.
+It does not claim that unsaved agent-file changes were saved; collection failures
+keep their separate failed-save receipts. A run attempts failed cleanup only once
+before handing it to recovery, rather than repeating the lock wait in teardown.
Re-preparing an existing run uses the same lock as cleanup and rechecks its
receipt under that lock. Preparing a new run keeps its separate admission path.
Missing stop proof or lost remote bytes produce a visible diagnostic, never a
diff --git a/doc/agent-permission-defaults.md b/doc/agent-permission-defaults.md
new file mode 100644
index 00000000000..49ee70192f1
--- /dev/null
+++ b/doc/agent-permission-defaults.md
@@ -0,0 +1,31 @@
+# Agent permission defaults
+
+This document describes the server defaults for an ordinary, standard trust agent. An agent must belong to the same company and be active where the action requires active membership. A responsible user's authority, project or run trust policy, scope rules, and approval gates can narrow these defaults.
+
+## Granted by default
+
+| Capability | Source and limit |
+| --- | --- |
+| Agent configuration and suggestions | New standard agents receive direct, company-scoped `agents:configure` and `agents:suggest-changes` grants. Protected-change and responsible-user checks still apply. |
+| Skill changes | New standard agents receive direct `skills:create` and `skills:suggest-changes` grants. |
+| Tool access and management | New standard agents receive `tools:manage_connections`, `tools:manage_profiles`, `tools:view_audit`, `tools:use`, and `tools:manage_runtime` grants. Tool, connection, profile, and runtime policy checks still apply. |
+| Audit and inbox | New standard agents receive `audit:view_agent_actions` and `inbox:manage` grants. The default inbox grant is limited to the responsible-user path and still follows that user's inbox policy. Cross-user management requires a separately configured grant or the target user's saved consent policy. |
+| Task assignment and checkout control | New standard agents receive `tasks:assign`, `tasks:assign_scope`, and `tasks:manage_active_checkouts` grants, subject to company and route checks. The `tasks:assign_scope` grant covers the new agent's own reporting subtree; an explicit invitation scope is preserved. |
+| Agent creation | New standard agents have `canCreateAgents: true`. This is a legacy authorization path for `agents:create`, not an `agents:create` grant row. Stored legacy records without the flag stay closed. |
+| Skill creation setting | `canCreateSkills: true` is the normalized setting. Protected skill configuration changes still require a direct `skills:create` grant or a consented `skills:suggest-changes` grant. |
+| Same-company visibility and work | Standard agents can read same-company agents, projects, issues, and company scope; read and manage decision queues; read runtime and secret metadata where the route allows it; comment or mutate their own or unassigned issues; and assign tasks under the assignment policy. The route and resource checks still apply. |
+| Own configuration and wake | An agent can read its own configuration, update unprotected parts of it, and wake itself. Protected changes still require the relevant grant. |
+
+## Not granted by default
+
+These permission keys have no blanket grant for new standard agents: `agents:create` (the flag above is separate), `environments:manage`, `tools:admin`, `users:invite`, `users:manage_permissions`, `pipelines:write`, and `joins:approve`. Existing agents keep their current permissions. The defaults above apply when a new standard agent is created or a pending new hire is activated. Some actions have separate bounded paths; the absence of a grant row does not describe every route decision.
+
+The new direct grants do not grant company administration, user permission management, blanket tool administration, or cross-company access. The responsible user's permissions, route checks, and the normal approval gates still apply.
+
+Agent-authenticated callers cannot set process adapter configuration or switch an existing agent onto the process adapter. For local adapters, they cannot change host command, argument, working-directory, arbitrary environment, or filesystem sandbox command settings. Provider credential secret references on known environment keys remain allowed so agents can hire peers with their own credentials. When a caller uses an AI connection pool, a new peer can use a plain provider authentication override on the small allowlist of supported keys. Arbitrary environment keys remain blocked. The same limits apply to creation, hiring, adapter switches, and configuration rollback. They also cannot restore host-executed workspace commands through a configuration revision. This keeps host-executed commands under board control while standard agents configure other supported agent settings.
+
+## Exceptions and rollout
+
+The new direct grants are withheld from low trust agents and managed built-in agents. Low trust run or project policies can also deny privileged actions even if an agent has a grant. There is no permission backfill or upgrade migration for existing agents. A standard pending new hire receives the new default set when approved and activated. Invitation approval retains the set when it replaces a new agent's grants and preserves any explicitly scoped default grant. Existing scoped grants stay unchanged. A grant removed by an operator stays removed; ordinary updates and startup do not reapply it.
+
+The standard agent configuration default supports the agent setup in the linked runner task. Enabling a warm runtime can still depend on the target agent's adapter and runtime configuration, provider availability, and any responsible-user or approval checks.
diff --git a/doc/architecture/paperclip-runner-compatibility.md b/doc/architecture/paperclip-runner-compatibility.md
index effabc1eba4..d148a7dc754 100644
--- a/doc/architecture/paperclip-runner-compatibility.md
+++ b/doc/architecture/paperclip-runner-compatibility.md
@@ -46,15 +46,15 @@ would hide the runtime that executed the task.
## Remote Codex version window
-Remote native Codex runs accept stable CLI versions **`>=0.149.0 <0.157.0`**.
-The install pin remains `0.156.0`. A sandbox image can therefore use an older
+Remote native Codex runs accept stable CLI versions **`>=0.149.0 <0.161.0`**.
+The install pin is `0.160.0`. A sandbox image can therefore use an older
compatible Codex without failing startup or installing another copy.
The minimum is fixed at **`0.149.0`** until maintainers deliberately change it.
It is not a rolling one-month support window. The official
[`@openai/codex` publication history](https://registry.npmjs.org/@openai/codex)
-records `0.149.0` on 2026-08-20, `0.153.4` on 2026-09-04, and `0.156.0` on
-2026-09-22. See also the [Codex changelog](https://learn.chatgpt.com/docs/changelog).
+records `0.149.0` on 2026-08-20, `0.153.4` on 2026-09-04, `0.156.0` on
+2026-09-22, and `0.160.0` on 2026-10-01. See also the [Codex changelog](https://learn.chatgpt.com/docs/changelog).
This is an explicit compatibility window, not a claim that every Codex minor
release follows a backward-compatible protocol.
@@ -65,7 +65,7 @@ release follows a backward-compatible protocol.
- The same check applies to discovered, explicitly staged, and npm-installed
remote Codex executables, including the final executable after linking.
- For an incompatible image, the existing
- `PAPERCLIP_RUNNER_REMOTE_CODEX_NPM_SPEC=@openai/codex@0.156.0` configuration
+ `PAPERCLIP_RUNNER_REMOTE_CODEX_NPM_SPEC=@openai/codex@0.160.0` configuration
allows installation of the pinned runtime. Without that configuration,
startup reports the supported range and the remediation.
- Runner binary contracts, required runner capabilities, artifact digests,
@@ -85,6 +85,12 @@ app-server binaries with a local deterministic Responses API fixture. Both
passed initialization, thread creation with a dynamic tool, a tool-call/result
round trip, turn completion, and thread resume. This verifies the tested
protocol path; it is not a live model, Linux sandbox, or exhaustive feature test.
+The 2026-10-02 refresh moved the install pin and the upper bound to `0.160.0`
+after verifying the integrity-checked Linux x64 `0.160.0` executable digest and
+the installed ACP package contract. Codex `0.157.0` through `0.160.0` add the
+GPT-6.1 Sol catalog entry and app-server pagination without a documented
+app-server protocol break; the Linux CI qualification workflow covers the real
+startup and session-resume probes for the new pin.
Version-boundary and remote artifact-preparation regressions are covered by
`codex-runtime-compatibility.test.ts` and `native-session-executor.test.ts`.
diff --git a/doc/architecture/paperclip-runner-daytona-networking.md b/doc/architecture/paperclip-runner-daytona-networking.md
index 769206bff82..8ab0f2a3dc2 100644
--- a/doc/architecture/paperclip-runner-daytona-networking.md
+++ b/doc/architecture/paperclip-runner-daytona-networking.md
@@ -21,7 +21,7 @@ The PRP identity binds company, issue, agent, run, environment lease, runner ins
- Allow the sandbox outbound access only to destinations explicitly required by the provider runtime.
- Use Daytona's `wss://` preview URL with normal certificate and hostname validation. The preview token is sent only as the `X-Daytona-Preview-Token` header by Paperclip.
- Runnerd rejects public plaintext `ws://` destinations. Public dial targets require `wss://` with hostname validation and either the platform trust store or an explicitly staged private CA bundle.
-- Listener mode binds only `0.0.0.0:43127`, accepts only the run-specific `/api/runner/v1/connect/:runId` path, and rejects WebSocket extension negotiation. PRP authentication and application-layer secure frames remain mandatory above the preview-proxy hop.
+- Listener mode binds only `0.0.0.0`. The optional `--listen-port` selects a port in `1..=65535` and defaults to `43127`. The listener accepts only the run-specific `/api/runner/v1/connect/:runId` path and rejects WebSocket extension negotiation. PRP authentication and application-layer secure frames remain mandatory above the preview-proxy hop.
- Do not put the bootstrap ticket in argv, files, provider environment, logs, or model context. Inject it into runnerd's initial environment/secret channel; runnerd already removes it from its environment immediately.
- Runnerd is the only process allowed to reach PRP. The provider communicates with runnerd over inherited pipes.
diff --git a/doc/connections/AI-CONNECTION-ROUTERS.md b/doc/connections/AI-CONNECTION-ROUTERS.md
new file mode 100644
index 00000000000..06f092c556f
--- /dev/null
+++ b/doc/connections/AI-CONNECTION-ROUTERS.md
@@ -0,0 +1,133 @@
+# Experimental AI connection routers
+
+AI routers are virtual, company-scoped connections owned by a capability-gated
+plugin (`ai.connections.route`). The instance flag `enableAiConnectionRouters`
+defaults to false. Pools also default to disabled. The host must implement this
+contract; the plugin's minimum version alone does not establish compatibility.
+Routing has no visible enable control in Experimental settings on either
+self-hosted or Cloud instances, even after an operator enables it. Self-hosted
+operators can set `enableAiConnectionRouters` through the instance-admin
+`PATCH /api/instance/settings/experimental` API. Cloud operators use the existing
+fleet or per-stack managed feature configuration. Installing a plugin does not
+enable routing; enabling routing does not enable individual pools.
+
+The host authorizes members using the ordinary company, user, sharing, install,
+health and harness checks. Saving a binding or changing its harness requires
+at least one usable member for that agent. New-agent creation installs only
+members authorized by the ordinary personal-owner or shared-install policy,
+in the same transaction as the agent. Pool membership cannot install a
+restricted shared connection. It sends authorized metadata and sanitized usage
+observations to `onRouteAiConnection`. The plugin proposes an opaque member ID;
+it cannot receive credentials or expand authorization. Pure round robin does
+not probe usage. Usage-aware selection has a shared 15-second probe budget,
+60-second freshness cache and ordinary grant/secret freshness invalidation.
+Concurrent starts share an in-flight probe for the same grant and credential
+freshness. Each caller retains its selection deadline.
+
+One cursor spans all agents in a pool. An allocation transaction locks the
+cursor, checks config and cursor revisions, rechecks authorization, and writes
+the task pin and cursor advance together. Pins use company, pool, agent and the
+existing task key (including `__heartbeat__`). Wakes without a task key retain
+the original run ID as an affinity key in retry context. Conflicts retry at most
+20 times; contention beyond that returns an actionable conflict.
+
+Pins snapshot the concrete binding and member profile. Removing or editing a
+member affects future allocations. Composer changes can change a supported
+model or effort, with a note on fallback, but never the account or harness.
+Session reset and compaction retain the pin. Revocation requires operator repair.
+Authentication repair uses the failed run’s durable concrete allocation and
+current member permissions; reconnect-and-continue preserves the agent’s pool
+binding. Changing the agent’s pool invalidates the old repair card.
+A pre-existing managed session can adopt its saved account when it is an
+eligible member; otherwise the operator must explicitly reset the session.
+
+Credential `ai_session_epoch` changes on reconnect or manual rotation. Only
+verified runtime refresh write-back preserves it. Session fingerprints use the
+secret ID and epoch while authentication failure attribution still uses the
+token generation. A reconnect that replaces an indexed legacy secret changes
+the session identity even when both secret epochs are zero.
+Adopting a valid account preserves a session only when the complete effective
+configuration matches a prior fingerprint. Core can bridge binding-only agent
+revisions (up to 20) and unchanged legacy token identities at epoch zero. Changes
+to other settings, explicit resets, and credential replacement retain their
+existing reset behavior; no fingerprint category is exempted.
+Native recovery retains concrete routing evidence and can finish after the
+router flag or plugin is disabled or uninstalled; it revalidates underlying
+account access and never makes a new allocation.
+
+The private Cloud plugin owns round-robin and quota policy. Its manifest declares
+`aiConnectionRouter: { name, description }` alongside `ai.connections.route`.
+Core adds that connector to the regular catalog and hosts its setup and account
+management using authenticated, company-scoped pool APIs. No separate plugin
+page or sidebar entry is needed. New allocations over
+the chosen threshold wait; known exhaustion defers pinned turns. The deferred
+run schedules `ai_connection_pool_wait` without spending the failure retry
+budget, and the UI labels that retry as **Pool exhausted**.
+
+Operators choose **Connectors → AI connection pool → Add connection pool**,
+select existing accounts, arrange their order, and create a paused connection.
+The normal account page supports rename, member changes, enabling, and removal.
+**Used by** lists the company’s non-terminated agents configured to use the pool,
+with their avatars and links to their profiles. Paused agents remain listed.
+Optional usage and runtime defaults live under **Advanced**. Creating another
+account opens the normal catalog in a new tab so the pool draft stays intact.
+The catalog marks experimental-disabled or unavailable plugins as unavailable.
+
+Deletion uses
+`DELETE /api/companies/:companyId/ai-connection-pools/:poolId` with the current
+`expectedRevision`. Core disables and archives the virtual connection, retaining
+its task pins, cursor and run records. It rejects stale edits and new allocations;
+already admitted runs keep their concrete recovery evidence. Cleanup remains
+available when experimental routing or the plugin is disabled. The catalog captures the reviewed pool revision before showing its removal
+confirmation and uses the pool endpoint. Ordinary connection update and removal
+endpoints reject pools so they cannot bypass configuration revisions. Non-managers
+see the permission requirement without making a denied management request.
+
+Configuration and committed selection are recorded in activity records. Runs
+record the selected member/profile and override notes in the local run log and
+recovery context. These records stay in the instance database.
+
+Tests: `cd server && pnpm exec vitest run src/__tests__/ai-connection-router.test.ts`
+plus the existing AI connection, retry accounting, run-dispatch and UI suites.
+
+## UI review in Storybook
+
+Run `pnpm --filter @paperclipai/ui storybook` from Core, then open
+**AI Connections / Connection pools**. The 16 stories use production components
+for pool selection, legacy-session adoption, unavailable/read-only selections,
+mixed-provider composer models and effort, mobile composer settings, usage waits,
+run selections and override notes, and scheduled retries.
+`AllCoreSurfaces` provides an overview; individual stories expose the expanded
+menus and adoption dialog. Run `pnpm --filter @paperclipai/ui build-storybook`
+to build the preview.
+
+Pool configuration stories belong to the private Cloud plugin's own Storybook
+in `extensions/plugin-connection-pool/storybook/`. Both previews use fictional
+accounts; they do not call live providers or mutate a Paperclip instance.
+Core also owns **Connectors / Pool host** stories for the generic native
+extension. The overview links to Cloud's **In Connectors** preview on port 6010;
+its stories mount these same production routes, header, sidebar and tokens.
+**Full Setup And Management** exercises the complete catalog-to-pool journey.
+Both previews include **Operator Setup Required** for a manually disabled host.
+
+## Full-app browser acceptance
+
+Install the compatible plugin into an isolated, loopback `local_trusted` instance,
+enable the experimental flag, and use a company named for an E2E or test drive
+with two saved, authorized AI accounts. Run:
+
+```sh
+PAPERCLIP_CONNECTION_POOL_E2E=1 \
+AI_CONNECTIONS_TEST_URL=http://127.0.0.1:3100 \
+AI_CONNECTIONS_TEST_COMPANY_ID= \
+pnpm exec playwright test --config tests/ai-connections-app/playwright.config.ts connection-pools.spec.ts
+```
+
+These opt-in tests exercise the shipped app, installed plugin and database without
+mocking browser routes or pool APIs. They cover catalog navigation, setup, ordering,
+paused defaults, rename, member changes, refresh persistence, stale edits and
+removal. They verify that an operator-enabled host still offers no Experimental
+control for routing. With a test agent already bound to a saved pool, they also verify
+the **Used by** list, avatars and profile links. Cleanup archives only the test's own pool and verifies that existing
+accounts and pools remain intact. This suite does not execute agents or probe
+live usage; provider and restart acceptance remain separate gated test drives.
diff --git a/doc/connections/AI-CONNECTIONS.md b/doc/connections/AI-CONNECTIONS.md
index d31ce5fea97..2e74412af1b 100644
--- a/doc/connections/AI-CONNECTIONS.md
+++ b/doc/connections/AI-CONNECTIONS.md
@@ -10,6 +10,11 @@ homes. Managed default/shared accounts are additional choices in that same
selector. Selecting “Sign in to another account” survives background refreshes;
Claude authorization paste keeps upstream's immediate Connecting feedback.
+New-agent Connect offers three persistent tiles: the provider's subscription,
+the provider's API key, and Advanced. All three stay visible while the selected
+mode's form is shown below. Advanced opens the existing compatible-connection
+picker and provider setup. Execution environment selection lives in Configure.
+
Storybook's simulated controllers and page annotations do not run in the app.
## Compatibility and selection
@@ -20,16 +25,17 @@ The shared `AI_CONNECTION_CAPABILITIES` contract defines these combinations:
| --- | --- | --- |
| Claude / Anthropic | Claude subscription token or Anthropic API key | Claude |
| OpenAI | ChatGPT/Codex subscription or OpenAI API key | Codex |
-| OpenRouter | API key | OpenCode, with an `openrouter/` model |
+| OpenRouter (legacy, no routing metadata) | API key | OpenCode, with an `openrouter/` model |
+| Google | API key | Gemini CLI |
| Grok / xAI | Grok subscription or xAI API key | Grok |
Native runner supports the corresponding existing Codex, OpenCode, and Claude
ACP profiles. Connections creation and reconnect mount `AgentProviderConnection`,
the same provider tiles, method controls, API entry, and `AdapterLoginPanel` used
by agent setup. Supported sandbox environments use onboarding's existing browser
-sign-in controllers. Self-hosted installations use the shared terminal sign-in
-instructions described below and require no sandbox. Environment selection does
-not change agent execution settings.
+sign-in controllers. Self-hosted Claude and Codex installations use the same
+browser sign-in presentation with a local login runner and require no sandbox.
+Environment selection does not change agent execution settings.
API keys are validated against fixed provider endpoints; redirects
and caller-supplied validation URLs are rejected.
@@ -38,9 +44,9 @@ and caller-supplied validation URLs are rejected.
- `responsible_user`: resolve the run's responsible user's personal provider default, using that account's subscription or API key. The `method` hint does not restrict the responsible user's account.
- `shared`: use the named `connectionId` and `grantId`, with audience and agent
access checks.
-- `delegated`: retained only to read legacy bindings. It cannot bypass human
- access; a personal credential remains available only for its owner's tasks.
- New configuration offers personal defaults or shared accounts.
+- `delegated`: an explicit personal account selection (the wire name is retained
+ for compatibility). It cannot bypass human access; a personal credential
+ remains available only for its owner’s tasks.
“Which humans can use this credential?” is the sole permission for whose work
can use the account. “Just me” means the personal owner; shared accounts allow
@@ -48,7 +54,8 @@ selected company members or every company member. The separate agent-access
setting determines which agents can use it. There is no additional AI agent
authorization, and old delegation records do not override the human audience.
-A connection choice never changes the harness, model, or provider routing.
+A connection choice never changes the harness or model. For a routed connection,
+the selected connection owns its provider routing.
Changing those separately may make a binding incompatible; saving then requires
a compatible choice. Agent configuration cannot grant access to another account.
@@ -230,6 +237,17 @@ repairs the connection. Unsupported providers and failures that could not create
a card retain their existing recovery path. Tool permission errors and provider quota failures do not
request model authentication.
+Pre-dispatch `configuration_incomplete` failures also show this card when every
+missing binding is a personal `user_secret_ref` for the same compatible AI
+provider. This includes a teammate who has no value for an onboarding
+`ANTHROPIC_API_KEY` definition. The card asks that person to connect their own
+account. It does not use another teammate's secret. Mixed gaps, company secrets,
+and unrelated tool credentials keep the existing operator recovery path.
+After explicit, validated adoption, the durable delivery reopens only the
+blocked task whose latest failure and active configuration recovery still match
+the card. A newer failure, reassignment, manual hold, or restricted external chat
+does not resume through an old card.
+
An attributed managed credential is marked as needing reauthorization only if
its stored generation still matches the failed run. Late failures cannot
invalidate a refreshed or reconnected credential. Repair preserves the selected
@@ -374,19 +392,16 @@ the server preserves the managed binding and will not restore legacy fallback.
Local installations do not need a sandbox to connect a subscription. Connections,
onboarding, and agent setup share `LocalProviderLoginInstructions` and
-`useLocalAiLogin`. In local-trusted mode, Claude checks the operator’s existing
-Claude Code login. Authenticated self-hosted users instead get a separate
-`CLAUDE_CONFIG_DIR` for `claude auth login`; checking and saving only read that
-attempt’s credential files, never the server operator’s account or Keychain.
-
-Codex and Grok start a separate terminal sign-in for each connection or reconnect.
-The shared component shows a server-generated command with a fresh `CODEX_HOME`
-or `GROK_HOME`. Codex uses file credential storage in that home and `login --device-auth`, so
-signing in from another computer does not depend on a localhost callback. The home is never
-seeded with the operator's existing login: copying a rotating refresh token would
+`useLocalAiLogin`. Claude and Codex start a local provider process behind the
+browser sign-in card. Claude accepts the authorization code in that card; Codex
+displays its device code there. The user does not run a shell command. Each
+local runner requires Python 3 for its pseudo-terminal (included in the Docker
+image) and the corresponding provider CLI on the Paperclip host. Each
+attempt retains a private credential home. The home is never seeded with the
+operator's existing login: copying a rotating refresh token would
allow managed runs to invalidate credentials still used by legacy agents or the
-operator's terminal. The user completes browser sign-in from that command, then
-clicks Connect. This does not require a sandbox or change the host login.
+operator's terminal. The user completes browser sign-in, then clicks Connect.
+Grok retains its terminal sign-in flow until it has a local browser login runner.
Attempts reuse `adapter_auth_sessions`, binding company, owner, provider, access
intent, reconnect target, and a 30-minute expiry. Validation and completion are
@@ -399,8 +414,7 @@ subsequently update only that grant. Reconnect preserves IDs and access settings
Starting an isolated attempt requires normal company-scoped AI-connection creation
permission. Checks, completion, cancellation, and resumption are owner-bound.
Authenticated users cannot import host credentials or use another user’s attempt.
-Claude Keychain reads remain limited to the explicit local-trusted default-home import. A failed verification creates
-no healthy connection. Preview-era Codex/Grok managed connections without the
+A failed verification creates no healthy connection. Preview-era Codex/Grok managed connections without the
isolated-subscription marker require reconnect before another managed execution;
unmanaged legacy agents retain their existing authentication paths.
@@ -439,16 +453,13 @@ authentication with a live account.
Local subscription screens share the same credential check on entry and when the
window regains focus. Waiting screens also poll until sign-in verifies. A successful
check shows the account is signed in; only **Connect** creates or reconnects the grant.
-In local-trusted mode, Claude checks the local operator’s Claude Code login.
-Authenticated Claude users, plus all Codex and Grok users, check only their
-connection-specific login home. The health response selects credential isolation,
-not whether a self-hosted user may sign in.
+Claude, Codex, and Grok check only their connection-specific login home. The
+health response selects whether a self-hosted user may sign in.
Leaving and returning to a local sign-in screen resumes its active attempt. Navigation
-does not delete a directory referenced by a copied command. **Start sign-in again**
+does not delete its credential home. **Start sign-in again**
explicitly cancels the old attempt; abandoned attempts expire after 30 minutes.
-Commands create their directory if necessary, and completed/expired attempts are
-cleaned up through the existing lifecycle.
+Completed and expired attempts are cleaned up through the existing lifecycle.
### Disposable live inline-repair test
@@ -463,7 +474,7 @@ provider key with `AI_REPAIR_TEST_KEY`. The test verifies these boundaries befor
revoking credentials or submitting work. Delete the disposable instance and revoke
its provider key after the test; failed tests may leave a paused task for inspection.
-Authenticated public deployments must configure a trusted runtime host (`PAPERCLIP_TRUSTED_MCP_RUNTIME_HOST` or `PAPERCLIP_TOOL_RUNTIME_TRUSTED_HOST`) before offering server-host subscription login, matching the local stdio runtime boundary. Health reports this capability so setup can offer a supported environment or API key instead of an unusable terminal command. Private authenticated self-hosted instances support isolated local login without that extra setting. Isolated Claude credential files must be private, owned by the server user, bounded, and free of symlinks.
+Authenticated public deployments must configure a trusted runtime host (`PAPERCLIP_TRUSTED_MCP_RUNTIME_HOST` or `PAPERCLIP_TOOL_RUNTIME_TRUSTED_HOST`) before offering server-host subscription login, matching the local stdio runtime boundary. Health reports this capability so setup can offer a supported environment or API key when local sign-in is unavailable. Private authenticated self-hosted instances support isolated local login without that extra setting. Isolated Claude credential files must be private, owned by the server user, bounded, and free of symlinks.
### Hiring and delegated work
@@ -512,3 +523,152 @@ identity, a different grant or responsible user, or a changed credential generat
requires a fresh session. The metadata is removed before passing session params
to an adapter. Temporary authentication-home paths do not change the configuration
fingerprint. These checks do not relax current connection authorization.
+
+
+## Advanced provider routing (2026-10-02)
+
+Use the regular rows on **Connectors** to add OpenRouter, Amazon Bedrock,
+Google Gemini, a Responses API, Messages API, Chat Completions API, or local
+endpoint connection. Each row has its own Connect action and saved accounts.
+The catalog tags these entries `model-provider`; no category UI is shown.
+Responses-compatible gateways such as Emissary use the Responses API row.
+The native subscription/API-key onboarding remains the default. Provider choices
+show the existing local brand artwork and reuse the existing access step. Custom
+URLs, protocol, AWS region, and credential fields appear only after choosing the
+corresponding connector. New connections default to everyone in the organization
+and all agents when the actor has permission; the existing Advanced disclosure
+contains the controls to narrow access, without a separate Access step. New-agent setup also offers the connection picker in its persistent
+**Advanced / Custom Gateway** tile.
+
+At **Agents → [agent] → Harness / Runtime**, **Connection** is a dropdown of
+compatible saved connections, including explicit personal accounts. The existing
+model picker uses that connection’s optional model IDs and accepts manual IDs.
+Changing connections preserves the model for explicit review. URLs and
+credentials belong to the connection; the model belongs to the agent.
+
+| Harness | Implemented managed routes |
+| --- | --- |
+| Codex legacy and Codex New Runner (app-server) | OpenRouter; custom/local OpenAI Responses endpoints |
+| Claude legacy and Claude New Runner (ACPX) | OpenRouter; custom/local Anthropic Messages; Bedrock API key |
+| OpenCode legacy and New Runner | OpenRouter; custom/local Chat Completions |
+| Hermes local | OpenRouter; custom/local Chat Completions |
+| Gemini CLI, Grok | Their native API connections; custom routes are not advertised |
+
+Migration `0306` adds Google to both account-default provider constraints. Local
+Gemini connections seed the API-key auth choice in their disposable home before
+environment probes and task execution. The settings file contains no credential.
+
+OpenClaw Gateway, Hermes Gateway, Claude Managed, AWS AgentCore, Process, HTTP,
+and legacy `acpx_local` are excluded: external agents retain their own model
+configuration, and `acpx_local` is retired. Cursor/Pi/Copilot custom routing,
+Vertex, ambient AWS identity, arbitrary authentication headers, and automatic
+catalog discovery for custom gateways are not part of this implementation.
+
+OpenRouter connections without an explicit model list automatically load its public
+[model catalog](https://openrouter.ai/docs/api/api-reference/models/list-all-models-and-their-properties),
+ordered with `sort=most-popular`. New-agent setup and agent settings share this
+discovery path, preserve the provider's ordering, and adapt model IDs to the selected
+harness. Explicit connection model lists take precedence. Catalog discovery sends
+no credentials; a failed request offers refresh and manual model entry.
+
+`config.ai.routing` stores only kind, protocol, URL, auth method, region, and
+optional model IDs/labels. The vault stores provider API keys, including Bedrock API keys.
+Fixed bindings contain only connection/grant identity. The server checks actual
+connection metadata, company, owner/audience, installation, status, and protocol
+before resolving secrets. Advanced connections cannot silently become native
+personal defaults. Reconnect replaces credentials and preserves destination;
+changing destination requires a separate connection. Credentials are never
+submitted to a new URL as part of reconnect.
+
+Native OpenCode custom gateways keep the reusable key in the runner process.
+The harness configuration contains a session-scoped loopback capability, limited
+to the configured model's Chat Completions endpoint. Streaming and provider error
+status are preserved; redirects are rejected. Closing or failing the harness
+revokes the capability and aborts outstanding requests. Upstream requests use
+session-local Node HTTP/HTTPS agents with the runtime's HTTP_PROXY, HTTPS_PROXY,
+ALL_PROXY fallback, NO_PROXY bypasses, and SSL_CERT_FILE/SSL_CERT_DIR trust. The
+harness bypasses outgoing proxies for loopback broker/MCP calls. This bounds key exposure
+from shell tools reading the configuration; it is not an OS isolation boundary
+against a process debugger running as the runner user.
+
+Only fixed official provider endpoints receive control-plane key checks. Custom
+endpoints and Bedrock are exercised by the selected harness in the selected
+execution environment, through **Run test**. Saving a custom connection records
+configuration; it is not proof that the model can respond. HTTPS is required for
+remote URLs; loopback endpoints may use HTTP. Localhost refers to the agent’s
+execution environment, including when it is a sandbox. URLs cannot contain user
+credentials, query parameters, or fragments.
+
+Managed Grok uses a disposable runtime home. Paperclip does not retain or restore
+Grok transcript files into host temporary directories: private file modes do not
+isolate agents running as the same OS user. Archives from earlier development
+builds are ignored. Provider session metadata still saves normally. If the selected
+session has no history in its current execution environment, Grok starts a fresh
+session with the Paperclip task handoff rather than attempting remote subscription
+recovery. Transcript continuation requires an isolated provider history solution
+and is not qualified by this change.
+
+Runtime projection clears alternate provider credentials and routing overrides,
+uses disposable homes, and never falls back to host authentication. Codex probes
+retain the selected provider home. The new runner copies only the validated
+Paperclip provider stanza into its isolated Codex home, preserves its own tool
+and sandbox policy, and disables shell snapshots. TypeScript and Rust launch
+boundaries explicitly allow only the corresponding provider credential and
+routing fields. Keys remain outside model-issued command environments on the
+new Codex runner. Hermes custom endpoints use an isolated `config.yaml` with an
+environment reference for the key.
+
+Primary configuration references consulted:
+[Codex custom providers](https://developers.openai.com/codex/config-advanced/),
+[OpenRouter Codex](https://openrouter.ai/docs/cookbook/coding-agents/codex-cli),
+[OpenRouter Claude](https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration),
+[Claude gateways](https://code.claude.com/docs/en/llm-gateway),
+[Claude Bedrock](https://code.claude.com/docs/en/amazon-bedrock),
+[OpenCode providers](https://opencode.ai/docs/providers/), and
+[Hermes providers](https://hermes-agent.nousresearch.com/docs/integrations/providers).
+
+Validation includes negative company/owner/revocation/protocol checks, no-auth
+vault behavior, immutable reconnect destinations, credential projection, Codex
+probe isolation, and new-runner home/environment boundaries. The isolated local
+test-drive exercised live OpenRouter requests using the Codex and Claude CLI
+probes, then completed real tasks using Codex, Claude, and OpenCode New Runner.
+The app walkthrough verified connection selection, saving, and completed tasks.
+A follow-up Codex/OpenRouter acceptance test ran a shell calculation, completed
+the task, then resumed from a new user message and completed a second shell
+calculation with the prior context. Reconnect coverage round-trips routing
+through PostgreSQL JSONB and verifies that credential rotation retains identity
+and agent access.
+General AWS access keys are not accepted or forwarded to Claude; use a Bedrock
+API key. Support for AWS roles requires a credential broker before it can ship.
+The initial OpenCode tool-use check was denied terminal access. The native driver
+now includes the assigned workspace and its canonical path in the allowed
+directories while preserving the configured tool policy. Subsequent local
+qualification verified tool use and follow-up on the affected OpenCode route.
+Live Bedrock verification subsequently passed with a short-lived Bedrock API key,
+region `us-east-1`, and `us.anthropic.claude-sonnet-4-6`. The saved connection
+passed **Run test**. Claude legacy and Claude New Runner each ran a terminal
+calculation, completed the task, and ran a context-dependent follow-up. Actual
+tool output was verified for all four successful runs. Private gateways still
+have deterministic mapping and validation coverage but need live verification
+in the target deployment. Short-lived Bedrock keys must be rotated before expiry.
+
+The repeatable provider connection campaign is documented in
+[`tests/runner-e2e/PROVIDER-CONNECTIONS.md`](../../tests/runner-e2e/PROVIDER-CONNECTIONS.md).
+It preserves actual tool outputs, downloaded artifacts, completion and follow-up
+receipts, source provenance, cleanup, and provider failures. The retained local
+qualification has 43 passing API/gateway cells out of 46; staging and all
+subscription combinations remain unqualified. Gemini CLI 0.58.0 has an upstream
+ACP new-file error conversion defect. The provider-free filesystem probe exposes
+that defect without modifying the installed CLI. Provider overloads and one
+follow-up timeout also remain live qualification limits.
+
+### Gateway completion compatibility
+
+Provider-facing `paperclip_finish` accepts an omitted or `null` continuation for
+`done`, `completed`, and `needs_review`. This supports gateways that require all
+declared tool properties to be present. Normalization removes only `null`;
+non-yielding tool calls still reject a continuation object, and `yielded` still
+requires a complete `response_wake` object.
+
+Task-card account repair uses the provider reconnect form for routed accounts,
+retaining the saved endpoint, protocol, model aliases, and connection identity.
diff --git a/doc/connections/CONNECTION-INSTRUCTIONS.md b/doc/connections/CONNECTION-INSTRUCTIONS.md
new file mode 100644
index 00000000000..5afca12342a
--- /dev/null
+++ b/doc/connections/CONNECTION-INSTRUCTIONS.md
@@ -0,0 +1,120 @@
+# Connection instructions
+
+Connection instructions are an optional, provider-independent capability. A saved
+connection can contribute a short paragraph to an authorized agent’s execution
+prompt. Memory providers are the first catalog templates; custom and non-memory
+connections use exactly the same settings, authorization, and delivery path.
+
+## Catalog and saved settings
+
+A connector can declare `agentInstructions: { id, version, text }` in its
+`AppDefinition`. Author reviewed defaults directly in that app's
+`packages/shared/src/app-definitions/.json`, alongside its configuration
+and supporting provider `docsUrl`. This field is the source of truth; there is
+no separate template registry. Catalog ingestion validates and preserves it,
+including edits or removal, when regenerating the other definition fields. Run
+`node scripts/ingest-app-definitions.mjs --definitions-only` to verify. Template
+text is limited to 2,000 characters. Remote MCP initialization prose is never
+adopted as trusted instructions automatically.
+
+Every `ToolConnection` has nullable `agentInstructions`:
+
+```json
+{
+ "enabled": true,
+ "text": "Use the release handbook before changing a deployment. Cite the checklist.",
+ "template": { "id": "handbook.usage", "version": 1 }
+}
+```
+
+The template provenance is optional. Authorized custom instructions can be saved
+without a catalog template. `null` means no instructions. Disabling retains text
+and tool access. New catalog connections persist the current default enabled;
+the initial migration backfills existing connections for the five participating
+providers. A reconnect, OAuth return, or catalog refresh retains saved settings.
+Catalog version changes do not replace custom text or opt-outs. **Reset to
+default** explicitly adopts the current template and preserves the toggle.
+
+Existing connect, finish, and connection PATCH requests accept the same nullable
+setting. Mutations use connection configuration permissions and company checks,
+and write activity records. Required provider configuration lives in
+`config.methodConfig`, independently of instruction text and enabled state.
+
+## UI convention
+
+The editor appears only when explicit template metadata exists. Setup (including
+inline setup and OAuth) uses the current flow, without another wizard step. The
+Permissions page places **Agent instructions** after agent access and before
+Actions. It shows **Tell agents to use {provider}**, visible text, editing,
+**Reset to default** after changes, and an amber notice when off. Failed saves
+retain the draft. Agent Instructions includes a read-only **From connections**
+section with source links and an explanation of task-dependent availability.
+Disabled instructions remain inspectable there with an amber notice.
+
+## Runtime delivery and compatibility
+
+The gateway resolves instructions using the stored run’s company, agent, task,
+project, active responsible identity, connection grants, and effective action
+policy. At least one tool must be available (including tools requiring approval).
+The resolver uses persisted settings and the cached catalog; it does not contact
+providers. It does not gate delivery on a provider name, memory category, or the
+presence of a catalog template.
+Prompt assembly checks access to candidate connections’ cached tools directly,
+using the same task restrictions and policy decisions as discovery. It does not
+enter the discovery queue, so queue saturation neither drops guidance nor replaces
+an otherwise compatible session. Revocation is still checked on every turn.
+
+Eligible blocks are sorted by connection ID. Each block identifies its
+connection, selected grant, optional template provenance, and declared public
+configuration. Secret/password fields are excluded. Missing required public
+configuration withholds standing instructions. The snapshot is `{ text, digest }`,
+where `digest` is SHA-256 of the complete UTF-8 text. Declared public configuration and
+source changes therefore change the digest as well as text edits.
+
+The server replaces caller-supplied runtime instruction fields before executing.
+Native Runner receives the snapshot in `runtimeContext.connectionInstructions`
+and composes it alongside agent instructions. Legacy adapters receive it through
+shared wake-prompt composition on fresh and resumed turns. Session compatibility
+includes the snapshot: changing or removing it replaces an incompatible session,
+including when live tool refresh would otherwise retain that session. Active
+turns retain the snapshot with which they started. Older native snapshots without
+this field remain valid. No AGENTS.md or shared harness home is modified.
+
+Custom integration contracts:
+
+- **HTTP adapter:** the JSON request contains top-level `connectionInstructions`
+ (`{ text, digest }` or `null`), also available on invocation `context`.
+ This server-owned field overrides `payloadTemplate`. Append its text alongside
+ agent instructions before invoking a model; do not reuse a session with a
+ different digest.
+- **Process adapter:** `PAPERCLIP_CONNECTION_INSTRUCTIONS_FILE` points to a private
+ JSON file containing the same snapshot. Read it during the invocation and
+ append `.text` to your model prompt. It is empty when no instructions apply.
+ Configured or inherited paths cannot override it. The temporary file is removed
+ when the process exits, including failure paths.
+
+Instruction guidance grants no new permissions. Approval requirements remain
+attached to tool calls, and remembered content does not override the current task.
+Provider memory scope follows the provider’s real configuration; Paperclip does
+not claim isolation from invented agent IDs or tags.
+
+## Honcho configuration
+
+Honcho requires `config.methodConfig.workspaceId` for new setup. The field is
+expanded above instructions, with validation beside it. For tools declaring a
+`workspace_id` argument, the existing managed-argument mechanism projects the
+configured workspace after caller arguments and removes the field from the
+agent-visible schema. Pending approvals compare against the current projected
+arguments, so changing the workspace invalidates the old approved invocation.
+Existing connections missing a workspace retain their tools and manual workspace
+arguments, but receive no standing guidance until configured.
+
+## Verification
+
+`server/src/__tests__/connection-instructions.test.ts` persists a non-memory
+fixture, resolves effective access, captures a real process invocation, and checks
+shared/native prompt composition. Route tests cover permissions and OAuth draft
+preservation. Session tests cover edits/removal and incompatible resumes.
+Storybook uses production components backed by stateful mock APIs, including
+Notion with and without explicit templates. Model behavior evaluations and new
+agent/company memory scope controls are deferred.
diff --git a/doc/connections/CONNECTOR-PERMISSION-AUDIT.md b/doc/connections/CONNECTOR-PERMISSION-AUDIT.md
index 07942d7504f..8b41d07f228 100644
--- a/doc/connections/CONNECTOR-PERMISSION-AUDIT.md
+++ b/doc/connections/CONNECTOR-PERMISSION-AUDIT.md
@@ -1,11 +1,15 @@
# Tool connection permission audit — 2026-09-30
-This review covers 117 tool methods (84 OAuth methods). The machine-readable
+This review covers 119 tool methods (85 OAuth methods). The machine-readable
[source of reviewed defaults](./tool-method-permission-reviews.json) lists each
method's exact requested scopes, supported actions, restrictions, sources and
verification limits. AI runtime authentication and chat/channel setup are
separate contracts and were not changed.
+Methods reviewed after this audit carry their own `reviewedAt` date in the same
+ledger; the counts above are not restated. Later additions: [Neon](./NEON.md)
+(`mcp-oauth`, `mcp-api-key`; 2026-10-02).
+
## Shared credential failure
Zapier's secret URL exposed a shared ownership/resolution problem. The same
diff --git a/doc/connections/CONNECTOR-PLAYBOOK.md b/doc/connections/CONNECTOR-PLAYBOOK.md
index cd2db9348c8..6c5f7913b2f 100644
--- a/doc/connections/CONNECTOR-PLAYBOOK.md
+++ b/doc/connections/CONNECTOR-PLAYBOOK.md
@@ -122,6 +122,7 @@ read/write proof separately and never describe metadata discovery as live proof.
- [Current access defaults](#current-default-access-policy)
- [Golden-path agent tutorial](#golden-path-agent-tutorial)
- [Connection UX and user journeys](#connection-ux-and-user-journeys)
+- [Optional agent instructions](#optional-agent-instructions)
- [Chat and email connector UX](./CHAT-CONNECTOR-UX.md)
- [Production validation evidence](#step-9-align-with-production-validation)
- [AppDefinition field reference](#appdefinition-field-reference)
@@ -147,6 +148,59 @@ A complete connector proposal produces:
denied/quarantined call when the method declares one, revoke, and audit
evidence.
+## Optional agent instructions
+
+Some connections need standing guidance: tools tell an agent what it *can* do,
+while a short paragraph explains when it should use them. Memory is the first
+use case. See [Connection instructions](CONNECTION-INSTRUCTIONS.md) for the
+generic catalog metadata, saved settings, API, runtime, and integration contracts.
+**Design explorations → Connections → Agent instructions** in Storybook uses
+production components with mocked APIs.
+
+When adding a template:
+
+- Show the section only when the connector explicitly provides a nonempty
+ instruction template. Use **Agent instructions** and the checkbox
+ **Tell agents to use {provider}**, with the exact paragraph visible. No template
+ means no instructions UI, including no blank editor.
+ Keep setup in the existing flow and its single footer; add no required test or
+ extra wizard step. Use the current shared access defaults/disclosure.
+- Use a reviewed, versioned provider-specific suggestion. Explain when to recall,
+ when to save, the allowed context, and what to do if a call fails. Prefer one
+ short paragraph over a full skill or a pasted tool catalog. Avoid unsupported
+ promises about hooks, automatic transcript capture, or private memory.
+- Default provided instructions on for every participating connector. Let users
+ edit, **Reset to default** after changes, or disable guidance while retaining
+ tools. Show a compact amber notice when off. Reconnect and catalog refresh
+ preserve explicit opt-outs and custom text. Omit suggestion attribution badges
+ and routine lifecycle/storage helper copy.
+- Edit in an optional **Agent instructions** section of the existing **Permissions**
+ page, between agent access and Actions. Use the actual connection page shell,
+ credential form, and footers in review stories; include a baseline story for
+ comparison rather than constructing parallel page chrome. Show recipients
+ from current assignments and a read-only, source-linked copy on the agent.
+ Keep action controls and tests in the existing **Permissions** screen.
+- Resolve runtime guidance with the same company, agent, task, responsible-user,
+ and grant checks used for tools. Compose a revisioned block alongside agent
+ instructions; never permanently edit AGENTS.md or shared harness home files.
+ Verify fresh and resumed turns, removal, revoked access, and unsupported adapters.
+- Keep required provider settings, such as Honcho workspace, expanded near the
+ top of setup and configuration, above instructions. Put validation beside the
+ field and block completion while required values are missing. Memory stays an
+ ordinary connection; do not add a default-memory chooser or agent preference.
+ Keep provider binding identifiers separate from editable prose. Agent IDs,
+ tags, and query filters alone are not access-control boundaries. Any promised
+ isolation needs server enforcement across all relevant tool paths.
+- Treat MCP initialization instructions as external provider content. Review
+ them as template source; do not silently inject arbitrary remote text or let
+ a provider update overwrite an operator's instructions. Guidance never grants
+ additional tool permissions.
+- Prove both delivery and behavior: deterministic assignment/resume checks, then
+ a bounded save → **fresh session** recall with synthetic data through the real
+ run gateway. Record exact model/template/catalog versions, tool receipts,
+ costs, ingestion timeout, and cleanup. Discovery and a model's “saved” reply
+ do not prove memory works. See the linked plan for the minimal matrix.
+
## Use This Document As The Checklist
An agent implementing a connection should be able to begin with only a provider
@@ -158,7 +212,7 @@ The shortest valid implementation usually changes these files:
```text
scripts/ingest-app-definitions.mjs # human-authored definition source
-packages/shared/src/app-definitions/.json # generated definition
+packages/shared/src/app-definitions/.json # definition with app-owned instruction template
packages/shared/src/app-definitions.generated.ts # generated registry
ui/public/brands/apps/.svg # official, sanitized mark
ui/public/brands/apps/manifest.json # runtime branding paths
@@ -648,7 +702,7 @@ controls and precise labels over explanatory paragraphs. Remove repeated
headings, redundant access summaries, implementation details, and reassurance
that does not help the user decide or act. Keep necessary warnings, meaningful
consequences, and actionable errors. Put optional expert settings under a
-collapsed Advanced disclosure. Link to provider-owned administration, such as
+collapsed disclosure through **Change**. Link to provider-owned administration, such as
AgentMail allowlists, rather than rebuilding it in Paperclip.
**Keep ongoing interactions in Paperclip tasks.** Connections are where users
@@ -708,7 +762,13 @@ definitions and visible manifest entries to match exactly.
### Phase 5: Author the definition at the durable source
-The checked-in provider JSON files are generated. Do not edit one and stop.
+Transport/auth fields in the checked-in provider JSON files are generated. Do
+not edit those fields and stop. Optional `agentInstructions: { id, version, text }`
+templates are authored directly in each app's JSON definition, alongside its
+supporting `docsUrl`. Ingestion validates and preserves that field; edit or
+remove it there, and increment its version when changing the default. There is
+no central instruction-template registry. See
+[Connection instructions](./CONNECTION-INSTRUCTIONS.md) for the runtime contract.
1. Add or update the provider in `scripts/ingest-app-definitions.mjs`.
2. Update `packages/shared/src/self-serve-mcp-research.json` when it belongs to
@@ -1511,11 +1571,16 @@ The operator should see Apps, Connections, and Review language. Keep protocol la
Request only the documented scope set the reviewed connection needs; never
adopt every scope returned by discovery. Operators should not have to predict
every future tool during setup. Keep the default view to the minimum inputs
-needed for a working connection, fold optional expert controls under one
-collapsed **Advanced** disclosure, and enforce execution afterward through
+needed for a working connection, fold optional expert controls under the
+**Change** link beside the access summary, and enforce execution afterward through
Paperclip's resource boundaries, risk classification, tier defaults, optional
quarantine, and audit.
+When a provider supplies its MCP endpoint, keep that URL out of the initial
+form. Composio exposes it through **Reuse an existing session** for operators
+with a custom session URL; resumed custom endpoints and URL validation errors
+keep the field visible. Preserve the endpoint when its disclosure is closed.
+
### Step 8: Apply Governance Defaults
Governance is automatic because every catalog entry becomes a normal tool-access object:
@@ -2326,3 +2391,147 @@ in-memory provider responses. The `provider-native`, `provider-decline`, and
`provider-second` Product E2E cases exercise native preference, persisted choice,
restart recovery, and an independently observed gateway read. They do not prove
compatibility with the real external providers.
+
+### Public aggregator apps in Connectors
+
+The Connectors catalog combines native definitions with the public Composio and
+Arcade app snapshots in `packages/shared/src/aggregator-app-catalog.ts`. Native
+definitions always take precedence, including definitions temporarily hidden or
+unavailable on the instance. Each remaining app has one card with its provider
+logos; Connect opens a provider picker when multiple providers support the app.
+An app with one provider goes directly to setup or its saved gateway flow.
+Search covers names, aliases, providers,
+and saved accounts. The uninstalled catalog uses pages of 50 entries; matching
+installed connectors remain above every page. Listing an upstream app never
+creates a Paperclip connection or marks that app authorized.
+Provider filters include native cards only when they contain accounts managed
+by that provider. A matching public catalog entry alone does not include a
+native card; its native onboarding remains in Paperclip and All.
+
+Composio app setup offers a dropdown of connected Composio accounts and an option
+to connect a new one. The board calls `COMPOSIO_MANAGE_CONNECTIONS` directly to
+check the requested toolkit and generate its hosted authorization link. This
+creates no task and starts no agent run. An already active app skips new link
+creation. After the human signs in, completion checks the toolkit's ACTIVE
+account status again. New gateways default to all humans and all agents; app
+setup preserves the selected gateway's saved access and tool policies without
+adding agent-specific grants. Access remains gateway-wide, not app-level
+isolation. Saved credentials are resolved for the acting human and authorization
+URLs stay outside audit/result storage. A failed or uncertain add is never
+retried automatically; the user can explicitly request a new link.
+
+Composio is authoritative for app accounts and authorization. Paperclip stores
+only account observations in `tool_connection_app_snapshots`: IDs, aliases,
+statuses, default flags, check times, and failure times. Observations are scoped
+to company, saved gateway, viewing human, and credential identity, including
+secret versions. Credential replacement or rotation hides the old inventory.
+Discovery and app setup never create agent grants or change saved policies.
+
+Apps starts a background check of the entire supported public Composio catalog,
+independent of search and pagination. `POST /tool-connections/:id/composio/apps/sync`
+returns cached observations and sync progress; `{force:true}` requests a refresh.
+`tool_connection_app_syncs` holds a per-credential lease and progress. Repeated
+visits and concurrent tabs share the lease. Checks use explicit `action:list`,
+batches of 32, a four-minute deadline, and five-minute freshness. Known accounts
+are checked first. Polling updates account rows while browsing stays usable.
+Manual **Refresh Composio** belongs in the saved Composio account's kebab menu;
+it checks that account only. Do not add a catalog-wide refresh button.
+Composio gateway setup finishes on its Permissions page. That page lists detected
+apps in a bounded, scrollable list and starts a refresh on first load. Its
+**Refresh Composio** button shows catalog-check progress and refreshes only that
+gateway. The same connected-app list and refresh controls serve Arcade and
+Executor gateways when discovery is available. Executor remains available as a
+connection, but its catalog filter chip is temporarily hidden.
+A complete empty list removes an observed account; EXPIRED accounts show Needs
+sign-in. Failed or incomplete evidence retains the last accounts, visibly
+unverified, and offers retry. Interrupted jobs can be restarted after the lease
+expires. A late response cannot replace a newer check or a changed credential.
+
+The saved Connect MCP OAuth credential supports listing accounts by toolkit;
+it is not a consumer user API key or a developer project API key. This discovery
+covers the supported public catalog, including toolkit variants. It does not
+claim complete enumeration of custom apps outside that catalog. A future
+identity-bound inventory endpoint should replace this scan when available.
+Never forward an MCP OAuth token to an unrelated REST inventory endpoint.
+
+Imported accounts appear above the paginated catalog with their actual source:
+**Via “saved connection name”**, rather than attributing upstream authorization
+to the gateway creator. Already connected Composio accounts remain visible even
+when Paperclip has a native connector; native Connect offers still take
+precedence. Imported account menus offer only **Open in Composio**. Access
+controls remain on the saved gateway and apply to all apps on that connection.
+The Manage dialog displays provider observations
+and links to Composio; it does not offer local rename or upstream removal.
+Use `https://dashboard.composio.dev/~/org/connect/apps` for Connect app management.
+The organization placeholder resolves to the signed-in user's For You area.
+The bare dashboard opens Platform developer projects, which have a separate
+account inventory and are the wrong destination for saved Connect MCP accounts.
+Remove connection remains available on the saved gateway itself. Its confirmation
+states that removing it from Paperclip does not delete accounts in Composio.
+
+Targeted Composio app setup URLs reuse the saved-account chooser when an active
+gateway exists. Explicit `new=1`, resume, and reconnect keep their own gateway
+setup flow. Existing ACTIVE app accounts are checked without creating another
+hosted link or a task. New app authorization remains a direct hosted sign-in
+handoff, followed by a fresh account check.
+
+Arcade still offers an agent task draft to verify the requested app and obtain
+any provider authorization link. It requires the app's tools in the selected
+gateway, a catalog refresh, and any tool authorization. New gateway setup retains
+the app name through `targetToolkit`; it creates only the provider gateway.
+Composio then returns to direct app setup; Arcade opens the task draft.
+Setup entry points preselect an assignable agent: prefer an agent named
+**Default agent**, then organizational rank and leadership roles, then creation
+date. If there is no named default, use the same rank and age ordering on the
+remaining agents. The user can change the selection before continuing.
+The board's Create Task action creates a new task even when an open task has the
+same title. A request key protects retries of the same submitted draft, and the
+success confirmation links to the created task.
+Connection setup drafts opt into the dialog's `navigateOnCreate` option, taking
+the operator to the created task after submission. Other callers stay on their
+current page by default; the option does not add a visible control.
+The task asks the assigned agent to perform setup directly without hiring or
+delegating, and to provide a browser link and wait when human authorization is
+needed. Before provider calls, it checks access for the task's current assignee.
+Missing access uses `connection_request` with the saved `connectionId` and exact
+indexed `toolNames`, producing an embedded card with the requesting agent's
+avatar and a **Grant access** action. The addressed human connection manager
+approves the frozen tool set; acceptance adds agent-scoped access and resumes
+the task. Composio setup asks for Search Tools as Allowed and Manage Connections
+as Ask first. Writes and unknown-risk tools retain per-call approval. Changed or
+quarantined tools require a new request. Existing policies, identity selection,
+and other agents' access are preserved. The task never grants itself permissions
+or requests access for every agent.
+The connection's Permissions page lists additional agent access separately
+and lets the connection manager remove it without changing the default action
+permissions. Removing that grant also disables its Ask-first tools.
+A successful agent run or a local gateway fixture does not prove that
+the underlying app is authorized; verify against the real provider gateway.
+OAuth recovery exposes a validated native sign-in link on both page and dialog
+hosts. A blocked window or navigation retains the existing connection and OAuth
+session so the link can continue sign-in without creating another gateway.
+
+Composio reuses `composio-search-catalog.json`. Arcade's snapshot records its
+official logo and evidence URLs, excluding hidden and coming-soon entries. To
+review and refresh only Arcade's claims, run:
+
+```sh
+node scripts/update-arcade-app-catalog.mjs --verified-at YYYY-MM-DD
+```
+
+Use the date of the public catalog review. The script preserves the prior file
+if the source structure or entries fail validation. `--input ` allows
+reproducing the snapshot from the same official catalog response. Neither public
+snapshot proves a user's gateway configuration or app authorization.
+
+### Managed aggregator account inventory
+
+Composio, Arcade, and Executor observations share the existing app snapshot/sync tables and the manager-only `/api/tool-connections/:connectionId/aggregator/apps` list, `/sync`, and `/refresh` endpoints. Legacy Composio endpoints remain supported. These rows are observations, never executable connections or authorization grants. Company, gateway, viewing human, and effective credential version define the cache; fully successful enumeration reconciles removal, while partial failure retains stale observations.
+
+Arcade discovery paginates its [admin account list](https://github.com/ArcadeAI/arcade-go/blob/main/adminuserconnection.go) and [tool requirements](https://github.com/ArcadeAI/arcade-go/blob/main/tool.go), filters to the configured user and exposed gateway tools, and stores only allowlisted account metadata. An existing project key plus `Arcade-User-ID` can be reused. Otherwise optional manager-only sync setup stores a separate user-owned vault key for discovery; it is excluded from gateway invocation credentials and tool access grants. OAuth gateway tokens are not substituted for project keys.
+
+Executor reads its [MCP integration inventory](https://github.com/UsefulSoftwareCo/executor/blob/main/packages/hosts/mcp/src/tool-server.ts) or uses fixed, read-only `connections.list` and `integrations.list` calls in code mode. Its pure `connections.createHandoff` URL builder can supply the upstream console destination. No arbitrary generated code or provider REST endpoint is used. Unknown integrations remain separate, without guessed branding. Last-health `healthy` is connected, `expired` needs sign-in, and unverified or degraded health never earns a green check. Missing inventory support is visible as discovery unavailable. Managers can set a trusted HTTPS console URL for gateways that do not expose a destination, preserving workspace and self-hosted paths.
+
+Apps groups native and imported accounts under canonical app cards, preserving all upstream account identities. Native onboarding wins over aggregator connect offers. Imported account menus only open their upstream provider; deletion and per-app authorization stay upstream. Parent gateway menus own refresh and optional discovery setup. Paperclip policies continue to govern invocation through the gateway.
+
+Acceptance fixtures: `server/src/__tests__/aggregator-app-discovery.test.ts`, `server/src/__tests__/aggregator-app-sync.test.ts`, `ui/src/pages/apps/Browse.test.tsx`, and the production-page/full-stack test drive at `tests/aggregator-accounts/test-drive.ts`. The expected stories and evidence are recorded in `doc/plans/2026-10-05-managed-aggregator-account-user-stories.md`. Fixture runs do not replace live provider proof when working credentials are available.
diff --git a/doc/connections/ENTERPRET.md b/doc/connections/ENTERPRET.md
new file mode 100644
index 00000000000..768f20e20c3
--- /dev/null
+++ b/doc/connections/ENTERPRET.md
@@ -0,0 +1,634 @@
+# Enterpret connection
+
+Enterpret's hosted MCP server answers questions about an organization's customer
+feedback — themes, accounts, sentiment, and verbatim quotes with citations back
+to the source records.
+
+This document follows the template in
+[Connection Authoring Runbook](./CONNECTOR-PLAYBOOK.md) and records exactly what
+was and was not verified.
+
+**The connector has now been exercised against a real Enterpret account** — a
+named account holder signed in through an isolated Paperclip runtime on
+2026-09-25 (PAP-18538), and agent tool calls reached the live server. The
+organization-token method was separately exercised on an isolated self-hosted
+runtime on 2026-09-30.
+
+**Release path:** the **organization auth token** (`mcp-api-key`) is the
+primary connection method. Generate a Bearer token under Enterpret
+**Settings → Enterpret MCP** and paste it into Paperclip. Public MCP tools are
+read-only today; the token path does not depend on Enterpret honouring a
+narrowed OAuth grant.
+
+**Current product decision — 2026-10-01:** support both organization tokens
+and browser OAuth for the official **read-only Enterpret MCP** at
+`https://wisdom-api.enterpret.com/server/mcp`. The account holder reported a
+live conversation with Vivek confirming that Enterpret Agent's write MCP is a
+separate beta service with known bugs. That service is outside this connector's
+scope and will be reviewed separately when ready.
+
+Vivek committed to fixing OAuth scope behavior and reducing the token
+revocation cache window. This is a provider commitment relayed by the account
+holder, **not verified deployment evidence**. The earlier inference that an
+`mcp:write` scope name made this connector write-capable is withdrawn. Both
+methods are selectable on this draft branch; fresh OAuth authorization,
+refresh and real-agent allow/deny checks remain release QA. The account holder
+confirmed the provider fixes are fast follows after deployment, not prerequisites
+for shipping this connector.
+
+Several live read and gateway checks passed on the OAuth method. The primary
+token path passed connection, catalog, safe read, refresh, and reconnect checks;
+a real agent process and server/VPS or Cloud deployment remain unverified.
+The dashboard's token revocation did not immediately invalidate the token. See
+[Validation Hook](#validation-hook) for the scenario-by-scenario record.
+
+Authored against Paperclip App `fff410dfe777ae0427385e8297df992ba9aed4ce`, with
+`CONNECTOR-PLAYBOOK.md` blob `5efd4cca05a1c94bb47d619833ba347f416bbbed` as the
+authority. Provider metadata read 2026-09-23 and re-read unchanged 2026-09-25.
+Live validation ran on App `ef1606f037a7828a7ba774949e811847c1a1d386`.
+
+## Vendor
+
+- App key: `enterpret`
+- App name: Enterpret
+- Owner: unassigned. No Paperclip maintainer currently owns an Enterpret account.
+- Reuse classification: **MCP-direct**
+- Reason for classification: Enterpret publishes an official hosted MCP server
+ over Streamable HTTP whose authorization server is discoverable from the
+ endpoint itself. No REST shim and no vendor-specific wrapper is needed; the
+ tools map onto ordinary read grants.
+- Security tier: **S3**
+- Plugin needed? No. The provider is expressible as metadata plus a transport:
+ no plugin tables, workers, webhooks, or dedicated UI.
+
+### Why a catalog entry at all
+
+An operator can already reach this server with no Paperclip code change, through
+**Connect your own MCP server** or **Advanced → Paste a config**
+([Generic remote MCP](./GENERIC-REMOTE-MCP.md)). The catalog entry adds only:
+official artwork, two labelled methods with the correct client-ownership and
+grant-identity shape, a reviewed scope allowlist narrower than the advertised
+set, a recorded risk tier, and the provider docs link. Those are real but
+incremental. Treat the generic path as the baseline, not as a lesser fallback.
+
+## Transport And Auth
+
+- Transport: `mcp_remote` (Streamable HTTP)
+- Endpoint: `https://wisdom-api.enterpret.com/server/mcp`. The bare and
+ trailing-slash forms behave identically — `401`, no redirect.
+- Auth modes: **API key / organization auth token** (`mcp-api-key`, primary)
+ and **OAuth** (`mcp-oauth`). Both methods are selectable on one catalog entry.
+- OAuth scopes: requested `mcp:read`. Advertised by the provider: `email`,
+ `mcp:read`, `mcp:write`. See [Scope decision](#scope-decision). Fresh OAuth authorization and refresh checks are pending provider deployment.
+- Key scope: the Enterpret auth token is generated per Enterpret organization
+ and carries that organization's access. Enterpret does not document a
+ restricted or read-only token variant. Public tools remain read-only.
+- Credential owner: the auth token is an organization credential
+ (`grantKinds: ["organization"]`); OAuth is user-delegated
+ (`grantKinds: ["user"]`).
+- Secret storage: `company_secrets` refs only. The definition records the header
+ placement, never a value.
+- Revocation behaviour: **no `revocation_endpoint` is advertised.** See
+ [Revocation gap](#revocation-gap).
+
+### Connection Flow (mandatory)
+
+```mermaid
+sequenceDiagram
+ participant O as Operator
+ participant P as Paperclip instance
+ participant R as wisdom-api.enterpret.com
+ participant A as oauth.enterpret.com
+ O->>P: Connect Enterpret, method mcp-oauth
+ P->>R: POST /server/mcp initialize, unauthenticated
+ R-->>P: 401 WWW-Authenticate with resource_metadata
+ P->>R: GET /server/mcp/.well-known/oauth-protected-resource
+ R-->>P: authorization_servers https://oauth.enterpret.com
+ P->>A: GET /.well-known/oauth-authorization-server
+ A-->>P: authorize, token, register, PKCE S256, auth method none
+ P->>A: POST /register, RFC 7591 dynamic client registration
+ A-->>P: client_id for this Paperclip instance
+ P->>O: Redirect to /authorize with PKCE challenge
+ O->>A: Sign in and consent
+ A-->>P: Redirect to /api/tools/oauth/callback with code
+ P->>A: POST /token, code plus verifier
+ A-->>P: Access token and refresh token
+ P->>R: POST /server/mcp with the access token
+```
+
+- Auth endpoints (exact paths), all read from provider metadata on 2026-09-23:
+ - Authorize: `https://oauth.enterpret.com/authorize`
+ - Token: `https://oauth.enterpret.com/token`
+ - Registration (DCR): `https://oauth.enterpret.com/register`
+ - Discovery: `https://wisdom-api.enterpret.com/server/mcp/.well-known/oauth-protected-resource`
+ (RFC 9728) → `https://oauth.enterpret.com/.well-known/oauth-authorization-server`
+ (RFC 8414). `https://oauth.enterpret.com/.well-known/openid-configuration`
+ also resolves.
+ - Also advertised: `/introspect`, `/userinfo`. `jwks_uri` points at AWS Cognito
+ pool `us-east-2_kLiRrPBis`.
+ - Paperclip callback: `/api/tools/oauth/callback`
+- Redirect constraints: `https-or-loopback-http` in the definition. An HTTPS
+ redirect URI was accepted by DCR and round-tripped through a real consent on
+ 2026-09-25. Whether Enterpret would also accept a loopback HTTP redirect
+ remains **unprobed** — the live run used HTTPS.
+- Paperclip ID / Paperclip Connect involvement: **none.** Enterpret is an
+ RFC 7591 DCR provider, so registration is instance-local and Cloud and
+ self-hosted use the same path. The only per-instance difference is the
+ hostname inside the redirect URI.
+
+The definition ships `serverUrl` only. A complete `authorizationEndpoint` +
+`tokenEndpoint` pair would be authoritative and would suppress discovery
+permanently, including endpoints a previous discovery had persisted. Discovery
+resolves cleanly here — the `issuer` in the RFC 8414 document matches the issuer
+used to build the URL — so there is nothing to hard-code and nothing to keep
+current.
+
+### Scope decision
+
+Paperclip requests `mcp:read` for the official read-only endpoint. The live
+2026-09-25 observation is preserved:
+
+```text
+Paperclip authorization request mcp:read
+Enterpret token response no scope field
+Enterpret token introspection openid email profile mcp:read mcp:write
+```
+
+This proves a mismatch between requested and reported scopes. It does **not**
+prove the token can invoke write tools or authenticate to the separate beta
+Enterpret Agent MCP. No write tool was observed or invoked on this endpoint.
+The previous description of this as a verified write-capable connector was
+stronger than the evidence and is superseded by the 2026-10-01 product decision.
+
+The account holder relayed Vivek's commitment to fix OAuth behavior. Validate a
+fresh authorization and refresh against current provider behavior, record
+requested and reported scopes separately, and confirm the tool inventory still
+belongs to the official read-only service. Do not widen the scope request or
+add the beta write endpoint to this definition.
+
+#14059 independently records whether scopes are provider-asserted or inferred
+from the request. That improves Paperclip's reporting; it cannot prove a
+provider's actual endpoint or capability boundary.
+
+### Revocation gap
+
+The RFC 8414 document advertises no `revocation_endpoint` — re-read 2026-09-25
+and still absent. Removing the connection in Paperclip clears local credential
+material and gateway access, but there is no documented provider-side instrument
+to invalidate an issued OAuth token. The auth-token method is separate: the
+dashboard has a Revoke control, but an immediate post-revocation read still
+succeeded on 2026-09-30. Whether generating another token invalidates an
+earlier one is untested.
+
+An `introspection_endpoint` *is* advertised, and Paperclip calls neither. That
+is worth separating: introspection tells you what a token can do, which is how
+the scope mismatch above was found, but it cannot take a token away.
+
+Consequence: the OAuth **Revoke and reconnect** scenario cannot reach
+`verified` through a provider-side revocation call — confirmed by the live
+metadata, not merely predicted. The organization-token Revoke control failed
+the immediate denial check. Local removal passed and must be recorded as
+exactly that rather than as full provider-side revocation.
+
+**Operator instruction.** Disconnecting Enterpret in Paperclip is only half of
+revoking it — and for OAuth the other half is not a procedure this validation
+can hand you. The two methods differ, and they must not be described as one:
+
+- **OAuth.** Paperclip cannot revoke the token: no `revocation_endpoint` is
+ advertised and Paperclip ships no RFC 7009 client. Whether the Enterpret
+ dashboard offers any way to withdraw an authorized MCP client is
+ **unverified** — this validation neither found such a control nor confirmed
+ one exists, so no step here should be written as if it does. Until Enterpret
+ confirms a procedure, plan on the issued token staying valid **until it
+ expires**, treat expiry as the only assured end of access, and ask Enterpret
+ support for a revocation path rather than assuming the dashboard has one.
+- **Auth token.** The dashboard can generate and revoke organization tokens.
+ On 2026-09-30 it confirmed "Your token has been revoked," but that same
+ token immediately connected again and completed `get_organization_details`
+ through an isolated Paperclip instance. Provider-side invalidation therefore
+ **failed the immediate check**. Vivek later explained a 24-hour validity
+ cache and committed to reducing it; the new delay and deployment are unverified. Do not treat the dashboard confirmation, generating another token,
+ or local disconnect as proof of revocation. Confirm the old token is denied.
+
+Any runbook or teardown that treats "disconnect in Paperclip" as provider-side
+revocation can leave a live credential at Enterpret. The OAuth grant tested
+above also carried `mcp:write`.
+
+## Administrator Setup (mandatory)
+
+- What the admin must register: **nothing.** Enterpret advertises RFC 7591
+ dynamic client registration, so the Paperclip instance registers itself at
+ connect time. No client ID, no client secret, no callback URL to pre-register.
+- Where to register it: not applicable. For the auth-token method, an Enterpret
+ admin generates a token at **Settings → Enterpret MCP → Generate** under
+ **Auth Token**. Check the expiry shown for each token in the dashboard; the
+ token generated for the 2026-09-30 QA run showed **three months**.
+- Instance prerequisites: outbound HTTPS to `wisdom-api.enterpret.com` and
+ `oauth.enterpret.com`. A public HTTPS base URL is **not** required — that
+ applies to the Client ID Metadata Document tier only, and an instance without
+ one falls through to DCR.
+- How to verify the connection works: after connecting, the connection health
+ and catalog check should list Enterpret's tools. `get_organization_details`
+ is the narrowest read and identifies which Enterpret organization the
+ credential resolves to — run that first, and confirm it is the organization
+ you intended.
+
+## Resource Filters
+
+- Required filters: none expressible. Enterpret's MCP surface scopes every call
+ to the organization behind the credential; the server documents no per-source,
+ per-account, or per-workspace request parameter.
+- Optional filters: none.
+- Write-enabling filters: not applicable — no write action is exposed.
+- Filters enforced by: **the credential itself.** The account boundary is the
+ only boundary, which is why the organization a credential resolves to has to
+ be confirmed at setup rather than assumed.
+
+## Manifest
+
+- schemaVersion: 1
+- slug: `enterpret`
+- name: Enterpret
+- description: "Ask questions about your customer feedback and pull verbatim
+ quotes with citations."
+- categories: `["analytics"]`
+- branding and provenance: `/brands/apps/enterpret.png`. The official Enterpret
+ app icon, 256×256, retrieved 2026-09-23 from the `apple-touch-icon` linked by
+ `https://www.enterpret.com/`, unmodified.
+ SHA-256 `aca19ddae5f52a2caa4f3664286a76cd9439316e0fa3c39890f646536aebc522`.
+ The provider's nav logo is a 120×24 light-on-dark wordmark, wrong shape for a
+ square tile and unusable on a light frame; the app icon is the correct
+ official mark and needs no dark variant.
+- docsUrl: `https://enterpret.support.site/article/enterpret-mcp-server`
+- Methods:
+
+| | `mcp-api-key` (primary) | `mcp-oauth` (OAuth) |
+| --- | --- | --- |
+| label | Use an auth token | Sign in with Enterpret |
+| transport | `mcp_remote` | `mcp_remote` |
+| auth | `api_key` | `oauth` |
+| ownershipModes | `["customer"]` | `["dcr"]` |
+| grantKinds | `["organization"]` | `["user"]` |
+| defaults | `serverUrl` | `serverUrl`, `scopesHint: ["mcp:read"]` |
+| credentialFields | `authorization`, password, required, secret | — |
+| keyPlacement | header `Authorization`, prefix `Bearer ` | — |
+| riskTier | S3 | S3 |
+| release role | Primary / store-ready | Personal browser sign-in; fresh release QA pending |
+
+ `ownershipModes` omits `customer` on the OAuth method on purpose: Enterpret
+ documents no way for a customer to register their own OAuth application, and
+ `ownershipModes` must reflect what the provider advertises rather than the
+ `method()` helper's `["customer", "dcr"]` default.
+
+- oauthStrategy and connectorProfile: not used. This is not a Paperclip-managed
+ OAuth provider.
+- capabilityProfile and variants: not needed.
+- tenantFields and extensionFields: none. There is no tenant identifier to
+ supply — the credential determines the organization.
+- credentialSources: none. Not Vercel Connect eligible.
+- configRequirements: none.
+- guidanceMd, warnings, consoleLinks: see the generated definition at
+ `packages/shared/src/app-definitions/enterpret.json`.
+- riskTier: S3. Enterpret exposes broad content access — an organization's
+ complete customer feedback corpus including verbatim quotes with speaker
+ attribution. It is not S4: no payments, external sends, refunds, production
+ deployment, deletion, or tenant-wide administration is documented.
+- requiredResourceFilters: none, for the reason in
+ [Resource Filters](#resource-filters).
+- urlPatterns: `["https://wisdom-api.enterpret.com/*"]`
+- setupPrerequisite: not used; the account requirement is carried in method
+ warnings.
+- redirectConstraints: `https-or-loopback-http` (unprobed).
+- availability: omitted; organization-token and DCR OAuth methods are selectable
+ on this draft branch. Browse visibility is enabled. Release readiness still
+ requires the account-bound QA recorded below; selectable setup does not mean
+ the provider's pending fixes have been verified.
+
+## Actions
+
+**Observed.** An authenticated `tools/list` ran against the live server on
+2026-09-25 and returned **8** tools. Two corrections to the previously
+documented table:
+
+- `execute_cypher_query` is **absent** from the live server. The legacy alias is
+ no longer served, so it cannot be called and does not need a policy.
+- Every one of the 8 tools self-reports `readOnlyHint: true` — **including
+ `run_graph_query`**. Paperclip trusts provider annotations to derive
+ `riskLevel`, so a Cypher-executing tool self-certifies as `read` and lands on
+ Allowed by default. That is the provider's claim, not a verified property, and
+ it is exactly the case where a provider annotation should not be believed.
+
+**Read the two status columns as the configuration used for the live validation
+run.** Shipping defaults now classify `run_graph_query` as **write** (despite
+the provider `readOnlyHint`) and put write/destructive actions on **Ask first**
+via `recommendedDefaultsForApp` for Enterpret. Other observed tools remain
+Allowed reads. The live-run `deny` below was applied by hand and is stronger
+than Ask first; operators who want Off can still set that after connect. See
+[Governance Defaults](#governance-defaults).
+
+| Tool | Risk | Status in validation | Filters | Approval in validation | Audit fields | Negative case |
+| --- | --- | --- | --- | --- | --- | --- |
+| `get_organization_details` | read | active | credential org | allow | actor, run, connection, tool, outcome | ungranted actor is denied before dispatch |
+| `get_graph_schema` | read | active | credential org | allow | same | same |
+| `get_query_examples` | read | active | credential org | allow | same | same |
+| `search_graph_fields` | read | active | credential org | allow | same | same |
+| `search_graph_values` | read | active | credential org | allow | same | same |
+| `run_graph_query` | **write** (Paperclip override) | **deny — set by hand; ships Ask first** | credential org | deny (set by hand) | same, plus redacted query shape | same |
+| `find_user_quote` | read | active | credential org | allow | same, plus quote redaction | same |
+
+Legacy aliases `get_schema` and `search_knowledge_graph` remain served for the
+lifetime of an existing session and are dropped when the host refreshes its tool
+list. `execute_cypher_query` is no longer served at all.
+
+`run_graph_query` currently retains Paperclip's conservative **write** risk
+classification and Ask first default because it accepts general Cypher. This
+is a Paperclip policy safeguard, not evidence that Enterpret permits mutations.
+Vivek's read-only clarification applies to this official MCP. A scope name or
+tool name does not establish write access. A later risk-policy change can cite
+Enterpret's server-side read-only contract and safe live query proof.
+
+Denial was verified on the live connection: a granted agent calling
+`run_graph_query` through the gateway got **HTTP 403 `deny_default`**, and the
+tool was absent from that agent's own `tools/list`.
+
+Evidence plan: `find_user_quote` returns verbatim customer text with speaker
+attribution, and `run_graph_query` can return feedback records. Do not put
+those results in screenshots, exported evidence, or PR text. Paperclip currently
+retains provider responses close to verbatim in its invocation log, so a quote
+tool call can persist feedback there. Limit access and retention accordingly;
+the token-path QA uses only `get_organization_details` and records tool name,
+decision, and outcome without copying the payload.
+
+## Wizard Path
+
+- User path (auth token, primary): gallery card → paste the token from
+ **Settings → Enterpret MCP** → access defaults.
+- User path (OAuth): gallery card → **Sign in with Enterpret** → browser
+ authorization using instance-local DCR → access defaults.
+- Configuration steps: none beyond credentials. There is no tenant field to
+ fill.
+- Error states: expired auth token (check the dashboard expiry); an account with no
+ access to the organization's feedback. A scope *rejection* turned out not to
+ be one of them — Enterpret accepts the `mcp:read` request and reports broader scopes
+ (see [Scope decision](#scope-decision)), so the flow completes and the failure
+ is silent rather than visible in the wizard.
+- Also observed on the live run, and not an Enterpret problem: a headless agent
+ hits HTTP 409 `user_authorization_required` on this connection's `per_user`
+ credential policy until the user grant is delegated to that agent.
+- Redacted metadata shown: endpoint origin and path, method key, resolved
+ Enterpret organization from `get_organization_details`, tool names and count.
+ Never the token, the authorization code, or feedback content.
+
+## Governance Defaults
+
+- Default profile: Enterpret-specific `recommendedDefaultsForApp` — read
+ actions Allowed; write and destructive actions (including `run_graph_query`)
+ start as **Ask first**.
+- Profile bindings: standard.
+- Policies: `classifyRisk(..., "enterpret")` forces `run_graph_query` to
+ **write** even when the provider advertises `readOnlyHint: true`. Combined
+ with Ask-first defaults, new connections no longer ship that Cypher tool as
+ Allowed. Operators who want **Off** can still set that after connect.
+- **Narrowing an install is not a containment control.** The gallery connect
+ flow creates both a company install and a company-level binding of the
+ `app:` profile. Restricting the install to named agents rewrites
+ the install and adds an agent binding but leaves the company binding in place,
+ which keeps authorizing every agent in the company. Installs gate runtime
+ materialization; the *profile binding* is what authorizes. Containment becomes
+ real only when the company binding is also removed. Verified on the live
+ connection: both agents still resolved 7 allowed tools after the install was
+ narrowed, and the ungranted control agent dropped to 0 of 8 only after the
+ company binding was unbound.
+- Quarantine rules: `quarantineNewEntries` is connection-level runtime setup,
+ not an `AppDefinition` field. Paperclip enables it for Enterpret connections.
+ Enterpret's catalog demonstrably drifts — it renamed three tools and kept the
+ old names as session-scoped aliases, and `execute_cypher_query` has since
+ disappeared entirely — so newly advertised tools are held for review on a
+ subsequent catalog refresh, including after token replacement. The earlier
+ live run found the old default was
+ `false`; the new default still needs live refresh validation.
+- Rate limits: none set.
+
+## Validation Hook
+
+### Organization auth-token QA (2026-09-30)
+
+This was a separate **self-hosted, same-machine** run on an isolated worktree,
+database, and Paperclip instance at App commit
+`dbe63eaae16fdb2f5386b324067e482f84f7fc7a`. The account holder generated
+one QA-only organization token in Enterpret's MCP settings. Its dashboard
+showed **Expires in 3 months**, so setup copy must not promise six months.
+The token value, feedback content, and full provider responses are excluded
+from this record.
+
+| Check | Observed result |
+| --- | --- |
+| Connect and discover | `mcp-api-key` connected as an organization grant; health was `ok`; authenticated catalog refresh found 8 tools. |
+| Safe allowed read | `get_organization_details` returned success for the intended Enterpret organization. The same bounded read succeeded again after reconnect. No quote or graph-query tool was invoked. |
+| Agent policy preview | The selected test agent's access summary changed the read action to `off` and back to `allowed` when its profile was toggled. The Test panel showed “No call will be made” while Off. |
+| Refresh and reconnect | Catalog refresh retained 8 actions. Reconnecting with the same valid token preserved the connection and catalog quarantine setting. An intentionally invalid replacement failed, then reconnecting with the valid token restored `active`/`ok`. This is **not** evidence that an expired token was renewed or that rotating a token revokes its predecessor. |
+| Activity | The safe call produced an explicit-grant decision and completed-call event. Connection activity remained queryable. |
+| Local disable and removal | Disabling the QA connection exposed zero actions in the agent access summary. Archiving it cleared the local secret, grant, install, and catalog entries. |
+| Provider-side revocation | After the Enterpret dashboard said the QA token was revoked, the same token immediately connected again and completed the same bounded organization read. Immediate provider-side invalidation **failed**. Vivek later explained invalidated tokens remain cached for 24 hours and committed to reducing the window. The new delay and deployment are unverified. Both QA connections were removed. |
+| Actual agent execution | Not exercised on this token path. An earlier OAuth QA run proved agent-session denies through the real gateway, but it does not substitute for a token-path agent process. |
+
+The board's `POST /tool-connections/:id/test-calls` is **not** an agent-policy
+denial probe. With the agent's action Off, that endpoint still returned
+`allowed` and invoked the safe provider read because it evaluates the board
+user's policy. The agent access summary and Test panel correctly showed Off.
+This mismatch is a shared Test endpoint issue, already noted in the OAuth QA
+below; do not cite the test call as proof of an agent deny. The QA profile was
+restored to Allowed. No customer-feedback content was requested.
+
+This run did not exercise a real agent process, a self-hosted VPS, or Cloud.
+Those remain separate verification steps before claiming those deployment
+shapes.
+
+### Earlier OAuth QA (2026-09-25)
+
+- Environment: an **isolated, issue-owned Paperclip runtime** on the maintainer
+ host — its own `PAPERCLIP_HOME`, its own embedded Postgres, its own ports,
+ reachable tailnet-only over HTTPS. It shared nothing with any other instance:
+ no database, no credentials, no ports, no worktree. Torn down after the run.
+- Deployment shape: **self-hosted, same machine.** Self-hosted VPS and Cloud
+ remain untested, and nothing below is inferred for them.
+- Method keys exercised: `mcp-oauth`. `mcp-api-key` remains untested.
+- Date and tested commit: 2026-09-25, App
+ `ef1606f037a7828a7ba774949e811847c1a1d386`
+- Account: a named Enterpret account holder signed in personally through the
+ isolated UI and consented. Paperclip never saw a password, an OTP or an
+ authorization code, and no token value appears in any artifact.
+- Client registration: dynamic. `registrationSource: "dcr"`, a **public** client
+ (`token_endpoint_auth_method: none`, so there is no client secret). Nothing
+ was pre-registered by hand.
+- Provider metadata: re-read on the day of the test and unchanged from the
+ 2026-09-23 reading, field for field.
+
+Unauthenticated reproduction — these need no account and are safe to re-run:
+
+```sh
+curl -s -i -X POST https://wisdom-api.enterpret.com/server/mcp \
+ -H 'Content-Type: application/json' \
+ -H 'Accept: application/json, text/event-stream' \
+ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"0"}}}'
+curl -s https://wisdom-api.enterpret.com/server/mcp/.well-known/oauth-protected-resource
+curl -s https://oauth.enterpret.com/.well-known/oauth-authorization-server
+```
+
+Reproducing the scope finding needs a live token. The shape of the check, with
+the token withheld:
+
+```sh
+# RFC 7662. `scope` here is the scope OF THIS TOKEN, which is the only place
+# the scope mismatch is visible: the token is opaque and the token response omitted
+# `scope` entirely.
+curl -s https://oauth.enterpret.com/introspect \
+ -d "token=$ACCESS_TOKEN" -d "client_id=$DCR_CLIENT_ID"
+# -> {"active": true, "scope": "openid email profile mcp:read mcp:write", ...}
+
+# Negative control, same client_id, bogus token. Proves the scope is bound to
+# the token rather than echoed back from the client registration.
+curl -s https://oauth.enterpret.com/introspect \
+ -d "token=not-a-real-token" -d "client_id=$DCR_CLIENT_ID"
+# -> {"active": false, "rejection_reason": "invalid_token"} (no `scope` field)
+```
+
+**Method note for the next connector.** Do not use
+`POST /tool-connections/:id/test-calls` to show that an ungranted agent is
+denied. It accepts an `agentId` and returns a `decision`, so it reads like an
+agent-authorization probe, but it evaluates policy as the **board user**, which
+is full-control by design. During this run it returned `decision: "allowed"` and
+executed a real provider call for an agent that was denied on all 8 tools. Every
+denial row below was instead produced through the real agent path: mint an agent
+API key, open a gateway session, and call with the session token.
+
+### Nine production-validation scenarios
+
+Per deployment, self-hosted first. Cloud has no evidence of any kind and is
+never inferred from a self-hosted result.
+
+| Scenario | Self-hosted, same machine | Self-hosted, server/VPS | Cloud |
+| --- | --- | --- | --- |
+| Setup and consent | **pass** — account holder signed in; connection reached `active`, health `ok` | not run | not run — no Cloud instance |
+| Authentication | **pass** — DCR public client registered against the live provider; token exchange succeeded | not run | not run |
+| Catalog and configuration | **pass** — authenticated `tools/list` returned 8 tools; `execute_cypher_query` absent | not run | not run |
+| Allowed execution | **pass** — `get_organization_details` resolved to the intended organization; one further bounded metadata read also succeeded | not run | not run |
+| Denied execution | **pass** — ungranted agent got HTTP 403 `deny_default` and saw 0 tools; `run_graph_query` stayed 403 for the *granted* agent | not run | not run |
+| Runtime delivery | **not proven** — gateway and policy were exercised by a real agent-authenticated session, but no agent process ever ran; see below | not run | not run |
+| Refresh and recovery | **not run** — refresh deliberately not exercised once the scope mismatch was found | not run | not run |
+| Revoke and reconnect | **cannot pass** — no `revocation_endpoint` exists to call. Local disable verified: the connection was disabled and the gateway decision flips to deny | cannot pass — structural, not deployment-dependent | cannot pass |
+| Activity and secret handling | **pass** — invocations audited with correct decisions and actor attribution; tokens AES-256-GCM at rest with no plaintext in secret storage; API returns `secretId` references only | not run | not run |
+| **Granted scope (OAuth)** | **scope mismatch observed** — reported scopes differed from the request; write capability was not established; fresh OAuth QA pending | fails identically for OAuth — provider-side | fails identically for OAuth |
+
+Self-hosted VPS and Cloud are `not run`, not "probably fine". Nothing in the
+same-machine column is carried across, and nothing here is carried over from the
+PAP-18519 loopback mirror either.
+
+**Why runtime delivery is `not proven`, precisely.** Every allowed and denied
+result above was produced through the real gateway path — an agent-minted
+session, `actor_type: agent` on the invocation row, decided by the real policy
+service. What did **not** happen is an agent *process*. Minting that session
+requires a `heartbeat_runs` row, and the two rows used here were inserted by
+hand for that precondition alone. Both show `started_at` NULL, no pid, no
+transcript and no run events other than the reaper's, and the instance later
+marked them `failed` / `process_lost` — which is the reaper correctly noticing
+there was never a process behind them, not a product defect. So this connector
+is proven to work under Paperclip's *authorization and transport* layer, and is
+untested under an actual agent runtime driving it through a heartbeat. Scenario
+6 needs a genuine woken agent run before it can be called a pass.
+
+Three further findings from the run, recorded because they change how an
+operator should read this connector rather than what it does:
+
+- **`per_user` credential policy blocks unattended agents.** A headless run has
+ no acting user, so a `kind: user` grant yields HTTP 409
+ `user_authorization_required`. The minimal fix is a delegation of that one
+ grant to that one agent — narrower than promoting to an organization grant,
+ and it widens nothing at the provider. The delegation path additionally
+ requires the run's `invocationSource` to be `automation` or `timer`; an
+ `on_demand` run stays 409. Note `credentialPolicy: per_user` is a runtime
+ default here, not something this definition pins.
+- **Tool results are persisted close to verbatim.** `result_summary` on an
+ invocation stores the provider response body with an empty `redactedFields`.
+ It stays in the instance database, but for Enterpret that means a
+ `find_user_quote` result would write customer feedback text into the run log.
+ `find_user_quote` was deliberately **not** called during validation.
+
+### Deployment support matrix
+
+Labels as defined in the connector skills' shared matrix.
+
+| Capability | Self-hosted, same machine | Self-hosted, server/VPS | Cloud |
+| --- | --- | --- | --- |
+| Definition generates, validates and typechecks | `verified` | `verified` | `verified` — the checks are deployment-independent |
+| Official branding passes the artwork checks | `verified` | `verified` | `verified` |
+| Provider metadata discovery resolves (RFC 9728 → 8414) | `verified` against the provider, from this runtime | `verified` — same request, no deployment dependency | `untested` |
+| Paperclip's discovery ladder resolves this shape | `verified` against the live provider | `untested` | `untested` |
+| DCR client registration | `verified` — public client registered at connect time, nothing pre-registered | `untested` | `untested` |
+| OAuth consent and token exchange | `verified` | `untested` | `untested` |
+| Auth-token (header) connection | `verified` — connected, discovered 8 tools, and completed a safe read on 2026-09-30 | `untested` | `untested` |
+| Authenticated `tools/list` | `verified` — 8 tools on OAuth and the organization-token path | `untested` | `untested` |
+| Agent execution through the gateway | `verified` on OAuth — allowed and denied paths through an agent-authenticated session; token path used the board Test panel only | `untested` | `untested` |
+| Execution driven by an actual agent runtime | `untested` — the sessions above were minted against hand-inserted run rows; no agent process ran | `untested` | `untested` |
+| Granted scope matches the requested scope (OAuth) | `scope mismatch observed` — fresh OAuth QA pending; scope names do not establish write capability | `failed` for OAuth — provider-side | `failed` for OAuth — provider-side |
+| Provider-side revocation | OAuth has no advertised `revocation_endpoint`; the organization token's dashboard Revoke control failed an immediate denial check on 2026-09-30 | `untested` | `untested` |
+| Store visibility (token path) | `ready` — organization auth token is primary; both auth methods target the official read-only MCP | `ready` — same definition | `ready` — same definition |
+
+### What must happen before this is store-visible
+
+**Organization auth token path (primary) — release criteria**
+
+Steps 1–3 below are **done** as of 2026-09-25 and are kept for the record. The
+mechanical store-visibility flip for the token path is also done on this branch
+(clear `availability`, remove `"enterpret"` from `APP_STORE_HIDDEN_SLUGS`, set
+`catalogVisible: true`). Remaining follow-ups improve confidence; they are
+**not** blocked on Enterpret fixing OAuth scopes.
+
+1. ~~An authorized Enterpret organization credential, held by a named owner.~~
+ **Done** — a named account holder signed in personally (OAuth path).
+2. ~~An authenticated `tools/list`, to replace the documented tool table with an
+ observed one and to classify `run_graph_query`.~~ **Done** — 8 tools
+ observed. `run_graph_query` is still not classifiable: its only annotation is
+ the provider's own `readOnlyHint: true`, which the live evidence gives no
+ reason to trust. Enterpret states public tools are read-only today; treat
+ that as product guidance, not a substitute for a Paperclip deny policy.
+3. ~~Authorization to attempt DCR against `oauth.enterpret.com`.~~ **Done** —
+ DCR succeeded; a public client, no pre-registration needed.
+4. ~~Catalog visibility for the token path.~~ **Done on this branch** —
+ `availability` cleared, `"enterpret"` removed from `APP_STORE_HIDDEN_SLUGS`,
+ `catalogVisible: true`, tests and Storybook updated so organization auth
+ token is primary. OAuth is now selectable for the official read-only MCP.
+5. **Partly done 2026-09-30:** `mcp-api-key` connected on an isolated
+ self-hosted instance; authenticated catalog, bounded allowed read, refresh,
+ failed replacement and valid reconnect, local disable, removal, and activity
+ passed. Token-path agent-session deny remains untested. The board Test
+ panel's Off preview is not a substitute for that check.
+6. **Partly done:** reconnect with the same valid token and recovery from an
+ invalid replacement passed. Recovery from actual expiry and server/VPS
+ deployment remain untested. The dashboard's revocation confirmation failed
+ the immediate invalidation check; old-token invalidation after rotation was
+ not tested.
+
+**Both auth methods — release validation and provider follow-up**
+
+OAuth is supported for the official read-only MCP. Before calling the new
+revision release-ready:
+
+- Test a fresh OAuth authorization and refresh against the current provider.
+ Record requested and reported scopes without
+ treating scope names as proof of access to the beta Agent MCP.
+- Exercise a safe allowed read and a denied call through a real agent session;
+ the board Test endpoint does not prove agent authorization.
+- Document the current revocation behavior: invalidated tokens can remain
+ active in Enterpret’s cache for up to 24 hours. Local disconnect removes
+ Paperclip’s stored credential and access, but does not immediately invalidate
+ copies elsewhere. The account holder accepted shipping with this known limit.
+- After deployment, follow up on Enterpret’s OAuth fix and reduced revocation
+ window. Confirm the new maximum delay and retest after the provider deploys
+ those fixes. These provider changes are fast follows, not release gates.
+- Keep Enterpret Agent's beta write MCP outside this PR. Adding it later needs
+ separate endpoint, credential-boundary, action-risk, and write QA review.
+
+The connector can ship with current provider behavior once Paperclip’s
+functional QA, CI, and review pass. Keep the PR draft until those checks pass;
+do not block release on the provider’s fast-follow fixes.
diff --git a/doc/connections/MEMORY.md b/doc/connections/MEMORY.md
index f2153e618c0..2b661c3184e 100644
--- a/doc/connections/MEMORY.md
+++ b/doc/connections/MEMORY.md
@@ -8,7 +8,9 @@ rotate credentials without re-enabling the toggle.
Generic custom MCP connections retain their existing behavior.
These are ordinary company-scoped tool connections. There is no separate memory
-page, automatic conversation upload, prompt injection, or background memory sync.
+page, automatic conversation upload, or background memory sync. Reviewed defaults
+use the generic [connection instructions](CONNECTION-INSTRUCTIONS.md) capability
+to explain when to recall and save; operators can edit or disable them.
Agents explicitly invoke the provider's tools through the existing gateway, and
operators manage access and actions on the regular Permissions screen.
@@ -22,7 +24,7 @@ Official documentation and public endpoint discovery checked September 24, 2026.
| [Zep](https://help.getzep.com/memory-mcp-server) | Remote MCP, `https://api.getzep.com/mcp`, OAuth | Configure Memory MCP and the identity provider in Zep first. A project administrator assigns MCP seats and shared graphs. Sign in with the assigned work identity. An ordinary Zep API key is not the credential for this endpoint. |
| [Supermemory](https://supermemory.ai/docs/supermemory-mcp/mcp) | Remote MCP, `https://mcp.supermemory.ai/mcp`, OAuth | Sign in and select the workspace, read/write access, and optional container tags offered by Supermemory. Developer API keys are separate from hosted MCP sign-in. |
| [Cognee](https://docs.cognee.ai/cognee-cloud/connections/cloud-mcp) | Bundled Cloud API bridge, Cloud API key | Copy the tenant API Base URL and key from Cognee Cloud → API Keys. Requires an active Cloud workspace. The bundled bridge works in public deployments without a local MCP runtime host. |
-| [Honcho](https://honcho.dev/docs/v3/guides/integrations/mcp) | Remote MCP, `https://mcp.honcho.dev`, Bearer API key | Create an organization and API key in the Honcho dashboard. Workspace, peer, and session selectors remain explicit provider tool arguments. |
+| [Honcho](https://honcho.dev/docs/v3/guides/integrations/mcp) | Remote MCP, `https://mcp.honcho.dev`, Bearer API key | Create an organization and API key in the Honcho dashboard. Configure the required workspace in Paperclip; it is projected into workspace-scoped tool arguments. Peer and session selectors follow provider/task context. |
Zep and Supermemory use user grants, the existing PKCE OAuth broker, and automatic
client registration/discovery. Zep advertises its authorization server at
diff --git a/doc/connections/NEON.md b/doc/connections/NEON.md
new file mode 100644
index 00000000000..253745f41f5
--- /dev/null
+++ b/doc/connections/NEON.md
@@ -0,0 +1,237 @@
+# Neon
+
+Updated: 2026-10-02. Status: catalog definition reviewed against official
+documentation and live provider metadata; live account qualification
+outstanding.
+
+Neon appears in Apps and uses Paperclip's shared remote-MCP OAuth connection,
+vault, catalog, grants, policies, gateway, and audit trail. It is a resource
+connection, not Paperclip sign-in. No plugin, provider-specific runtime code,
+or database migration is required.
+
+Paperclip connects to Neon's hosted MCP server at `https://mcp.neon.tech/mcp`.
+The connection supports two explicit methods:
+
+- browser OAuth, recommended for Neon accounts; or
+- a Neon API key stored as a Paperclip secret and sent as an
+ `Authorization: Bearer ...` header.
+
+Paperclip does not silently fall back from OAuth to an API key. The selected
+method is saved on the connection and reused for reconnects.
+
+This curated connection is the polished route: it provides branding, optional
+project pinning and read-only controls, field validation, and tailored
+guidance. None of it is *required* to reach Neon's server. Neon can also be
+connected generically from **Connect your own MCP server** by pasting
+`https://mcp.neon.tech/mcp`, with no Paperclip-specific code involved. See
+[Connecting any remote MCP server](./GENERIC-REMOTE-MCP.md).
+
+## Service involvement
+
+Neon hosts both the MCP resource and its OAuth authorization service on the
+same origin. Paperclip discovers the OAuth endpoints, dynamically registers the
+client, stores returned credentials as secret references, and handles the
+callback at `/api/tools/oauth/callback`. No Paperclip-operated vendor relay is
+involved; cloud and self-hosted instances use the same path.
+
+```mermaid
+sequenceDiagram
+ actor A as Administrator
+ participant P as Paperclip
+ participant M as mcp.neon.tech
+
+ A->>P: Choose Sign in with Neon
+ P->>M: GET /.well-known/oauth-protected-resource/mcp
+ M-->>P: Authorization server: https://mcp.neon.tech
+ P->>M: GET /.well-known/oauth-authorization-server
+ M-->>P: authorize, token, register, revoke endpoints; scopes read, write
+ P->>M: POST /api/register (dynamic client registration)
+ M-->>P: Client registration
+ P-->>A: Open browser authorization (scope: read write, PKCE S256)
+ A->>M: Approve access
+ M-->>P: Redirect to /api/tools/oauth/callback
+ P->>M: POST /api/token (authorization code)
+ M-->>P: Access and refresh tokens
+ P->>M: tools/list on /mcp with optional projectId and readonly query
+ M-->>P: Neon tool catalog
+```
+
+The hosted endpoints retrieved on 2026-10-02:
+
+| Purpose | Endpoint |
+| --- | --- |
+| MCP resource (Streamable HTTP) | `https://mcp.neon.tech/mcp` |
+| Protected-resource metadata | `https://mcp.neon.tech/.well-known/oauth-protected-resource/mcp` |
+| Authorization-server metadata | `https://mcp.neon.tech/.well-known/oauth-authorization-server` |
+| Authorize | `https://mcp.neon.tech/api/authorize` |
+| Token | `https://mcp.neon.tech/api/token` |
+| Dynamic client registration | `https://mcp.neon.tech/api/register` |
+| Revoke | `https://mcp.neon.tech/api/revoke` |
+| Paperclip callback | `/api/tools/oauth/callback` |
+
+The authorization server advertises `code` responses, PKCE `S256`,
+`authorization_code` and `refresh_token` grants, `none` client authentication
+for registered public clients, and exactly two scopes: `read` and `write`.
+Paperclip requests both so the connection has the write surface described
+below; the read-only switch narrows the server itself rather than the token.
+Caller widening beyond the reviewed scopes is rejected.
+
+Neon's older SSE endpoint (`https://mcp.neon.tech/sse`) is deprecated and
+returns `410 Gone` on or after 2026-10-01. Paperclip does not offer it.
+
+## Administrator setup
+
+1. In **Apps → Browse**, choose **Neon**.
+2. Explicitly choose **Sign in with Neon** or **Use an API key**.
+3. Continue directly with Neon's defaults. No project ID is required.
+4. Open **Advanced** only when you need to pin the connection to one
+ **project ID** or force **Read-only mode**.
+5. For OAuth, continue through browser consent. For API-key setup, create a
+ key in Neon Console → **Settings → API keys** and paste it into Paperclip.
+ Prefer a project-scoped key, which Neon limits to one project with Editor
+ rights; personal and organization keys reach every project the account can
+ access. Never put the key in connection configuration or a URL.
+6. Review discovered actions on the connection's **Permissions** screen. Every
+ discovered action starts **Allowed**, including writes and destructive
+ actions. Set deletion, branch reset, and compute mutations to **Ask first**
+ where operator review is wanted.
+
+Use a public HTTPS Paperclip origin or a loopback HTTP origin such as
+`http://localhost:3100`. A plain HTTP tailnet hostname is not loopback; use
+HTTPS or change the local canonical origin before connecting.
+
+When configured, Paperclip appends `projectId=` and `readonly=true` as
+query parameters on the server URL, exactly as Neon documents. The same URL is
+used for catalog discovery and tool execution, and a caller cannot override it.
+Neon documents a repeatable `category=` filter as well; Paperclip's
+tenant fields serialize lists as one comma-joined value, so that filter is not
+offered. Use the per-action Off / Ask first / Allowed controls to narrow the
+catalog instead.
+
+## Capabilities and policy
+
+The catalog is discovered live from the actual provider schemas. Neon groups
+its tools into these categories:
+
+| Category | What the tools do | Classification |
+| --- | --- | --- |
+| `docs` | Look up Neon documentation | Read |
+| `schema`, `observability` | Inspect tables and columns, compare schemas, query logs, check availability | Read; may expose application data |
+| `projects`, `branches`, `endpoints` | List, create, describe, delete projects and branches; manage roles, databases and computes | Write or destructive |
+| `snapshots` | Create, restore and schedule snapshots | Write or destructive |
+| `querying` | Execute SQL, apply schema changes, run diagnostics | Write; read-only mode limits SQL to `SELECT` |
+| `neon_auth`, `data_api` | Provision Neon Auth, manage OAuth providers, enable or disable the Data API | Write |
+| `functions`, `storage` | Deploy functions, manage buckets and objects | Write or destructive |
+
+Neon enforces the account, organization, and project permissions behind the
+credential. The optional project pin and read-only switch are enforced by
+Neon's server, not by Paperclip. `requiredResourceFilters: ["project"]` is
+reviewed policy metadata that names the boundary operators should set; it is
+not a local allowlist.
+
+Neon's own guidance: the hosted server grants broad database management
+capabilities, so always review and authorize actions before execution, and
+prefer development or testing projects over production data.
+
+## Vendor
+
+- App key: `neon`
+- App name: Neon
+- Reuse classification: MCP-direct
+- Reason for classification: official hosted Streamable HTTP server with
+ RFC 7591 dynamic registration and documented bearer API keys; common fields
+ represent every documented option Paperclip can serialize.
+- Security tier: S4
+- Plugin needed? No.
+
+## Transport and auth
+
+- Transport: `mcp_remote`
+- Endpoint: `https://mcp.neon.tech/mcp`
+- Auth modes: OAuth (DCR, PKCE) or API key
+- OAuth scopes: `read`, `write` (explicit, reviewed)
+- Key scope: whatever the Neon key carries; Paperclip cannot widen it
+- Credential owner: company or user grant through the standard access screen
+- Secret storage: `company_secrets` refs only
+- Revocation: Neon publishes `/api/revoke`; Paperclip removal revokes the
+ grant and deletes stored secrets
+
+## Resource filters
+
+- Required filters: none on the default path
+- Optional filters: `projectId` (query `projectId`), `readOnly` (query
+ `readonly=true`, omitted when off)
+- Write-enabling filters: none; writes depend on the credential and on
+ read-only mode being off
+- Filters enforced by: Neon's hosted server
+
+## Manifest
+
+- slug: `neon`; name: Neon; categories: `data`
+- branding: `/brands/apps/neon.png` (official touch icon, both themes)
+- docsUrl: `https://neon.com/docs/ai/neon-mcp-server`
+- methods: `mcp-oauth` (Sign in with Neon, `dcr`), `mcp-api-key` (Use an API
+ key, `customer`, `Authorization: Bearer` header)
+- tenantFields: `projectId` (text, advanced, `^[a-z0-9-]+$`, max 64),
+ `readOnly` (checkbox, advanced, default off)
+- riskTier: S4; requiredResourceFilters: `project`
+- urlPatterns: `https://mcp.neon.tech/*`; redirectConstraints:
+ `https-or-loopback-http`
+
+Source of truth: the `neon` block in `scripts/ingest-app-definitions.mjs`, the
+ledger row in `packages/shared/src/self-serve-mcp-research.json`, and the two
+reviews in `doc/connections/tool-method-permission-reviews.json`. Regenerate
+with `pnpm connections:ingest-app-definitions` (or `--definitions-only`
+without the research corpus).
+
+## Wizard path
+
+- User path: Apps → Browse → Neon → method → Access → Connect.
+- Configuration steps: none required; Advanced holds project pin and
+ read-only mode.
+- Error states: discovery or OAuth failures stay inline on Connect with a
+ retry of the same saved connection; an invalid project ID is rejected before
+ the provider is contacted.
+- Redacted metadata shown: method, pinned project ID, read-only flag. Tokens
+ and keys are never shown.
+
+## Governance defaults
+
+- Default profile and bindings: the standard connection profile; every
+ discovered action starts Allowed under the current product default.
+- Policies: operators narrow destructive categories to Ask first or Off on the
+ Permissions screen.
+- Quarantine rules: the shared defaults; no Neon-specific exceptions.
+
+## Brand provenance
+
+Neon's own app icon, the black tile with the green logomark, is used because the
+bare logomark from the brand kit is a thin outline that reads weakly at 24–36px
+on the light frame. The file is Neon's official touch icon, copied byte-for-byte
+on 2026-10-02 and used unchanged in both themes (Neon's brand colours are
+black and `#34D59A`).
+
+| File | Source | SHA-256 |
+| --- | --- | --- |
+| `ui/public/brands/apps/neon.png` (180×180) | `https://neon.com/apple-touch-icon.png`, the icon linked from `https://neon.com/` | `a6cf4b0772b06a5a64ccfefbfb8b7a1af56e0876eb10c9052f43c8624f4a0b61` |
+
+The brand kit at `https://neon.com/brand` publishes the bare logomark as SVG
+(light and dark colour variants) but no vector of the tile; the raster official
+icon is preferred over a locally composed SVG so the artwork stays the
+vendor's own.
+
+## Validation hook
+
+- Environment: definition review on 2026-10-02 against `origin/master`;
+ no Neon account was used.
+- Metadata probe: both `.well-known` documents above returned HTTP 200 with the
+ endpoints and scopes recorded here. An unauthenticated `initialize` on
+ `/mcp` returned HTTP 401 with
+ `WWW-Authenticate: Bearer ... resource_metadata="https://mcp.neon.tech/.well-known/oauth-protected-resource/mcp"`.
+- Deterministic tests: manifest shape, store visibility, artwork, reviewed
+ scopes, scope-widening rejection, URL projection of the project pin and
+ read-only flag, and invalid project ID rejection.
+- Connect evidence, catalog evidence, allowed read, governed write,
+ denied case, revoke, audit: not run. Each exposed method still needs the
+ full live lifecycle with a Neon development project before this connection
+ is considered qualified.
diff --git a/doc/connections/README.md b/doc/connections/README.md
index 7e1bfe8f051..8046e3d8e4c 100644
--- a/doc/connections/README.md
+++ b/doc/connections/README.md
@@ -13,8 +13,9 @@ Runtime authentication: [AI Connections](./AI-CONNECTIONS.md).
Long-term memory: [Experimental memory connectors](./MEMORY.md).
Provider notes: [Google Workspace](./GOOGLE-WORKSPACE.md),
-[Gmail](./GMAIL.md), [Asana](./ASANA.md), [PostHog](./POSTHOG.md),
-[AgentMail](./AGENTMAIL.md), and [iMessage Photon](./IMESSAGE-PHOTON.md). Optional credential custody:
+[Gmail](./GMAIL.md), [Asana](./ASANA.md), [PostHog](./POSTHOG.md), [Neon](./NEON.md),
+[AgentMail](./AGENTMAIL.md), [iMessage Photon](./IMESSAGE-PHOTON.md), and
+[Enterpret](./ENTERPRET.md). Optional credential custody:
[Vercel Connect](./VERCEL-CONNECT.md).
Post-read action: classify a new integration request, pick the right Paperclip
diff --git a/doc/connections/tool-method-permission-reviews.json b/doc/connections/tool-method-permission-reviews.json
index 2ef0bc115fc..9d6f6cae72b 100644
--- a/doc/connections/tool-method-permission-reviews.json
+++ b/doc/connections/tool-method-permission-reviews.json
@@ -422,6 +422,41 @@
"liveProof": "not-run",
"evidenceLimit": "Provider documentation was unavailable or not readable during this review; metadata/registered source only. Account-bound proof remains outstanding."
},
+ {
+ "app": "enterpret",
+ "method": "mcp-api-key",
+ "auth": "api_key",
+ "policy": "provider-key",
+ "requestedScopes": [],
+ "capability": "read",
+ "supportedActions": "Query the organization's customer feedback and retrieve cited quotes. The current MCP tool catalog has no write actions.",
+ "evidence": [
+ "https://helpcenter.enterpret.com/en/articles/12665166-enterpret-mcp-server",
+ "https://github.com/paperclipai/paperclip/pull/13906"
+ ],
+ "reviewedAt": "2026-09-30",
+ "liveProof": "token-connect-safe-read-refresh-reconnect-verified",
+ "evidenceLimit": "Isolated self-hosted same-machine QA on 2026-09-30. Dashboard revocation did not immediately invalidate the token: it reconnected and completed a safe read. Token-path agent-session deny, real agent process, expiry recovery, VPS, and Cloud remain untested.",
+ "keyPermissions": "An organization auth token can read that organization's customer feedback. Use a token from Settings > Enterpret MCP and check its displayed expiry there."
+ },
+ {
+ "app": "enterpret",
+ "method": "mcp-oauth",
+ "auth": "oauth",
+ "policy": "explicit",
+ "requestedScopes": [
+ "mcp:read"
+ ],
+ "capability": "read",
+ "supportedActions": "Query the organization's customer feedback and retrieve cited quotes. OAuth targets the same official read-only MCP; the separate beta Enterpret Agent write MCP is out of scope.",
+ "evidence": [
+ "https://helpcenter.enterpret.com/en/articles/12665166-enterpret-mcp-server",
+ "https://github.com/paperclipai/paperclip/pull/13906"
+ ],
+ "reviewedAt": "2026-09-30",
+ "liveProof": "tool-list-verified-scope-mismatch",
+ "evidenceLimit": "On 2026-10-01 the account holder reported Vivek confirmed the official MCP is read-only and the Agent write MCP is separate. OAuth scope-reporting and token-revocation cache fixes are committed as fast follows after connector deployment; they are not release prerequisites. Fresh authorization/refresh remain unverified. Scope names alone do not establish write access."
+ },
{
"app": "executor",
"method": "mcp",
@@ -1105,8 +1140,7 @@
"https://honcho.dev/docs/v3/guides/integrations/mcp"
],
"reviewedAt": "2026-09-30",
- "liveProof": "not-run",
- "keyPermissions": "Create peers/sessions and save memory under the API key project. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions."
+ "liveProof": "not-run"
},
{
"app": "hugging-face",
@@ -1368,6 +1402,42 @@
"reviewedAt": "2026-09-30",
"liveProof": "not-run"
},
+ {
+ "app": "neon",
+ "method": "mcp-oauth",
+ "auth": "oauth",
+ "policy": "explicit",
+ "requestedScopes": [
+ "read",
+ "write"
+ ],
+ "capability": "write",
+ "supportedActions": "Create, describe and delete projects and branches; manage computes, roles, databases and snapshots; run SQL and apply schema changes; configure Neon Auth and the Data API; read logs. Optional project pinning and read-only mode narrow the hosted server.",
+ "evidence": [
+ "https://neon.com/docs/ai/neon-mcp-server",
+ "https://mcp.neon.tech/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.neon.tech/.well-known/oauth-authorization-server"
+ ],
+ "reviewedAt": "2026-10-02",
+ "liveProof": "not-run"
+ },
+ {
+ "app": "neon",
+ "method": "mcp-api-key",
+ "auth": "api_key",
+ "policy": "provider-key",
+ "requestedScopes": [],
+ "capability": "provider-controlled",
+ "supportedActions": "Create, describe and delete projects and branches; manage computes, roles, databases and snapshots; run SQL and apply schema changes; configure Neon Auth and the Data API; read logs. Optional project pinning and read-only mode narrow the hosted server.",
+ "evidence": [
+ "https://neon.com/docs/ai/neon-mcp-server",
+ "https://neon.com/docs/manage/api-keys",
+ "https://mcp.neon.tech/.well-known/oauth-protected-resource/mcp"
+ ],
+ "reviewedAt": "2026-10-02",
+ "liveProof": "not-run",
+ "keyPermissions": "Project, branch, compute, snapshot, SQL and schema changes within the key\u2019s reach. A project-scoped key limits access to one project with Editor rights; personal and organization keys reach every project they can access. Paperclip cannot increase an existing key\u2019s permissions."
+ },
{
"app": "notion",
"method": "mcp-oauth",
diff --git a/doc/evals.md b/doc/evals.md
index 35459ea207b..a242d214731 100644
--- a/doc/evals.md
+++ b/doc/evals.md
@@ -1,8 +1,20 @@
# Paperclip evaluation guide
+The explicit-only [live provider connection suite](../tests/runner-e2e/PROVIDER-CONNECTIONS.md)
+is a Product E2E workflow for fresh subscription/API-key/gateway connections,
+with attended login and independent artifact checks against local or staging targets.
+
Paperclip has two live eval families with different questions, owners, and
evidence. Choose the family before selecting a model, profile, or case.
+The explicit-only [native instruction consolidation comparison](plans/2026-10-03-native-completion-consolidation.md)
+uses six Product E2E cells per source variant. It measures the completion
+constraint reduction separately from the earlier native tool-description
+trial. Provider-free start/resume payload capture is a byte measurement;
+behavioral qualification requires the original paired live outcomes and
+retained content. Neither source admission nor a scripted pass proves model
+behavior.
+
- **Runner Evals:** real Runner/provider behavior against a seeded mock control
plane. Definitions live in `paperclip-evals/evals/paperclip-runner`; see the
[direct live protocol evals](../packages/paperclip-runner/docs/runner-protocol-live-evals.md).
@@ -77,6 +89,17 @@ Daytona paths. Its [fixture contract](../tests/runner-e2e/README.md) distinguish
startup cancellation from active response cancellation and HTTP send replay
from ambiguous provider action recovery. Select it explicitly; `--all` excludes it.
+The explicit-only [production hiring templates suite](../tests/runner-e2e/README.md#production-hiring-templates)
+adds two local native Codex/Claude cells. It exercises API-created production
+CEO defaults, an explicitly requested hiring skill/reference read, a permanent
+coder hire, independently computed saved JSON fixtures and worker reuse.
+Each cell requires five work turns and admits at most two strictly attributed
+server task-completion turns. Every actual run remains counted; unknown or
+extra-work turns fail. Source/read coverage and workflow outcome are
+separate: missing read provenance leaves the candidate/baseline pair
+uncomparable even if work succeeds. Baseline bundles and coder examples derive
+from their own source revision, without requiring candidate wording or length.
+
The explicit-only `context-integrity` Product E2E suite covers ordered public
comment continuation and explicit invocation of an assigned pinned skill across
the seven selected legacy/native local profiles. Select it by suite or exact
@@ -84,6 +107,14 @@ execution ID because `--all` excludes explicit-only suites. Each cell applies a
1,000-cent company and agent budget hard stop before task creation and records
both limits in its evidence.
+The explicit-only [stock-harness suite](../tests/runner-e2e/STOCK-HARNESS.md)
+reuses skill, ordered-continuation, and chat-restart journeys across eight local
+legacy/native profiles with production-default hires. It closes the custom QA
+manual coverage gap. Its required credential-free prerequisite maps vendor
+instruction layering, the tiny hire bundle, and shared startup/resume reductions
+to executable checks. The 24 live cells are configured; no live qualification is
+claimed from their setup or unit calibration.
+
The explicit-only `agent-chat-stories` suite covers the experimental settings
lifecycle for a configured native agent and follow-ups during active work. Its
fixture-driven file wait and persisted-plan oracle are documented in the
@@ -384,3 +415,7 @@ The explicit-only Product E2E `confirmation-replies` suite tests conversational
approval and rejection, persisted message provenance, approval before execution,
ambiguous proposals, and the existing card-click path with native Claude/Codex.
See the [suite contract](../tests/runner-e2e/README.md#conversational-confirmation-replies-explicit-only).
+
+Hiring notification accounting now also requires exact completed action attribution. Missing native/provider ID mapping is uncomparable evidence; it must not be reported as a model task regression or waived through name/order matching. The fixture waits for both known completion callbacks and settled bracketed observations, including the gap before pending outbox work becomes a wake. Strict action replay and original machine verdicts are retained separately.
+
+The explicit-only [planning guidance utility comparison](../tests/runner-e2e/PLAN-TASK-GUIDANCE.md) measures task decomposition and handoffs with current, short, and disabled skills.
diff --git a/doc/execution-semantics.md b/doc/execution-semantics.md
index e6bd5fcf92b..6377a142b8a 100644
--- a/doc/execution-semantics.md
+++ b/doc/execution-semantics.md
@@ -452,6 +452,45 @@ Workspace incoherence feeds into the same non-terminal liveness and stranded ass
For runtime-created `git_worktree` execution workspaces, branch coherence is part of workspace coherence. The persisted execution workspace branch is the recorded branch for future dispatch. Reusing that workspace must verify that the worktree is still registered and that `HEAD` is on the recorded branch. Successful run finalization must perform the same check before recording `workspace_finalize=succeeded`. If the run switched to a publishing/PR branch without updating the execution workspace record, finalization may auto-restore the recorded branch only when the worktree is clean, still registered, and the recorded branch points at the current `HEAD`; the repair is recorded as a workspace operation before the successful finalize row. If that safe repair cannot be proven, finalization records a failed workspace finalize and the run fails with bounded evidence for the expected and actual branch. A branch change is sanctioned when a control-plane path updates the execution workspace record before finalization, when publishing work happens in a separate worktree and the managed issue worktree remains on its recorded branch, or when the finalizer performs this clean same-commit restoration.
+Sandbox Git restore uses the host branch and commit captured before staging.
+If that identity is unchanged, a rebased or amended sandbox history with shared
+ancestry replaces the starting tip instead of being merged with it. The ref
+update checks the expected old commit; a concurrent change retries through the
+normal history integration path. Git holds the HEAD and applicable branch locks
+while restore verifies the attached/detached branch identity and commits the ref
+transaction. A checkout during integration cannot redirect that write.
+The directory merge still preserves host-only
+file changes under its existing rules. A changed host branch requires recovery.
+An intentional reset to an ancestor exports a full Git bundle so restore keeps
+the actual sandbox tip; an empty delta is reserved for an unchanged tip.
+Unrelated sandbox history keeps the existing history-preserving graft only when
+the recorded host has not advanced; it must not replace concurrent host work.
+Warm sandbox reuse must match the current host Git tip and branch as well as the
+file snapshot and saved stamp, including managed nested repositories. A history
+or branch mismatch restages the host before the next run begins.
+
+### Native provider model capacity
+
+A committed Codex `turn.failed` event with `codexErrorInfo: serverOverloaded`,
+bound to the failed terminal turn and pinned execution identity, surfaces
+“Selected model is at capacity. Please try a different model.” directly.
+Paperclip preserves the accepted result and task history, then atomically records
+a durable automatic retry with its status decision. The first retry waits one
+minute; the second waits two minutes. Both spend the existing failure-retry
+budget. Exhaustion requires an explicit retry or a model change.
+
+Retries use a fresh provider session and the normal task context, without an
+automatic model switch. Consumed wake input and continuation receipts stay on
+the failed run; `retryOfRunId` supplies task history without lending the new run
+its predecessor's resume authority. Finalization replay and restart reuse the
+same successor.
+Scheduling preserves pending review authority and respects task holds; promotion,
+claim, and dispatch recheck ownership, dependencies, governance, pause, budget,
+and execution locks. Claim also waits for the predecessor's provider execution,
+workspace finalization, and environment cleanup to settle. Model incompatibility,
+usage-limit exhaustion, unknown failures, and unbound diagnostic text do not
+qualify as capacity failures.
+
### Workspace scan failures before provider startup
Repository discovery distinguishes an ordinary folder from a failed Git read.
@@ -484,9 +523,15 @@ An explicit recovery action is a typed liveness repair path for a source issue.
A terminal native failure can retain a result accepted before checkpoint or cleanup failed. That result is historical evidence, not a live controller. New user input may start a fresh turn after the controller and execution environment have stopped and ordinary admission checks pass. Preserve the failed run, its result, and its recovery budget. Do not commit the old result, infer action outcomes, or replay the failed turn. A message saved while cleanup is pending must be reconsidered after verified cleanup and delivered once. Admission must consume its deferred receipt in the same transaction that creates the new run, including in agent chat, where later messages keep their separate turns. Completing that run must not promote the consumed receipt again. Workspace-export repair retains its separate saved-result recovery path.
+When a legacy turn admitted by an explicit user message fails or times out, a bounded transient retry needs its own durable continuation authorization. Initial admission binds the message's exact body digest and revision. Scheduling requires that original binding and revalidates the human author, source task, assignee, and execution ownership, then records the successor's receipt in the same transaction as its run. Historical receipts without a message binding cannot authorize automatic retries and are not backfilled. The parent receipt remains intact. Dispatch checks the exact successor, retry parent, and unchanged message binding again. Deleted or edited input, changed actors or ownership, superseded work, and duplicate successors cannot renew authority. One-run Retry and Interrupt intents retain their separate admission contracts; they are not renewable user-message authority. Other retry policies cannot borrow this receipt: their scheduling fails closed. Successful explicit turns do not create a prose-only missing-comment follow-up with spent authority.
+
+Explicit retry admission checks the local parent adapter controller and verified environment cleanup. The existing queue-first release policy may retain only its own terminal execution claim while that cleanup is pending; finalization and the periodic stale-lock sweep reconsider the same policy after cleanup. Generic terminal-lock cleanup and stale checkout adoption leave these claims for that settlement. New user input, reassignment, and a successor's claim take precedence. Exhausted retries and revoked or missing authorization release the terminal claim without requesting another retry. Pending or failed environment cleanup cannot mint a successor receipt.
+
A new user message can continue a terminal native run whose process fields were cleared before local stop receipts existed. Admission must verify the exact run, runner, workspace, and provider session in the retained suspended state, with no active provider turn, pending tool call, or undelivered output. Missing or mismatched state keeps the hold. A later recorded process launch also keeps the hold until its stop is verified. Normal assignment, decision, controller, environment cleanup, and active-run gates still apply. The message starts one fresh conversation turn; it does not replay the failed run, reset its recovery budget, or certify unknown action outcomes.
-The task thread exposes the existing guarded Retry action for failed or timed-out legacy conversation runs. Where the server supports an explicit new attempt after a stopped legacy conversation, the thread must not hide that action solely because the old run still has a recovery-needed projection. Native and process recovery holds, pending decisions, active execution, and other retry gates remain in force. When a gate hides Retry, the thread says the message is preserved instead of promising an unavailable action. This presentation change does not rewrite historical outcomes or certify prior actions.
+The task thread exposes the guarded Retry action for failed or timed-out conversation runs and native preparation cancelled before provider startup when the never-started proof is verified. The server projects this eligibility on the recovery notice and rechecks it on Retry. Cleanup quarantine retains its inspection path, and non-conversation reconciliation gates remain enforced. Pending decisions, active execution, pause, budget, dependency, and ownership gates remain in force. A refused Retry reports its reason inline and remains available for another attempt.
+
+A continuation cancelled by the queued-run gate while waiting for review did not start a provider. Its matching dispatch-gate receipt and unclaimed execution fields keep this deliberate wait out of unknown-action reconciliation. Pending review and decision gates still apply. If an older server already created a recovery hold for this exact state, Retry or a new user message can request one fresh turn after the server verifies there is no provider, coordinator, or unfinished cleanup. Saved user input is reconsidered through the same admission path; the cancelled turn is not replayed.
A valid recovery action must name:
@@ -666,6 +711,8 @@ The same bounded rule applies when the previous heartbeat reported waiting on a
A continuation that the staleness gate cancelled with `issue_continuation_waiting_on_review` is a *deliberate park*, not a disappeared execution path. The latest run reported that the issue is waiting for review/approval (for example, an umbrella issue whose work was just decomposed into sub-tasks). Treating that park as a stranded run would retry it, then escalate it to `blocked` with a recovery action and an operator-facing failure notice — even though nothing failed and there is nothing for a human to do.
+Execution admission reads a narrow server-owned cancellation-evidence projection. Ordinary run presentation can redact `resultJson` for database encoding or output size; that presentation projection must not decide Retry eligibility or saved-input recovery. The admission projection excludes provider diagnostics and preserves whether the stored result is absent.
+
Recovery rule for a parked-for-review continuation:
- if the issue has a real waiting target — open (non-terminal) sub-tasks or existing unresolved blockers — Paperclip converts the deliberate wait into a first-class dependency wait: it sets the issue `blocked` by those issues, keeps the original assignee, and posts a plain-language comment explaining that the task will resume automatically when its dependencies finish. The issue then self-resumes through the normal `issue_blockers_resolved` path; no recovery action or escalation owner is involved
@@ -841,7 +888,7 @@ An active run can still be unhealthy even when its process is `running`. Papercl
The recovery service owns this contract:
-- classify active-run output silence as `ok`, `suspicious`, `critical`, `snoozed`, or `not_applicable`
+- classify active-run output silence as `ok`, `suspicious` after five minutes, `critical` after fifteen minutes, `snoozed`, or `not_applicable`; measure silence from the latest output, falling back to the run start when no output exists
- honor active snooze and continue decisions on the run
- permanently suppress the signal for a run after a `dismissed_false_positive` decision
- build the `outputSilence` summary shown by live-run and active-run API responses
@@ -975,6 +1022,19 @@ recording the proof and successor lineage. Retained provider files are not edite
Bootstrap retries, exact-checkpoint resumes, and fresh replacement sessions share three total provider attempts, including the original attempt. Linked run IDs, controller restarts, and duplicate wakes do not reset this budget. Automatic attempts retain the 30-second delay. Replacement scheduling and predecessor lineage commit together, with one successor per predecessor and admission through the normal task locks, authorization, pause, approval, and budget gates.
+An exact local Codex restart can restore the conversation after losing its active
+turn. Runnerd records this as `provider_turn_lost_on_restore`, with no invented
+task result. The admitted restart attempt may send one continuation in that same
+conversation. It preserves the workspace and asks the agent to reconcile unfinished
+commands and external actions before proceeding. It does not resend the task or
+tool calls. An outcome that cannot be reconciled remains a blocker. The continuation
+uses the existing durable one-shot recovery marker; recovery adopts an accepted
+turn if the controller dies before checkpointing its ID. The interrupted terminal
+is checkpointed before submission. Real provider failures, accepted semantic
+results, intentional stops, and historical unmarked failures keep their existing
+terminal behavior. This continuation uses the already charged restart attempt and
+does not reset the provider-attempt budget.
+
Provider execution and control-plane finalization have different clocks. A healthy provider can think or execute a long tool without output. Once execution settles, recovery and finalization control steps have a 60-second deadline, checked on startup and every 15 seconds. With a healthy database and scheduler, an abandoned transition must be repaired or surfaced within 90 seconds. Terminal persistence must not wait on provider cleanup or publication; a late finalizer cannot change a reassigned or closed task or release another run's locks. Historical ambiguous runs are never automatically replayed after an upgrade.
Every continuation carries the triggering request, ordered user direction, interaction outcomes, completed work, and explicit history coverage. A delivered message remains part of the task's request after its connection or approval resolves. The original title is background; a completed Notion read does not satisfy a later Gmail request. Author and source-trust boundaries survive rendering into both native and legacy prompts. Missing required history must be fetched before dispatch rather than described as complete.
@@ -1003,7 +1063,7 @@ For native conversations, an authenticated user message sent after the previous
Local recovery records a server-authored stop receipt before it clears a verified absent process identity. A new execution request invalidates that receipt before any process can spawn; recording a new process identity also invalidates it. Missing process IDs without a receipt still block admission. Remote execution continues to require termination receipts for every lease.
-If cleanup or another execution gate is still pending, the message stays in its existing queue receipt. Startup and periodic scheduling reconsider up to 50 due receipts per pass, at most once per 30 seconds per receipt, without calling a model or resetting recovery attempts. Cleanup callbacks use the same admission path. The issue lock prevents concurrent workers from delivering an adopted or discarded receipt again. The queued-message area shows the current wait reason. Pauses, approvals, budgets, ownership, and external chat authorization remain enforced. A message sent before the run finished does not grant new post-stop authority.
+If cleanup or another execution gate is still pending, the message stays in its existing queue receipt. Startup and periodic scheduling reconsider up to 50 due receipts per pass, at most once per 30 seconds per receipt, without calling a model or resetting recovery attempts. Cleanup callbacks use the same admission path. The issue lock prevents concurrent workers from delivering an adopted or discarded receipt again. The queued-message area shows the current wait reason. Pauses, approvals, budgets, ownership, and external chat authorization remain enforced. For a failed native conversation, saved authenticated messages that have never been delivered can request a fresh turn after verified stop even when submitted before the failure finished. Admission validates and adopts their exact queue receipt, order, and original authors. This does not replay the failed request or undo an operator cancellation.
Historical legacy interruption holds for conversational adapters no longer block new messages or Resume. Automatic classification uses the server-owned adapter identity saved atomically at run claim, the saved adapter invocation, or the continuation policy, never the agent’s current adapter settings. Missing historical adapter evidence retains the automatic hold; an explicit user continuation can retire it after proving the predecessor stopped. A terminal row with a live predecessor process, an unreleased environment lease, or failed/pending cleanup still blocks actual admission and Resume; a release timestamp alone does not prove cleanup succeeded. Retry scheduling can happen before cleanup, but grants no execution authority. Recovery folds their obsolete no-replay bookkeeping without changing task ownership, status, or automatically waking old work. The audit trail remains readable. Native integrity and ownership holds, and non-conversational adapter holds, remain enforced.
@@ -1045,7 +1105,7 @@ unknown, and they do not gain automatic replay eligibility.
Admission validates the persisted comment's author, task, and time against every
held predecessor. Retry validates the selected failed run's company, task, and
agent and preserves that run's identity through admission and history loading.
-Duplicate Retry requests adopt the same successor. An agent-authored comment, an old queued request, or a generic
+Duplicate Retry requests adopt the same successor. Only a validated, unconsumed human queue receipt can authorize saved-message continuation after a native failure; arbitrary historical input, an agent-authored comment, or a generic
system wake cannot release a hold. The source task keeps its assignee. Process
ownership, active controllers, cleanup leases, pause, approval, budget, and normal
execution gates still apply. Dependency-blocked interaction mode remains limited
@@ -1156,6 +1216,15 @@ controller, lease, or result). It also checks for contradictory launch/process
evidence and verifies local cleanup or exact remote termination receipts. The
preparer must have finished or its startup lease must have expired. A missing
PID alone does not establish this proof.
+For older interrupted preparation rows without a cancellation receipt, or with
+a retained startup fence but no preparation-settled marker, the
+immutable Paperclip Runner adapter claim, unresolved runtime, and preparing stage
+must agree. The old controller must belong to another server boot and its lease
+must have expired. Only absent results or the retained before-selection
+cancellation fence qualify. No native identity, coordinator, adapter invocation,
+provider event, or process-launch evidence may exist. Environment cleanup still
+requires the same receipts. This historical proof permits explicit Retry or a
+newer saved user message; it does not replay the cancelled input.
The existing bounded saved-message worker rechecks this proof after restart.
Admission atomically settles an unclaimed coordinator and admits one fresh turn,
@@ -1322,8 +1391,22 @@ execution recovery holds still apply. Unconfirmed cleanup does not start work.
The active session advertises steering only when its driver supports it. A
transport method that rejects steering does not grant that capability. The
-queued-message control remains mounted until the server accepts a steer request,
-so a rejected last-row action keeps its message and visible error.
+queued-message controller remains mounted across an empty queue, preserving
+pending delivery and inline errors. Steer immediately moves the selected message
+into the conversation; Interrupt immediately moves all submitted queued messages.
+Stale queue polls do not restore those rows while delivery is pending or accepted.
+Rejected delivery restores the latest queue and shows an inline error without a
+toast. The provider acknowledgement remains the authoritative delivery receipt;
+optimistic display never grants permission or records successful delivery. A preparing
+Paperclip Runner retains the Steer label while steering is unavailable; the
+initial legacy database default and an empty queue snapshot cannot select
+Interrupt. Model and effort changes apply to the next turn and do not change
+the active turn's steering target. While awaiting steering acknowledgement, the
+queue route holds the task and queue locks but leaves the run row available for
+PRP event persistence. It locks and rereads the run after acknowledgement before
+merging the receipt, preserving concurrent provider updates.
+If the run stops during that wait, the request fails with a stale-target error
+and retains the queued input for continuation.
### Preserve work across handoff and deliver requested files
diff --git a/doc/observability.md b/doc/observability.md
index 470d0413ef6..5c1e57c1784 100644
--- a/doc/observability.md
+++ b/doc/observability.md
@@ -443,6 +443,43 @@ values become `unknown`. A signal such as `SIGKILL` does not establish who sent
it or prove an out-of-memory kill. These fields do not change error grouping
or run outcomes, and do not include process output or adapter result payloads.
+For a native Codex turn that ends with a structured HTTP 400 model/ChatGPT
+compatibility rejection, the run records `native_provider_model_rejected`
+and a fixed message that asks the user to select a supported model or connection.
+This requires a committed runner terminal for the selected model and the exact
+failed turn. Agent text, tool output, unrelated turns, and unknown provider
+errors do not create this classification. The provider diagnostic contains only
+`provider=codex`, `category=model_auth_incompatible`, `status=400`, and
+`authMode=chatgpt`. It excludes the model name and provider response. This does
+not change credentials, select a fallback model, replay a turn, or alter the
+accepted semantic result or cleanup. The existing configuration-blocker recovery
+path requires a configuration change instead of automatically retrying the same
+model and connection. Native finalization also derives this evidence from the
+committed event and the run's pinned provider configuration before it can queue
+a failed-result retry. This survives a controller restart before the adapter
+diagnostic is saved. Invalid bindings, missing evidence, or a mismatched event
+hash do not grant this classification. A current worker's task is blocked for a
+configuration change. A pending review instead keeps its original decision and
+status version, releases execution, and creates no automatic recovery action.
+After repairing the configuration, explicitly retry the reviewer to resolve the
+same pending review. The Board's exact failed-run Retry accepts this classified
+native failure only while its saved review is still current and pending; caller
+payloads cannot select a different review. Dispatch checks that assignment again.
+Superseded or completed reviews retain their authority.
+
+Cloud portfolio proxy failures have an event-local `cloud_portfolio` context.
+It contains only the phase (`fetch`, `http_response`, `response_body`, or
+`response_write`), upstream HTTP status when available, elapsed milliseconds,
+and an allowlisted network error code. Unknown values become `unknown` or
+`null`; elapsed time outside 0–60,000 ms becomes `null`. Codes come from at
+most four error/cause objects' own data properties, never error messages.
+`DEADLINE_EXCEEDED` means the request's own ten-second signal was aborted.
+The route's warning uses the same safe fields. Neither record includes URLs,
+headers, cookies, bodies, user/stack IDs, or the original exception. Sentry
+receives a plain error with the existing generic message and default grouping.
+The context does not change the HTTP response, authentication, cookies, cache,
+deadline, or single-fetch behavior, and does not carry into unrelated events.
+
An unconfirmed adapter Stop timeout has an event-local `adapter_stop` context:
the run UUID, built-in adapter type, native/legacy runtime mode, configured
wait duration, and whether abort was requested. Invalid identities become
@@ -453,6 +490,19 @@ termination, remove the live execution control, or change the timeout. The
context is sent only through the existing opt-in Sentry gate and never leaks
into unrelated captures.
+The context also samples the pending execution `phase` and `phaseElapsedMs`
+when the Stop timer expires. An in-memory tracker belongs to the exact live
+execution control; a replaced or missing owner reports `unknown` with a null
+elapsed time. Labels come from a closed list and elapsed time uses a monotonic
+clock, capped at one day. Nested scopes remain visible while their awaits are
+pending, including ACP session close, transport stop, instruction collection,
+workspace restore, and host instruction or lease cleanup. `phase_reporting`
+means a step is waiting to write timing or teardown error diagnostics. `adapter_execution` and
+`host_execution` are coarse labels for work outside those narrower scopes.
+The tracker clears when its executor finishes. A phase is diagnostic context,
+not evidence that a provider stopped or that files were recovered. No new
+run-log or Telemetry event is emitted by this tracker.
+
The shared reporter also attaches bounded diagnostic contexts for both legacy
and native runs:
@@ -475,6 +525,15 @@ pending. Recent events do not prove useful progress. These fields contain only
numbers and a boolean, never tool names, IDs, arguments, or event content, and
do not change the execution timeout, cancellation, or recovery policy.
+ACP results retain the adapter's resolved wall-clock timeout as
+`adapterExecutionTimeout` in the instance run result. Finalization uses it for
+`effectiveTimeoutSec`, `timeoutSource`, and `timeoutConfigured`. Sources are
+`configured`, `sandbox_default`, or `unlimited`; `timeoutConfigured` identifies an
+explicit override, including a negative value that disables the timer. An untouched
+sandbox value of zero reports the four-hour default, while a local zero reports
+unlimited. Older adapters without a valid resolution retain the config-based
+metadata fallback. This does not change timers, Stop acknowledgement, or recovery.
+
When settlement records a workspace restore failure, `run_execution` also
includes `workspaceRestoreFailure` with one of the shared, path-free codes:
`restore_permission_denied`, `restore_lock_timeout`, `restore_unsafe_archive`,
@@ -482,6 +541,33 @@ or `restore_failed`. Unknown values are omitted. Workspace paths and arbitrary
pre-restore result data are not included. A later successful run does not, by
itself, establish that an earlier failed restore recovered the workspace files.
+When available, the saved `workspaceRestoreDiagnostic` adds the bounded fields
+`workspaceRestorePhase`, `workspaceRestoreStep`, `workspaceRestoreErrorCode`,
+`workspaceRestoreHttpStatus`, and `workspaceRestoreExitCode` to `run_execution`.
+The phase is `workspace` or `asset`. The failing step is one of `git_export`,
+`git_import`, `workspace_transfer`, `workspace_extract`, `directory_merge`,
+`git_integration`, `index_reset`, `git_ref_cleanup`, or `asset_restore`.
+Nested steps retain the most specific failing operation. Error codes come from
+the restore diagnostic allowlist, with unrecognized codes reported as `unknown`;
+HTTP statuses are integers from 400 through 599 and process exit codes are
+integers from 1 through 255. These fields accompany a known restore failure code
+only. They omit error messages, raw command lines, paths, process output, and arbitrary
+cause data. Git error wrappers preserve only these safe codes and numbers for
+diagnostics, without adding the original error as a cause.
+For `git_integration`, optional `workspaceRestoreGitCommand` identifies the fixed
+command family: `rev_parse`, `symbolic_ref`, `merge_base`, `merge_tree`,
+`commit_tree`, `update_ref`, or `log`. `workspaceRestoreGitFailureKind` is
+`merge_conflict`, `invalid_object`, `ref_conflict`, `permission_denied`, or
+`unknown`. A merge conflict requires an uninterrupted `merge-tree --write-tree`
+exit of 1 with a completed tree ID in stdout; exit 1 alone is ambiguous.
+Object and ref classifications require recognized Git diagnostics;
+permission denial requires an OS `EACCES` or `EPERM` code. Unrecognized or
+localized messages remain `unknown`. Up to 16 KiB of stderr is inspected only
+in memory; no arguments, stderr, paths, repository URLs, filenames, or ref names
+enter these fields. Handled probes and successful retries emit no diagnostic.
+This does not change
+restore behavior, retries, timeouts, or recovery policy.
+
A caught directory-merge lock timeout also records `restoreLockOwnerState`
(`alive`, `dead`, `unknown`, `missing`, or `invalid`), `restoreLockKnownLocalHolder`,
and, when available, `restoreLockOwnerSameProcess`, `restoreLockOwnerPredatesProcess`,
diff --git a/doc/openai-dot-runner.md b/doc/openai-dot-runner.md
index 3d444fd75c2..30125996db0 100644
--- a/doc/openai-dot-runner.md
+++ b/doc/openai-dot-runner.md
@@ -33,6 +33,18 @@ Only the operator's one-use pairing code is displayed. OAuth tokens and callback
signing secrets stay on the server and never enter the Runner descriptor,
task prompt or saved adapter config. Pairing codes expire after 15 minutes.
+The dedicated connection uses the merged MCP gateway's PKCE browser and device
+flows, including verified client metadata documents and organization hints.
+Its issuer is `/mcp/runner/oauth`; the personal issuer remains ``.
+The shared consent page identifies Dot agent access and requires an operator
+role. Device codes and browser requests stay bound to their original resource
+and organization. The gateway's Connections invitations remain personal
+assistant invitations; use the agent's Dot connection panel for Runner pairing.
+
+Database migration `0311_known_inertia.sql` adds only Dot tables and extensions
+after the merged gateway migrations. It is safe to reapply. The earlier
+prototype migration number is retired; published master migrations are intact.
+
## Assignment protocol
Events contain mailbox references. Dot drains the inbox after its saved cursor,
diff --git a/doc/plans/2026-09-30-paperclip-public-mcp-and-plugins.md b/doc/plans/2026-09-30-paperclip-public-mcp-and-plugins.md
index c351b377f8a..a11926146d5 100644
--- a/doc/plans/2026-09-30-paperclip-public-mcp-and-plugins.md
+++ b/doc/plans/2026-09-30-paperclip-public-mcp-and-plugins.md
@@ -355,7 +355,7 @@ Current local qualification:
exact source fingerprints and costs.
This is a usable opt-in first release for existing teams. Applying Core updates
-adds migrations 0294, 0295 and 0296 plus disabled MCP code. An operator must enable
+adds migrations 0301 through 0305 plus disabled MCP code. An operator must enable
**Settings → Experimental → Assistant connections (MCP)**, configure the public URL, and expose the
authenticated instance over HTTPS. A team member can then connect Codex or Claude
Code directly, consent to a company, review work, delegate tasks as themselves,
diff --git a/doc/plans/2026-10-02-composio-connection-model.md b/doc/plans/2026-10-02-composio-connection-model.md
new file mode 100644
index 00000000000..9fcf37ae5c3
--- /dev/null
+++ b/doc/plans/2026-10-02-composio-connection-model.md
@@ -0,0 +1,164 @@
+# Composio connections and permissions in Paperclip
+
+October 2, 2026 · Current behavior and proposed product model
+
+**Composio should be the source of truth for its app accounts. Paperclip should show those accounts and control who can use the saved Composio connection.** Connecting Circleback in Composio should not require connecting it again in Paperclip when the saved gateway can already reach that account.
+
+The current integration supports direct app authorization and checking known accounts, but discovery is incomplete. Its Circleback cards also look like independent Paperclip connections even though their permissions belong to the entire Composio gateway. This document explains that distinction and proposes a clearer experience. Recommendations below are proposals; this document does not change product behavior.
+
+## What the saved connection actually represents
+
+The default integration uses Composio Connect at `https://connect.composio.dev/mcp`. Composio describes this as one MCP connection that discovers and executes tools across apps through orchestration tools. It is different from an application creating its own Composio SDK session. [Composio Connect documentation](https://docs.composio.dev/docs/composio-connect)
+
+There are three objects to distinguish:
+
+| Object | Meaning |
+| --- | --- |
+| Saved Composio connection in Paperclip | An endpoint, credentials, access rules, and tool catalog. We have called this a gateway. Multiple saved Composio connections are possible. |
+| Connected app account in Composio | A particular authorized Circleback, Spotify, or other app account. |
+| App row in Paperclip | A cached observation of an account available through a saved gateway, plus a convenient setup or management entry point. |
+
+**An observed Circleback row does not create another credential or independent connection in Paperclip.** The public app catalog is another separate thing: it says Composio supports Circleback, without proving that this gateway has an authorized Circleback account.
+
+Composio accounts are scoped. Projects separate resources, and connected accounts belong to an upstream user identity. Dashboard-created accounts use a Composio dashboard user identity, which is different from an application's `user_id`. Matching a person's email or using the same Composio brand is insufficient to establish that two integrations reach the same accounts. [Project isolation](https://docs.composio.dev/reference/api-reference/projects), [Connected account identities](https://docs.composio.dev/reference/api-reference/connected-accounts)
+
+For our existing Connect gateway, the practical question is: **Does listing Circleback through this exact saved credential return the account?** That check is stronger evidence than seeing Circleback somewhere in the Composio dashboard. The current integration has not established a general mapping from Connect OAuth identity to every dashboard project.
+
+## What happens to tools
+
+Paperclip does expose the gateway's tools to permitted agents. It reads the upstream MCP `tools/list`, stores the returned definitions, presents eligible tools through its own runtime, checks policy, and forwards execution to the saved endpoint using server-resolved credentials.
+
+That is a proxy of the upstream tool catalog. It does **not** turn every app in our public catalog into its own set of executable Paperclip tools.
+
+```mermaid
+flowchart LR
+ Agent --> Policy[Paperclip gateway access and tool policy]
+ Policy --> Tools[Composio MCP tools]
+ Tools --> Accounts[Composio authorized app accounts]
+ Accounts --> Circleback[Circleback]
+ Apps[Paperclip Apps page] --> Check[Read account status through saved gateway]
+ Check --> Accounts
+ Check --> Cache[Safe account observations]
+ Cache --> Apps
+```
+
+The live test gateway currently has 11 active Composio catalog entries, including search, schemas, connection management, batch execution, and workbench tools. It does not list a separate Circleback tool set. Circleback execution happens behind those Composio tools. A custom session endpoint could expose a different catalog; the actual upstream definitions determine what Paperclip presents.
+
+Consequently, an account can be available for execution even before the Apps page discovers it. The account snapshot is a display cache, not an execution allowlist.
+
+## What currently works and what is incomplete
+
+These findings come from the current worktree and a read-only check of the local test gateway.
+
+| Capability | Current behavior |
+| --- | --- |
+| Reuse an already connected app | Setup lists the requested toolkit first. An active account skips creating another authorization link. No agent task is necessary. |
+| Authorize an app from Paperclip | The backend requests a hosted Composio authorization link. Completion checks account status again. |
+| Recognize a known account | Safe account IDs, aliases, statuses, default flags, and check times are cached. A fresh check confirmed Circleback is active. |
+| Discover an app connected independently | The Apps page checks its visible catalog toolkits and previously observed or configured toolkits. A previously unseen app can remain undiscovered until its page or search is checked. |
+| Notice external disconnection | Rechecking a known toolkit replaces the observation with the provider's returned account list. Until then, the card can be stale. |
+| Rename or remove an app account | Paperclip calls Composio, then lists accounts again to confirm the change. This changes upstream state. |
+| Give Circleback its own agent permissions | The row's Permissions action opens the saved Composio gateway's permissions. It is not an independent Circleback permission boundary. |
+
+Refresh happens on page entry, changes to the visible catalog query, and browser focus. The one-minute query freshness setting is **not** a background polling schedule. We have no full inventory reconciliation job or lifecycle webhook integration here.
+
+If a provider check fails, we preserve previous observations and show an error. That avoids interpreting a failed request as a disconnection, but the old green check can still look current. The UI should distinguish **last confirmed connected** from **verified now**.
+
+Two additional presentation gaps matter:
+
+- Native connector precedence currently excludes overlapping aggregator cards altogether. A native Notion offer can therefore hide the fact that Notion is already available through Composio. We should suppress duplicate connection offers while still showing real upstream accounts and their source.
+- The aggregator row's “Connected by” identity comes from the saved gateway owner metadata. It does not establish who authorized the app independently in Composio. Preserve the account-row visual style, but use truthful attribution such as **Via “Work Composio”** unless the upstream author is known.
+
+## Who owns which permissions
+
+| Question | Authority |
+| --- | --- |
+| Is this app account authorized and active? | Composio, backed by the app's authorization. |
+| What access did the app's OAuth consent grant? | The app and Composio's authorization configuration. |
+| Can this Paperclip human or agent use the saved gateway credential? | Paperclip's grants and access controls. |
+| Is this exposed MCP tool allowed, denied, or subject to approval? | Paperclip's tool policy. |
+| Can this agent use only Circleback through a broadly enabled Composio executor? | Not established by the Circleback app row or its current Permissions link. |
+
+New gateways now default to all humans and all agents. That makes the gateway available to those actors; it does not override credential requirements, tool policies, or Composio's own account restrictions. App setup preserves the saved gateway's existing rules.
+
+The policy system evaluates the catalog entry being invoked. For example, it sees `COMPOSIO_MULTI_EXECUTE_TOOL`; it does not automatically expand every nested app action into a separate Circleback permission decision. The current integration has no Composio-specific layer that grants or denies downstream toolkit/account operations independently.
+
+An approval for a broad execution tool is therefore an approval for that call and its arguments. It should not be presented as a verified per-app read/write policy. Generic argument rules can constrain particular shapes, but do not by themselves provide comprehensive app isolation across batch execution and workbench paths.
+
+Likewise, an app card's absence, a native app's precedence, or removing a cached observation cannot stop a permitted gateway from reaching an upstream account. A visual catalog choice is not a runtime restriction.
+
+## What connecting or disconnecting elsewhere should mean
+
+The following is the proposed behavior, assuming the account belongs to the identity and scope reachable by the saved gateway.
+
+| Event | Expected Paperclip behavior |
+| --- | --- |
+| Connect Circleback in Composio | Import it into connected apps automatically. No second OAuth flow or local activation step. |
+| Click Connect when Circleback is already active | Verify and show the existing account. Do not create another account. |
+| Disconnect Circleback in Composio | Update the account row after reconciliation. Provider execution follows upstream state even while our card is stale. |
+| App authorization expires | Show Needs sign-in and offer the provider's reauthorization flow. |
+| Composio cannot be reached | Keep the last observation, mark it stale, and show Check again. Do not claim a confirmed disconnection. |
+| Add a second account for the same app | Show both accounts. Do not imply that clicking one pins all later agent calls to it unless execution actually enforces that choice. |
+| Remove Composio from Paperclip | Remove local access to that saved gateway. Keep upstream app accounts in Composio. |
+
+Composio documents automatic OAuth token refresh and an expired-account event. That gives us one potential sync signal, but does not prove that our Connect credential can subscribe to every creation, deletion, or status event. [Authentication lifecycle](https://docs.composio.dev/docs/authentication)
+
+## The experience I recommend
+
+**Keep one saved connection per Composio account or configured endpoint, show its apps as imported accounts, and manage app authorization in Composio.** This matches the underlying system and keeps our interface small.
+
+1. **Connecting Composio imports its available accounts.** Put them above the catalog using the same divider, check, logo, and account-row layout as other connections, with a Composio badge and quoted gateway name. Label this inventory as connected apps, rather than apps separately installed into Paperclip.
+2. **Connect asks which saved Composio account to use, or offers a new one.** Check existing authorization first. If needed, open a provider-generated sign-in link directly and verify the result. No agent picker or task draft.
+3. **An app's Manage action shows its accounts and opens Composio management.** Prefer a toolkit/account-specific URL where supported and verified; otherwise link clearly to Composio. Do not promise a deep link that the provider does not expose.
+4. **Permissions live on the Composio gateway.** From an imported app row, call the action **Composio permissions** and explain once that changes apply to apps accessible through that gateway. Keep native connector permissions independent.
+5. **Manage upstream app removal in Composio for the initial model.** Reserve **Remove connection** in Paperclip for removing the saved gateway locally. If we retain direct upstream removal, name it **Disconnect from Composio** and explicitly say it can affect other clients using that account.
+
+This is a UX recommendation, not a technical inability to remove accounts. Composio Connect supports account creation, listing, renaming, and removal, and our backend already implements those operations. [Connection management capabilities](https://docs.composio.dev/docs/composio-connect)
+
+Removing an account from Composio should also not be described as guaranteed revocation of the target app's OAuth grant. Composio distinguishes removing an account from revoking its authorization at the provider. [Connected account lifecycle](https://docs.composio.dev/reference/api-reference/connected-accounts)
+
+For native overlaps, keep the native Connect offer as requested, but include actual Composio accounts in the connected inventory with their source visible. A Composio account should never silently become a native account.
+
+## How to make discovery complete
+
+The current per-toolkit checks are useful, but cannot support the promise “we automatically import everything you already connected.” Scanning thousands of catalog toolkits is an expensive substitute and can still miss apps absent from our public catalog.
+
+Composio provides a paginated connected-account API with project-key authentication and user/toolkit/status filters. Its SDK also offers paginated session toolkit discovery filtered to connected apps. These are better building blocks for inventory than probing every public catalog entry. [Connected-account API](https://docs.composio.dev/reference/api-reference/connected-accounts/getConnectedAccounts), [Session inventory](https://docs.composio.dev/docs/configuring-sessions)
+
+**The unresolved integration question is whether we can enumerate that same inventory using the identity behind our current Connect OAuth gateway.** We must not assume that credential is a project API key or that a dashboard project's users match it. Listing every account in a project without the correct identity filter would not answer the user's question.
+
+Proposed implementation order:
+
+1. Establish a supported inventory API for the saved credential, including its upstream subject, project/session scope, and shared-account semantics. If Connect cannot provide this, evaluate an explicit project/session integration as a separate setup mode.
+2. Reconcile every inventory page on connection completion and refresh; add bounded background reconciliation and supported event notifications. Events trigger another authoritative read rather than becoming a second source of truth.
+3. Store only safe metadata, scoped to company, gateway, and resolved credential identity. Preserve last-success time and sync errors. Change credentials or upstream identity without carrying over another identity's connected status.
+4. Reconcile removals only after a complete successful listing. Partial pages and failed calls must not delete unseen accounts. Surface unknown custom apps using provider metadata where available.
+
+Until the identity-bound enumeration route is proven, describe the current display as **apps checked through this connection** rather than complete synchronization. The current cache uses a credential-reference fingerprint; that is not proof of the upstream user's identity.
+
+## If we later want independent app permissions
+
+We should decide this separately from inventory. The simpler gateway model is valid, provided the interface is honest about its scope.
+
+Composio SDK sessions can restrict toolkits, tools, and selected connected accounts. A session MCP endpoint can use those restrictions and a direct-tools preset to expose an explicit tool set. That offers a possible route to enforced per-agent scope, but it requires a different integration contract from merely observing accounts behind Connect. [Session configuration](https://docs.composio.dev/docs/configuring-sessions), [Session MCP endpoints](https://docs.composio.dev/docs/sessions-via-mcp)
+
+The other route is a Paperclip executor that validates every downstream tool and account and prevents broader execution paths from bypassing those rules. This is substantial runtime work. Adding a per-app toggle while leaving unrestricted gateway execution available would not establish the promised boundary.
+
+For apps already supported natively, a native connection remains the clearest way to apply that connector's individual access controls.
+
+## Evidence and checks still needed
+
+The local gateway returned 11 active Composio tools, and a fresh read through our app refresh endpoint confirmed an ACTIVE Circleback account. This proves account-status checking for that saved credential. It does not prove all-app enumeration, a successful Circleback business operation, external lifecycle synchronization, or independent Circleback permissions. No real account was disconnected or permission changed for this document.
+
+Before claiming complete sync, demonstrate an app connected independently in the matching Composio scope appearing without searching for it; then externally disconnect a disposable test account and verify both the UI and execution outcome. Also check account isolation, multiple-account selection, provider failures, native overlaps, and gateway removal without upstream account deletion.
+
+Implementation evidence in this worktree:
+
+- `server/src/services/tool-access.ts`: `openComposioGateway`, `setupComposioApp`, `refreshComposioApps`, and `manageComposioAppAccount` implement checks, safe observations, and upstream mutations.
+- `server/src/services/tool-gateway.ts`: `policyInputForAgentTool` and remote MCP execution show the tool-policy boundary and forwarding of catalog tool names and arguments.
+- `server/src/services/tool-access-policy.ts`: catalog entries and saved connections determine the policy context; no automatic downstream Composio app expansion is implemented.
+- `ui/src/pages/apps/Browse.tsx`: native precedence, page-based discovery, connected-account rows, permission links, and owner attribution.
+- `packages/db/src/schema/tool_connection_app_snapshots.ts`: cached account observations, separate from connection grants.
+- `doc/connections/CONNECTOR-PLAYBOOK.md`: the current aggregator catalog and setup behavior.
+
+The recommendation is to adopt the provider-owned account model now, then prove complete discovery before promising it. Independent app permissions can follow if we choose to build and enforce them.
diff --git a/doc/plans/2026-10-02-hiring-executable-accounting-replay.json b/doc/plans/2026-10-02-hiring-executable-accounting-replay.json
new file mode 100644
index 00000000000..7a3c6caaf07
--- /dev/null
+++ b/doc/plans/2026-10-02-hiring-executable-accounting-replay.json
@@ -0,0 +1,740 @@
+{
+ "schema": "paperclip.hiring-executable-accounting-replay.v1",
+ "assessmentType": "Provider-free replay through both new executable guards; original model measurements and verdicts unchanged",
+ "evaluatedCodeRevision": "eef64009dc144b91b245a731ea9a1c3c07406a19",
+ "evaluatedCodeHashes": {
+ "tests/runner-e2e/hiring-template-cases.ts": "06915e33cc9a5241cd28a7184fa33d098c30aed4114accea4f93838aaba3738f",
+ "tests/runner-e2e/hiring-template-scoring.ts": "a9e1efa7e11bad3aa8dc873a28325b3153799251740ae87c4623a08f7d45a5cb",
+ "tests/runner-e2e/hiring-template-flow.ts": "f3c6d29dc5019955dda4372ead7a9fdfbde447b7b92ef103527b9393ec60bd30",
+ "tests/runner-e2e/hiring-template-turn-accounting.ts": "8f2ad8b09e419796b372929b59dc7f86d41dcbf3a3144c45e329a1aa988b383b",
+ "tests/runner-e2e/chat-flow.ts": "09dd87ef7aef299ddbd1fad65b72817c042595f9e4a4e699c430497ac053a2d4"
+ },
+ "graderVersion": "paperclip.hiring-templates.v2",
+ "definitionDigest": "4d527906a967ca71c4c0e62cfbdc3405419931bcd6741b0630c4223bed2d4b6a",
+ "providerCalls": 0,
+ "newProviderRuns": 0,
+ "automaticRetries": 0,
+ "summary": {
+ "originalPairs": "Codex Fail→Fail; Claude Fail→Fail",
+ "correctedWorkflowOutcomePairs": "Codex Pass→Pass; Claude Pass→Pass",
+ "fullAttemptComparison": "Uncomparable in both profiles and variants; source-read coverage unchanged",
+ "originalMachineFailuresPreserved": 4,
+ "correctedScorerGuardsPassed": 4,
+ "correctedFinalChatGuardsPassed": 4,
+ "unchangedCoverageAssessments": 4,
+ "unchangedOtherOutcomeAssessments": 4,
+ "actualMeasuredRuns": 28,
+ "actualModelChargesKnown": false,
+ "broadEquivalenceEstablished": false
+ },
+ "assessments": [
+ {
+ "variant": "candidate",
+ "profile": "runner-codex",
+ "original": {
+ "sourceRevision": "9f5404ad3aacbe76777952759414d34fd381e674",
+ "graderVersion": "paperclip.hiring-templates.v1",
+ "definitionDigest": "4d7f18420889325af89aa48eaaf021e8178aa6d26d504b92041635a15741f004",
+ "machineStatus": "failed",
+ "outcomePassed": false,
+ "countCheckPassed": false,
+ "comparisonStatus": "uncomparable"
+ },
+ "corrected": {
+ "graderVersion": "paperclip.hiring-templates.v2",
+ "definitionDigest": "4d527906a967ca71c4c0e62cfbdc3405419931bcd6741b0630c4223bed2d4b6a",
+ "outcomePassed": true,
+ "comparisonStatus": "uncomparable",
+ "scorerGuardPassed": true,
+ "finalChatGuardPassed": true,
+ "turnAccounting": {
+ "version": "paperclip.hiring-template-turn-accounting.v1",
+ "counts": {
+ "requiredWorkTurns": 5,
+ "maximumCompletionTurns": 2,
+ "maximumTotalTurns": 7,
+ "requestedLeadTurns": 3,
+ "coderTurns": 2,
+ "completionTurns": 2,
+ "unclassifiedTurns": 0,
+ "snapshotRunCount": 7,
+ "actualRunCount": 7,
+ "costAccountingRunCount": 7
+ },
+ "predicates": [
+ {
+ "id": "known-fixture-context",
+ "passed": true
+ },
+ {
+ "id": "complete-public-run-ledger",
+ "passed": true
+ },
+ {
+ "id": "exact-five-required-work-turns",
+ "passed": true
+ },
+ {
+ "id": "successful-native-without-retries",
+ "passed": true
+ },
+ {
+ "id": "resolved-company-account-and-identity",
+ "passed": true
+ },
+ {
+ "id": "three-distinct-requested-chat-turns",
+ "passed": true
+ },
+ {
+ "id": "one-coder-execution-per-known-task",
+ "passed": true
+ },
+ {
+ "id": "task-origins-are-first-two-requested-turns",
+ "passed": true
+ },
+ {
+ "id": "bounded-server-completion-receipts",
+ "passed": true
+ },
+ {
+ "id": "completion-runs-have-attributed-chat-replies",
+ "passed": true
+ },
+ {
+ "id": "no-notification-created-extra-tasks",
+ "passed": true
+ }
+ ],
+ "passed": true
+ },
+ "checks": [
+ {
+ "id": "one-coder-hire",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly one permanent coding teammate reports to the lead."
+ },
+ {
+ "id": "execution-account",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Hire keeps the lead model and managed account binding."
+ },
+ {
+ "id": "two-worker-tasks",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Both independent tasks are completed by the same coder in the chosen project."
+ },
+ {
+ "id": "bounded-work-and-completion-turns",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly three requested lead turns and two coder executions, plus at most two strictly attributed completion notifications; every actual run remains counted."
+ },
+ {
+ "id": "initial-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Independent computation checks each original input/value and worker authorship."
+ },
+ {
+ "id": "reused-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "The reused coder applies the changed separator to every input."
+ },
+ {
+ "id": "original-preserved",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Reuse preserves the original document, revision and task identity."
+ },
+ {
+ "id": "source-fingerprints",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Served instruction and hiring source bytes match the evaluated revision."
+ },
+ {
+ "id": "production-ceo-bundle",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The API-created lead receives this revision's default CEO bundle, without a fixture override."
+ },
+ {
+ "id": "assigned-hiring-skill",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Production CEO defaults assign the hiring skill."
+ },
+ {
+ "id": "production-source-reads",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Completed lead read receipts before the hire prove the explicitly requested skill, guide, checklist and coder example paths. Unrecognized or missing reads leave coverage uncomparable."
+ },
+ {
+ "id": "supplied-coder-instructions",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Saved hired instructions use the source revision's coder example with its company/name placeholders filled."
+ },
+ {
+ "id": "hired-instructions-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The same saved instruction bundle survives the reused worker execution."
+ },
+ {
+ "id": "hired-skills-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The saved skill selections survive the reused worker execution."
+ }
+ ]
+ },
+ "coverageUnchanged": true,
+ "otherOutcomesUnchanged": true,
+ "originalBytesUnchanged": true,
+ "inputSha256": {
+ "result": "44cbf64cfabd0257f31fb4d6909018d346f5667b0a7b3d7e855a2ece7e29c292",
+ "hiringTemplate": "9609ddcb81c6bee3c5db97312138b4ea3e294da13ea540e41f363c826a514067",
+ "apiState": "ef02af29bcf61ff3eace0549ca164a28c7950d1a3e14fc58c89bf9cb0f944b4d"
+ }
+ },
+ {
+ "variant": "candidate",
+ "profile": "runner-acpx-claude",
+ "original": {
+ "sourceRevision": "9f5404ad3aacbe76777952759414d34fd381e674",
+ "graderVersion": "paperclip.hiring-templates.v1",
+ "definitionDigest": "4d7f18420889325af89aa48eaaf021e8178aa6d26d504b92041635a15741f004",
+ "machineStatus": "failed",
+ "outcomePassed": false,
+ "countCheckPassed": false,
+ "comparisonStatus": "uncomparable"
+ },
+ "corrected": {
+ "graderVersion": "paperclip.hiring-templates.v2",
+ "definitionDigest": "4d527906a967ca71c4c0e62cfbdc3405419931bcd6741b0630c4223bed2d4b6a",
+ "outcomePassed": true,
+ "comparisonStatus": "uncomparable",
+ "scorerGuardPassed": true,
+ "finalChatGuardPassed": true,
+ "turnAccounting": {
+ "version": "paperclip.hiring-template-turn-accounting.v1",
+ "counts": {
+ "requiredWorkTurns": 5,
+ "maximumCompletionTurns": 2,
+ "maximumTotalTurns": 7,
+ "requestedLeadTurns": 3,
+ "coderTurns": 2,
+ "completionTurns": 2,
+ "unclassifiedTurns": 0,
+ "snapshotRunCount": 7,
+ "actualRunCount": 7,
+ "costAccountingRunCount": 7
+ },
+ "predicates": [
+ {
+ "id": "known-fixture-context",
+ "passed": true
+ },
+ {
+ "id": "complete-public-run-ledger",
+ "passed": true
+ },
+ {
+ "id": "exact-five-required-work-turns",
+ "passed": true
+ },
+ {
+ "id": "successful-native-without-retries",
+ "passed": true
+ },
+ {
+ "id": "resolved-company-account-and-identity",
+ "passed": true
+ },
+ {
+ "id": "three-distinct-requested-chat-turns",
+ "passed": true
+ },
+ {
+ "id": "one-coder-execution-per-known-task",
+ "passed": true
+ },
+ {
+ "id": "task-origins-are-first-two-requested-turns",
+ "passed": true
+ },
+ {
+ "id": "bounded-server-completion-receipts",
+ "passed": true
+ },
+ {
+ "id": "completion-runs-have-attributed-chat-replies",
+ "passed": true
+ },
+ {
+ "id": "no-notification-created-extra-tasks",
+ "passed": true
+ }
+ ],
+ "passed": true
+ },
+ "checks": [
+ {
+ "id": "one-coder-hire",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly one permanent coding teammate reports to the lead."
+ },
+ {
+ "id": "execution-account",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Hire keeps the lead model and managed account binding."
+ },
+ {
+ "id": "two-worker-tasks",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Both independent tasks are completed by the same coder in the chosen project."
+ },
+ {
+ "id": "bounded-work-and-completion-turns",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly three requested lead turns and two coder executions, plus at most two strictly attributed completion notifications; every actual run remains counted."
+ },
+ {
+ "id": "initial-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Independent computation checks each original input/value and worker authorship."
+ },
+ {
+ "id": "reused-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "The reused coder applies the changed separator to every input."
+ },
+ {
+ "id": "original-preserved",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Reuse preserves the original document, revision and task identity."
+ },
+ {
+ "id": "source-fingerprints",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Served instruction and hiring source bytes match the evaluated revision."
+ },
+ {
+ "id": "production-ceo-bundle",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The API-created lead receives this revision's default CEO bundle, without a fixture override."
+ },
+ {
+ "id": "assigned-hiring-skill",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Production CEO defaults assign the hiring skill."
+ },
+ {
+ "id": "production-source-reads",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Completed lead read receipts before the hire prove the explicitly requested skill, guide, checklist and coder example paths. Unrecognized or missing reads leave coverage uncomparable."
+ },
+ {
+ "id": "supplied-coder-instructions",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Saved hired instructions use the source revision's coder example with its company/name placeholders filled."
+ },
+ {
+ "id": "hired-instructions-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The same saved instruction bundle survives the reused worker execution."
+ },
+ {
+ "id": "hired-skills-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The saved skill selections survive the reused worker execution."
+ }
+ ]
+ },
+ "coverageUnchanged": true,
+ "otherOutcomesUnchanged": true,
+ "originalBytesUnchanged": true,
+ "inputSha256": {
+ "result": "a83aecc26ef0af2e231cb364299cf0cb2f2ccd83b6998913dcd33be72d4c0824",
+ "hiringTemplate": "4f83f523b955120c5baac18572dce752b278dbc9ff765b940c0e17c37ab28ae0",
+ "apiState": "a208a3e3568fe9aacbec8d683a502a0d304a47571a1b97c229d2936e5d1bb087"
+ }
+ },
+ {
+ "variant": "baseline",
+ "profile": "runner-codex",
+ "original": {
+ "sourceRevision": "296a4df85e8bcc97a160fc78c291b17adb828196",
+ "graderVersion": "paperclip.hiring-templates.v1",
+ "definitionDigest": "4d7f18420889325af89aa48eaaf021e8178aa6d26d504b92041635a15741f004",
+ "machineStatus": "failed",
+ "outcomePassed": false,
+ "countCheckPassed": false,
+ "comparisonStatus": "uncomparable"
+ },
+ "corrected": {
+ "graderVersion": "paperclip.hiring-templates.v2",
+ "definitionDigest": "4d527906a967ca71c4c0e62cfbdc3405419931bcd6741b0630c4223bed2d4b6a",
+ "outcomePassed": true,
+ "comparisonStatus": "uncomparable",
+ "scorerGuardPassed": true,
+ "finalChatGuardPassed": true,
+ "turnAccounting": {
+ "version": "paperclip.hiring-template-turn-accounting.v1",
+ "counts": {
+ "requiredWorkTurns": 5,
+ "maximumCompletionTurns": 2,
+ "maximumTotalTurns": 7,
+ "requestedLeadTurns": 3,
+ "coderTurns": 2,
+ "completionTurns": 2,
+ "unclassifiedTurns": 0,
+ "snapshotRunCount": 7,
+ "actualRunCount": 7,
+ "costAccountingRunCount": 7
+ },
+ "predicates": [
+ {
+ "id": "known-fixture-context",
+ "passed": true
+ },
+ {
+ "id": "complete-public-run-ledger",
+ "passed": true
+ },
+ {
+ "id": "exact-five-required-work-turns",
+ "passed": true
+ },
+ {
+ "id": "successful-native-without-retries",
+ "passed": true
+ },
+ {
+ "id": "resolved-company-account-and-identity",
+ "passed": true
+ },
+ {
+ "id": "three-distinct-requested-chat-turns",
+ "passed": true
+ },
+ {
+ "id": "one-coder-execution-per-known-task",
+ "passed": true
+ },
+ {
+ "id": "task-origins-are-first-two-requested-turns",
+ "passed": true
+ },
+ {
+ "id": "bounded-server-completion-receipts",
+ "passed": true
+ },
+ {
+ "id": "completion-runs-have-attributed-chat-replies",
+ "passed": true
+ },
+ {
+ "id": "no-notification-created-extra-tasks",
+ "passed": true
+ }
+ ],
+ "passed": true
+ },
+ "checks": [
+ {
+ "id": "one-coder-hire",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly one permanent coding teammate reports to the lead."
+ },
+ {
+ "id": "execution-account",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Hire keeps the lead model and managed account binding."
+ },
+ {
+ "id": "two-worker-tasks",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Both independent tasks are completed by the same coder in the chosen project."
+ },
+ {
+ "id": "bounded-work-and-completion-turns",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly three requested lead turns and two coder executions, plus at most two strictly attributed completion notifications; every actual run remains counted."
+ },
+ {
+ "id": "initial-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Independent computation checks each original input/value and worker authorship."
+ },
+ {
+ "id": "reused-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "The reused coder applies the changed separator to every input."
+ },
+ {
+ "id": "original-preserved",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Reuse preserves the original document, revision and task identity."
+ },
+ {
+ "id": "source-fingerprints",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Served instruction and hiring source bytes match the evaluated revision."
+ },
+ {
+ "id": "production-ceo-bundle",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The API-created lead receives this revision's default CEO bundle, without a fixture override."
+ },
+ {
+ "id": "assigned-hiring-skill",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Production CEO defaults assign the hiring skill."
+ },
+ {
+ "id": "production-source-reads",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Completed lead read receipts before the hire prove the explicitly requested skill, guide, checklist and coder example paths. Unrecognized or missing reads leave coverage uncomparable."
+ },
+ {
+ "id": "supplied-coder-instructions",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Saved hired instructions use the source revision's coder example with its company/name placeholders filled."
+ },
+ {
+ "id": "hired-instructions-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The same saved instruction bundle survives the reused worker execution."
+ },
+ {
+ "id": "hired-skills-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The saved skill selections survive the reused worker execution."
+ }
+ ]
+ },
+ "coverageUnchanged": true,
+ "otherOutcomesUnchanged": true,
+ "originalBytesUnchanged": true,
+ "inputSha256": {
+ "result": "d912d8400bfff4f7f922aa6b264f9ce5fff1ba2d893abf03790c4cfea352261f",
+ "hiringTemplate": "88b23e4d2cc8831a5d88b8479cc69c0d1c2e17a6a5243707b4bd19716a244aca",
+ "apiState": "dff6bb13bb54d45024966d9cfbeb6dbe6f2241e674b0b1350c1384863202a97f"
+ }
+ },
+ {
+ "variant": "baseline",
+ "profile": "runner-acpx-claude",
+ "original": {
+ "sourceRevision": "296a4df85e8bcc97a160fc78c291b17adb828196",
+ "graderVersion": "paperclip.hiring-templates.v1",
+ "definitionDigest": "4d7f18420889325af89aa48eaaf021e8178aa6d26d504b92041635a15741f004",
+ "machineStatus": "failed",
+ "outcomePassed": false,
+ "countCheckPassed": false,
+ "comparisonStatus": "uncomparable"
+ },
+ "corrected": {
+ "graderVersion": "paperclip.hiring-templates.v2",
+ "definitionDigest": "4d527906a967ca71c4c0e62cfbdc3405419931bcd6741b0630c4223bed2d4b6a",
+ "outcomePassed": true,
+ "comparisonStatus": "uncomparable",
+ "scorerGuardPassed": true,
+ "finalChatGuardPassed": true,
+ "turnAccounting": {
+ "version": "paperclip.hiring-template-turn-accounting.v1",
+ "counts": {
+ "requiredWorkTurns": 5,
+ "maximumCompletionTurns": 2,
+ "maximumTotalTurns": 7,
+ "requestedLeadTurns": 3,
+ "coderTurns": 2,
+ "completionTurns": 2,
+ "unclassifiedTurns": 0,
+ "snapshotRunCount": 7,
+ "actualRunCount": 7,
+ "costAccountingRunCount": 7
+ },
+ "predicates": [
+ {
+ "id": "known-fixture-context",
+ "passed": true
+ },
+ {
+ "id": "complete-public-run-ledger",
+ "passed": true
+ },
+ {
+ "id": "exact-five-required-work-turns",
+ "passed": true
+ },
+ {
+ "id": "successful-native-without-retries",
+ "passed": true
+ },
+ {
+ "id": "resolved-company-account-and-identity",
+ "passed": true
+ },
+ {
+ "id": "three-distinct-requested-chat-turns",
+ "passed": true
+ },
+ {
+ "id": "one-coder-execution-per-known-task",
+ "passed": true
+ },
+ {
+ "id": "task-origins-are-first-two-requested-turns",
+ "passed": true
+ },
+ {
+ "id": "bounded-server-completion-receipts",
+ "passed": true
+ },
+ {
+ "id": "completion-runs-have-attributed-chat-replies",
+ "passed": true
+ },
+ {
+ "id": "no-notification-created-extra-tasks",
+ "passed": true
+ }
+ ],
+ "passed": true
+ },
+ "checks": [
+ {
+ "id": "one-coder-hire",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly one permanent coding teammate reports to the lead."
+ },
+ {
+ "id": "execution-account",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Hire keeps the lead model and managed account binding."
+ },
+ {
+ "id": "two-worker-tasks",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Both independent tasks are completed by the same coder in the chosen project."
+ },
+ {
+ "id": "bounded-work-and-completion-turns",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly three requested lead turns and two coder executions, plus at most two strictly attributed completion notifications; every actual run remains counted."
+ },
+ {
+ "id": "initial-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Independent computation checks each original input/value and worker authorship."
+ },
+ {
+ "id": "reused-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "The reused coder applies the changed separator to every input."
+ },
+ {
+ "id": "original-preserved",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Reuse preserves the original document, revision and task identity."
+ },
+ {
+ "id": "source-fingerprints",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Served instruction and hiring source bytes match the evaluated revision."
+ },
+ {
+ "id": "production-ceo-bundle",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The API-created lead receives this revision's default CEO bundle, without a fixture override."
+ },
+ {
+ "id": "assigned-hiring-skill",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Production CEO defaults assign the hiring skill."
+ },
+ {
+ "id": "production-source-reads",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Completed lead read receipts before the hire prove the explicitly requested skill, guide, checklist and coder example paths. Unrecognized or missing reads leave coverage uncomparable."
+ },
+ {
+ "id": "supplied-coder-instructions",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Saved hired instructions use the source revision's coder example with its company/name placeholders filled."
+ },
+ {
+ "id": "hired-instructions-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The same saved instruction bundle survives the reused worker execution."
+ },
+ {
+ "id": "hired-skills-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The saved skill selections survive the reused worker execution."
+ }
+ ]
+ },
+ "coverageUnchanged": true,
+ "otherOutcomesUnchanged": true,
+ "originalBytesUnchanged": true,
+ "inputSha256": {
+ "result": "844763ddc83461b2bea620f153f4bfe0bfee20a27bf33a60017a45c774ce2f6a",
+ "hiringTemplate": "27b153798472e206970c46358febdda363cb75f892734757e76994117f0d2c9b",
+ "apiState": "441cf7272ea28c5e1182adf48dba09a401e88c6cad3a99e72c8cf3f46b1c5b41"
+ }
+ }
+ ]
+}
diff --git a/doc/plans/2026-10-02-hiring-executable-accounting-replay.md b/doc/plans/2026-10-02-hiring-executable-accounting-replay.md
new file mode 100644
index 00000000000..21314b61930
--- /dev/null
+++ b/doc/plans/2026-10-02-hiring-executable-accounting-replay.md
@@ -0,0 +1,59 @@
+# Executable hiring lifecycle accounting repair
+
+**Current TL;DR:** No new model calls were made. The original Codex and Claude pairs remain Fail → Fail. The stricter v3 executable replay verifies Codex accounting in both variants; Claude notification action attribution remains unresolved/uncomparable because provider and native request IDs cannot be exactly joined. No notification writes are observed in the retained native API receipts. Source-read coverage remains uncomparable for both profiles, independently of action attribution. Earlier sidecar-v1 and initial executable-v2 passes remain below with their limited task-only proof identified.
+
+## Current stricter executable replay
+
+Code revision: `e4077ade1818d98b9862ae79ee1d49a007dcf9c1`. Hiring grader: `paperclip.hiring-templates.v3`; turn accounting: `paperclip.hiring-template-turn-accounting.v2`. The separately versioned [v2 JSON receipt](2026-10-02-hiring-executable-accounting-replay.v2.json) pins exact source hashes and unchanged original inputs.
+
+| Profile | Original machine grades | Limited sidecar v1 / initial executable v2 | Stricter executable accounting | Source-read coverage |
+| --- | --- | --- | --- | --- |
+| Codex | Fail → Fail | Pass → Pass | Verified / both new guards pass in each variant | Uncomparable both |
+| ACPX Claude | Fail → Fail | Pass → Pass | Unresolved/uncomparable action attribution in each variant; guards fail closed | Uncomparable both; historical six-backtick exact-template mismatch remains |
+
+The limited sidecar and initial executable check rejected notification-created tasks but could miss an unrelated document write during a notification. Their original results and hashes are preserved; they do not prove every notification was harmless. The stricter helper adds a twelfth predicate and an independent action-coverage check. It requires complete contiguous event streams, an accepted control-plane result and succeeded/completed terminal, exact canonical/native action IDs, successful known GET API receipts or verified reads/discovery, and attributed native chat finish. Document/task/agent mutations, failed mutation attempts, incomplete streams and unknown or unmatched actions cannot pass. A readonly hint alone cannot qualify a generic API call.
+
+Codex verifies 10 candidate and 11 baseline notification tool executions, including five and seven exactly joined successful GET calls, with zero unresolved actions. ACPX's native request IDs and provider execution IDs use separate namespaces; names, ordering and counts cannot safely join them. All observed ACPX native API calls are successful GETs, but the stronger cross-ledger proof is missing (five candidate/four baseline unresolved observations). This is an evidence limitation, not a newly observed task failure or a prompt regression. No production carriers or source-read grading are changed.
+
+The observation repair retries entire bracketed snapshots, waits both known Done task callbacks and attributed chat replies (including batching), checks untruncated pending-wake diagnostics, and requires two identical complete observations. It covers the quiet gap before pending outbox work enqueues a wake. Accounted coalesced wakes are admitted only with a linked terminal run and known callbacks. The final guard performs that same complete refresh rather than mixing a stale evidence snapshot with new runs. The generic five-work-turn helper still admits zero notifications when none are owed; this production delegated fixture owes two task completions.
+
+All six non-count outcome checks and every original source/template coverage check remain byte-identical in all four replay projections. All 28 actual model runs remain counted; original input hashes and failed verdicts are unchanged. The stricter action check is separately classified as coverage when attribution is missing. No broad equivalence is established.
+
+- 977 credential-free support tests pass across 64 files, including 144 focused helper/scorer/settlement integrations.
+- E2E typecheck, exact two-cell discovery, canonical capability contract/inventory checks and diff checks pass.
+- Two current-head review findings are fixed: racing observations and unchecked completion-turn writes. Fresh review/CI is required on this source.
+- Initial-head CI retained two unrelated browser failures: exact agent-run denial feedback and touch-picker scroll position. Neither browser path imports the changed runner-e2e harness. They are preserved without a blind rerun; the necessary review-fix head runs normal CI.
+- No providers, old campaign retries or extra paid scope are launched. Actual prior model charges remain unknown.
+
+## Initial executable v2 replay (limited notification proof)
+
+TL;DR: This repairs a grading defect; it does not change model instructions or rerun models. The original Codex and Claude pairs remain Fail → Fail. Provider-free replay through both corrected executable paths passes all four retained cells; source-read coverage remains uncomparable. This is a grading correction, not a new model-performance result.
+
+The original fixture required exactly five total runs. Production adds legitimate server completion turns after delegated work. The corrected v2 contract requires exactly three distinct user-requested CEO turns and two coder executions. At most two additional completion turns must pass strict public identity/account/task/delivery/timing/reply attribution. One turn may batch both completed tasks. Unknown, duplicate, failed, retried runs, notification-created tasks and missing public observations fail. This initial version did not inspect unrelated document writes during notifications; see the stricter current assessment above.
+
+Both executable count guards use the shared helper: the hiring scorer and the hiring-only final chat guard. The catalog declares five required / seven maximum total runs so timeout/cost planning includes notifications. Non-hiring count guards remain unchanged. Source-read and exact coder-body grading remain unchanged, including the historical Claude six-backtick mismatch. The grader version and full helper/chat/source digest change.
+
+## Preserved measurement
+
+The immutable [original and bounded sidecar report](https://github.com/paperclipai/paperclip/blob/8eb517ca1497687237163bdef4dfc4d3332ea916/doc/plans/2026-10-02-hiring-template-live-comparison.md) retains candidate `9f5404ad3aacbe76777952759414d34fd381e674` and historical `296a4df85e8bcc97a160fc78c291b17adb828196`, the identical original fixture digest, 28 actual successful runs, eight automatic completion turns, four successful cleanups and unknown actual charges. It calibrates sidecar v1 with 69 passing tests and records exact original input/grader hashes. The executable repair is a new source/grader revision; it cannot rewrite those measurements or prove performance equivalence.
+
+## Provider-free verification
+
+The executable code revision is `eef64009dc144b91b245a731ea9a1c3c07406a19`; report-only commits do not change its grader bytes. The [JSON receipt](2026-10-02-hiring-executable-accounting-replay.json) pins all five grader/flow/helper source hashes, v2 definition digest and original result/hiring/API input hashes.
+
+| Profile | Original executable result | Corrected retained workflow outcome | Both new count guards | Source coverage |
+| --- | --- | --- | --- | --- |
+| Codex | Fail → Fail | Pass → Pass | Pass in both variants | Uncomparable both |
+| ACPX Claude | Fail → Fail | Pass → Pass | Pass in both variants | Uncomparable both; historical exact coder body still fails |
+
+All six other outcome checks and every coverage check are byte-identical in the replay's check projection. Original input files and failed grades remain unchanged. All 28 actual model runs remain counted. The new helper has 11 lifecycle predicates, factoring the sidecar's lifecycle rule without requiring an already-computed original result.
+
+- All 946 credential-free E2E support tests pass across 64 files, including 99 helper calibrations and the four added scorer/final-guard integrations.
+- Fifteen focused hiring/run-count tests pass. The integrations admit five core turns, six with batching and seven with distinct notifications; reject an arbitrary wake despite the same total count; require public observations; retain source/template coverage failures; and preserve non-hiring count guards.
+- E2E typecheck, normal plugin SDK/Runner TypeScript dependency builds, canonical capability contract/inventory checks and existing two-cell discovery pass.
+- Retained replay executes the actual new scorer and final chat guard in each of the four original cells, using the unchanged saved API observations. Both guards pass 4/4; coverage and the six non-count outcomes stay unchanged 4/4.
+- Full repository CI and fresh review are pending on the separate draft PR. Local general repository typecheck/test/build were not repeated; exact-head CI must supply those gates before handoff.
+
+Initial development calibration caught mismatched synthetic account data and a deliberately changed template not preserved across reuse. The fixture data was corrected; assertions were kept. Initial cold typecheck lacked built Runner declarations; normal dependency builds resolved it. A temporary replay script's CommonJS extension rejected top-level await; the same script executed as ESM. These provider-free setup/development attempts remain private and are not live model results. No provider runs, old campaign retries or paid scope expansion are authorized for this repair. Public replay receipts will include only grader/input hashes, counts, predicate/check results and original verdicts; credentials, provider session IDs and hidden reasoning remain private.
+
+The branch was safely replayed on master `59c07ede7` before PR creation. The intervening master changes touch only two agent-provider UI files; all eval source bytes are unchanged. The four-cell provider-free replay was repeated against the final reachable code revision, with the same input hashes, checks and zero providers.
diff --git a/doc/plans/2026-10-02-hiring-executable-accounting-replay.v2.json b/doc/plans/2026-10-02-hiring-executable-accounting-replay.v2.json
new file mode 100644
index 00000000000..9c34e86b199
--- /dev/null
+++ b/doc/plans/2026-10-02-hiring-executable-accounting-replay.v2.json
@@ -0,0 +1,815 @@
+{
+ "schema": "paperclip.hiring-executable-accounting-replay.v2",
+ "assessmentType": "Provider-free replay through both new executable guards; original model measurements and verdicts unchanged",
+ "evaluatedCodeRevision": "e4077ade1818d98b9862ae79ee1d49a007dcf9c1",
+ "evaluatedCodeHashes": {
+ "tests/runner-e2e/hiring-template-cases.ts": "a440ebf5a932525d388f507f8b47490a535d377c9f9c9beba6144f1fc2214b7c",
+ "tests/runner-e2e/hiring-template-scoring.ts": "5f600b8329c981f1fc94ecc1b70a94b78d4a32a5b8859600208cbe1f91be2dac",
+ "tests/runner-e2e/hiring-template-flow.ts": "10b2415ad6ee293286db0a8cc8cb7a6a363d993a70560ab0a82f668018b5e3f5",
+ "tests/runner-e2e/hiring-template-turn-accounting.ts": "13792c69669b99748087d6a78af8ab35c6293d1ad3e3396efcbe39620169ad35",
+ "tests/runner-e2e/chat-flow.ts": "85d8c3da832871f38cc4ed940046d28ed7b3edf17486ce43b0f3313c06d17d7a"
+ },
+ "graderVersion": "paperclip.hiring-templates.v3",
+ "definitionDigest": "cddbcb6b2f3050e065599011ace2faee048047fae6ea9bc9183db8c5744e2f38",
+ "providerCalls": 0,
+ "newProviderRuns": 0,
+ "automaticRetries": 0,
+ "summary": {
+ "originalPairs": "Codex Fail→Fail; Claude Fail→Fail",
+ "correctedWorkflowOutcomePairs": "Codex Pass→Pass; Claude action attribution unresolved/uncomparable in both variants (not a measured task failure)",
+ "fullAttemptComparison": "Uncomparable in both profiles and variants; source-read coverage unchanged",
+ "originalMachineFailuresPreserved": 4,
+ "correctedScorerGuardsPassed": 2,
+ "correctedFinalChatGuardsPassed": 2,
+ "strictActionVerifiedAssessments": 2,
+ "strictActionUncomparableAssessments": 2,
+ "unchangedOriginalCoverageAssessments": 4,
+ "unchangedOtherOutcomeAssessments": 4,
+ "actualMeasuredRuns": 28,
+ "actualModelChargesKnown": false,
+ "broadEquivalenceEstablished": false,
+ "priorSidecarLimitation": "Sidecar v1 and initial executable v2 checked notification-created tasks, not unrelated document writes. Their original passes remain preserved."
+ },
+ "assessments": [
+ {
+ "variant": "candidate",
+ "profile": "runner-codex",
+ "original": {
+ "sourceRevision": "9f5404ad3aacbe76777952759414d34fd381e674",
+ "graderVersion": "paperclip.hiring-templates.v1",
+ "definitionDigest": "4d7f18420889325af89aa48eaaf021e8178aa6d26d504b92041635a15741f004",
+ "machineStatus": "failed",
+ "outcomePassed": false,
+ "countCheckPassed": false,
+ "comparisonStatus": "uncomparable"
+ },
+ "corrected": {
+ "graderVersion": "paperclip.hiring-templates.v3",
+ "definitionDigest": "cddbcb6b2f3050e065599011ace2faee048047fae6ea9bc9183db8c5744e2f38",
+ "outcomePassed": true,
+ "comparisonStatus": "uncomparable",
+ "scorerGuardPassed": true,
+ "finalChatGuardPassed": true,
+ "assessmentStatus": "verified",
+ "turnAccounting": {
+ "version": "paperclip.hiring-template-turn-accounting.v2",
+ "counts": {
+ "requiredWorkTurns": 5,
+ "maximumCompletionTurns": 2,
+ "maximumTotalTurns": 7,
+ "requestedLeadTurns": 3,
+ "coderTurns": 2,
+ "completionTurns": 2,
+ "unclassifiedTurns": 0,
+ "snapshotRunCount": 7,
+ "actualRunCount": 7,
+ "costAccountingRunCount": 7
+ },
+ "predicates": [
+ {
+ "id": "known-fixture-context",
+ "passed": true
+ },
+ {
+ "id": "complete-public-run-ledger",
+ "passed": true
+ },
+ {
+ "id": "exact-five-required-work-turns",
+ "passed": true
+ },
+ {
+ "id": "successful-native-without-retries",
+ "passed": true
+ },
+ {
+ "id": "resolved-company-account-and-identity",
+ "passed": true
+ },
+ {
+ "id": "three-distinct-requested-chat-turns",
+ "passed": true
+ },
+ {
+ "id": "one-coder-execution-per-known-task",
+ "passed": true
+ },
+ {
+ "id": "task-origins-are-first-two-requested-turns",
+ "passed": true
+ },
+ {
+ "id": "bounded-server-completion-receipts",
+ "passed": true
+ },
+ {
+ "id": "completion-runs-have-attributed-chat-replies",
+ "passed": true
+ },
+ {
+ "id": "no-notification-created-extra-tasks",
+ "passed": true
+ },
+ {
+ "id": "completion-turns-only-report-actions",
+ "passed": true
+ }
+ ],
+ "actionEvidence": {
+ "status": "verified",
+ "notificationRuns": 2,
+ "canonicalExecutions": 10,
+ "matchedNativeApiCalls": 5,
+ "unknownExecutions": 0
+ },
+ "passed": true
+ },
+ "checks": [
+ {
+ "id": "one-coder-hire",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly one permanent coding teammate reports to the lead."
+ },
+ {
+ "id": "execution-account",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Hire keeps the lead model and managed account binding."
+ },
+ {
+ "id": "two-worker-tasks",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Both independent tasks are completed by the same coder in the chosen project."
+ },
+ {
+ "id": "bounded-work-and-completion-turns",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly three requested lead turns and two coder executions, plus at most two strictly attributed completion notifications; every actual run remains counted."
+ },
+ {
+ "id": "initial-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Independent computation checks each original input/value and worker authorship."
+ },
+ {
+ "id": "reused-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "The reused coder applies the changed separator to every input."
+ },
+ {
+ "id": "original-preserved",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Reuse preserves the original document, revision and task identity."
+ },
+ {
+ "id": "source-fingerprints",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Served instruction and hiring source bytes match the evaluated revision."
+ },
+ {
+ "id": "production-ceo-bundle",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The API-created lead receives this revision's default CEO bundle, without a fixture override."
+ },
+ {
+ "id": "assigned-hiring-skill",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Production CEO defaults assign the hiring skill."
+ },
+ {
+ "id": "production-source-reads",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Completed lead read receipts before the hire prove the explicitly requested skill, guide, checklist and coder example paths. Unrecognized or missing reads leave coverage uncomparable."
+ },
+ {
+ "id": "supplied-coder-instructions",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Saved hired instructions use the source revision's coder example with its company/name placeholders filled."
+ },
+ {
+ "id": "hired-instructions-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The same saved instruction bundle survives the reused worker execution."
+ },
+ {
+ "id": "hired-skills-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The saved skill selections survive the reused worker execution."
+ },
+ {
+ "id": "completion-action-attribution",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Notification actions require exact canonical/native identities; missing cross-namespace mapping is uncomparable, not proof of extra work."
+ }
+ ]
+ },
+ "coverageUnchanged": true,
+ "otherOutcomesUnchanged": true,
+ "originalBytesUnchanged": true,
+ "inputSha256": {
+ "result": "44cbf64cfabd0257f31fb4d6909018d346f5667b0a7b3d7e855a2ece7e29c292",
+ "hiringTemplate": "9609ddcb81c6bee3c5db97312138b4ea3e294da13ea540e41f363c826a514067",
+ "apiState": "ef02af29bcf61ff3eace0549ca164a28c7950d1a3e14fc58c89bf9cb0f944b4d"
+ }
+ },
+ {
+ "variant": "candidate",
+ "profile": "runner-acpx-claude",
+ "original": {
+ "sourceRevision": "9f5404ad3aacbe76777952759414d34fd381e674",
+ "graderVersion": "paperclip.hiring-templates.v1",
+ "definitionDigest": "4d7f18420889325af89aa48eaaf021e8178aa6d26d504b92041635a15741f004",
+ "machineStatus": "failed",
+ "outcomePassed": false,
+ "countCheckPassed": false,
+ "comparisonStatus": "uncomparable"
+ },
+ "corrected": {
+ "graderVersion": "paperclip.hiring-templates.v3",
+ "definitionDigest": "cddbcb6b2f3050e065599011ace2faee048047fae6ea9bc9183db8c5744e2f38",
+ "outcomePassed": false,
+ "comparisonStatus": "uncomparable",
+ "scorerGuardPassed": false,
+ "finalChatGuardPassed": false,
+ "assessmentStatus": "uncomparable",
+ "turnAccounting": {
+ "version": "paperclip.hiring-template-turn-accounting.v2",
+ "counts": {
+ "requiredWorkTurns": 5,
+ "maximumCompletionTurns": 2,
+ "maximumTotalTurns": 7,
+ "requestedLeadTurns": 3,
+ "coderTurns": 2,
+ "completionTurns": 2,
+ "unclassifiedTurns": 0,
+ "snapshotRunCount": 7,
+ "actualRunCount": 7,
+ "costAccountingRunCount": 7
+ },
+ "predicates": [
+ {
+ "id": "known-fixture-context",
+ "passed": true
+ },
+ {
+ "id": "complete-public-run-ledger",
+ "passed": true
+ },
+ {
+ "id": "exact-five-required-work-turns",
+ "passed": true
+ },
+ {
+ "id": "successful-native-without-retries",
+ "passed": true
+ },
+ {
+ "id": "resolved-company-account-and-identity",
+ "passed": true
+ },
+ {
+ "id": "three-distinct-requested-chat-turns",
+ "passed": true
+ },
+ {
+ "id": "one-coder-execution-per-known-task",
+ "passed": true
+ },
+ {
+ "id": "task-origins-are-first-two-requested-turns",
+ "passed": true
+ },
+ {
+ "id": "bounded-server-completion-receipts",
+ "passed": true
+ },
+ {
+ "id": "completion-runs-have-attributed-chat-replies",
+ "passed": true
+ },
+ {
+ "id": "no-notification-created-extra-tasks",
+ "passed": true
+ },
+ {
+ "id": "completion-turns-only-report-actions",
+ "passed": false
+ }
+ ],
+ "actionEvidence": {
+ "status": "uncomparable",
+ "notificationRuns": 2,
+ "canonicalExecutions": 3,
+ "matchedNativeApiCalls": 0,
+ "unknownExecutions": 5
+ },
+ "passed": false
+ },
+ "checks": [
+ {
+ "id": "one-coder-hire",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly one permanent coding teammate reports to the lead."
+ },
+ {
+ "id": "execution-account",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Hire keeps the lead model and managed account binding."
+ },
+ {
+ "id": "two-worker-tasks",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Both independent tasks are completed by the same coder in the chosen project."
+ },
+ {
+ "id": "bounded-work-and-completion-turns",
+ "dimension": "outcome",
+ "passed": false,
+ "detail": "Exactly three requested lead turns and two coder executions, plus at most two strictly attributed completion notifications; every actual run remains counted."
+ },
+ {
+ "id": "initial-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Independent computation checks each original input/value and worker authorship."
+ },
+ {
+ "id": "reused-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "The reused coder applies the changed separator to every input."
+ },
+ {
+ "id": "original-preserved",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Reuse preserves the original document, revision and task identity."
+ },
+ {
+ "id": "source-fingerprints",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Served instruction and hiring source bytes match the evaluated revision."
+ },
+ {
+ "id": "production-ceo-bundle",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The API-created lead receives this revision's default CEO bundle, without a fixture override."
+ },
+ {
+ "id": "assigned-hiring-skill",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Production CEO defaults assign the hiring skill."
+ },
+ {
+ "id": "production-source-reads",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Completed lead read receipts before the hire prove the explicitly requested skill, guide, checklist and coder example paths. Unrecognized or missing reads leave coverage uncomparable."
+ },
+ {
+ "id": "supplied-coder-instructions",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Saved hired instructions use the source revision's coder example with its company/name placeholders filled."
+ },
+ {
+ "id": "hired-instructions-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The same saved instruction bundle survives the reused worker execution."
+ },
+ {
+ "id": "hired-skills-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The saved skill selections survive the reused worker execution."
+ },
+ {
+ "id": "completion-action-attribution",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Notification actions require exact canonical/native identities; missing cross-namespace mapping is uncomparable, not proof of extra work."
+ }
+ ]
+ },
+ "coverageUnchanged": true,
+ "otherOutcomesUnchanged": true,
+ "originalBytesUnchanged": true,
+ "inputSha256": {
+ "result": "a83aecc26ef0af2e231cb364299cf0cb2f2ccd83b6998913dcd33be72d4c0824",
+ "hiringTemplate": "4f83f523b955120c5baac18572dce752b278dbc9ff765b940c0e17c37ab28ae0",
+ "apiState": "a208a3e3568fe9aacbec8d683a502a0d304a47571a1b97c229d2936e5d1bb087"
+ }
+ },
+ {
+ "variant": "baseline",
+ "profile": "runner-codex",
+ "original": {
+ "sourceRevision": "296a4df85e8bcc97a160fc78c291b17adb828196",
+ "graderVersion": "paperclip.hiring-templates.v1",
+ "definitionDigest": "4d7f18420889325af89aa48eaaf021e8178aa6d26d504b92041635a15741f004",
+ "machineStatus": "failed",
+ "outcomePassed": false,
+ "countCheckPassed": false,
+ "comparisonStatus": "uncomparable"
+ },
+ "corrected": {
+ "graderVersion": "paperclip.hiring-templates.v3",
+ "definitionDigest": "cddbcb6b2f3050e065599011ace2faee048047fae6ea9bc9183db8c5744e2f38",
+ "outcomePassed": true,
+ "comparisonStatus": "uncomparable",
+ "scorerGuardPassed": true,
+ "finalChatGuardPassed": true,
+ "assessmentStatus": "verified",
+ "turnAccounting": {
+ "version": "paperclip.hiring-template-turn-accounting.v2",
+ "counts": {
+ "requiredWorkTurns": 5,
+ "maximumCompletionTurns": 2,
+ "maximumTotalTurns": 7,
+ "requestedLeadTurns": 3,
+ "coderTurns": 2,
+ "completionTurns": 2,
+ "unclassifiedTurns": 0,
+ "snapshotRunCount": 7,
+ "actualRunCount": 7,
+ "costAccountingRunCount": 7
+ },
+ "predicates": [
+ {
+ "id": "known-fixture-context",
+ "passed": true
+ },
+ {
+ "id": "complete-public-run-ledger",
+ "passed": true
+ },
+ {
+ "id": "exact-five-required-work-turns",
+ "passed": true
+ },
+ {
+ "id": "successful-native-without-retries",
+ "passed": true
+ },
+ {
+ "id": "resolved-company-account-and-identity",
+ "passed": true
+ },
+ {
+ "id": "three-distinct-requested-chat-turns",
+ "passed": true
+ },
+ {
+ "id": "one-coder-execution-per-known-task",
+ "passed": true
+ },
+ {
+ "id": "task-origins-are-first-two-requested-turns",
+ "passed": true
+ },
+ {
+ "id": "bounded-server-completion-receipts",
+ "passed": true
+ },
+ {
+ "id": "completion-runs-have-attributed-chat-replies",
+ "passed": true
+ },
+ {
+ "id": "no-notification-created-extra-tasks",
+ "passed": true
+ },
+ {
+ "id": "completion-turns-only-report-actions",
+ "passed": true
+ }
+ ],
+ "actionEvidence": {
+ "status": "verified",
+ "notificationRuns": 2,
+ "canonicalExecutions": 11,
+ "matchedNativeApiCalls": 7,
+ "unknownExecutions": 0
+ },
+ "passed": true
+ },
+ "checks": [
+ {
+ "id": "one-coder-hire",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly one permanent coding teammate reports to the lead."
+ },
+ {
+ "id": "execution-account",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Hire keeps the lead model and managed account binding."
+ },
+ {
+ "id": "two-worker-tasks",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Both independent tasks are completed by the same coder in the chosen project."
+ },
+ {
+ "id": "bounded-work-and-completion-turns",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly three requested lead turns and two coder executions, plus at most two strictly attributed completion notifications; every actual run remains counted."
+ },
+ {
+ "id": "initial-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Independent computation checks each original input/value and worker authorship."
+ },
+ {
+ "id": "reused-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "The reused coder applies the changed separator to every input."
+ },
+ {
+ "id": "original-preserved",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Reuse preserves the original document, revision and task identity."
+ },
+ {
+ "id": "source-fingerprints",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Served instruction and hiring source bytes match the evaluated revision."
+ },
+ {
+ "id": "production-ceo-bundle",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The API-created lead receives this revision's default CEO bundle, without a fixture override."
+ },
+ {
+ "id": "assigned-hiring-skill",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Production CEO defaults assign the hiring skill."
+ },
+ {
+ "id": "production-source-reads",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Completed lead read receipts before the hire prove the explicitly requested skill, guide, checklist and coder example paths. Unrecognized or missing reads leave coverage uncomparable."
+ },
+ {
+ "id": "supplied-coder-instructions",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Saved hired instructions use the source revision's coder example with its company/name placeholders filled."
+ },
+ {
+ "id": "hired-instructions-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The same saved instruction bundle survives the reused worker execution."
+ },
+ {
+ "id": "hired-skills-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The saved skill selections survive the reused worker execution."
+ },
+ {
+ "id": "completion-action-attribution",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Notification actions require exact canonical/native identities; missing cross-namespace mapping is uncomparable, not proof of extra work."
+ }
+ ]
+ },
+ "coverageUnchanged": true,
+ "otherOutcomesUnchanged": true,
+ "originalBytesUnchanged": true,
+ "inputSha256": {
+ "result": "d912d8400bfff4f7f922aa6b264f9ce5fff1ba2d893abf03790c4cfea352261f",
+ "hiringTemplate": "88b23e4d2cc8831a5d88b8479cc69c0d1c2e17a6a5243707b4bd19716a244aca",
+ "apiState": "dff6bb13bb54d45024966d9cfbeb6dbe6f2241e674b0b1350c1384863202a97f"
+ }
+ },
+ {
+ "variant": "baseline",
+ "profile": "runner-acpx-claude",
+ "original": {
+ "sourceRevision": "296a4df85e8bcc97a160fc78c291b17adb828196",
+ "graderVersion": "paperclip.hiring-templates.v1",
+ "definitionDigest": "4d7f18420889325af89aa48eaaf021e8178aa6d26d504b92041635a15741f004",
+ "machineStatus": "failed",
+ "outcomePassed": false,
+ "countCheckPassed": false,
+ "comparisonStatus": "uncomparable"
+ },
+ "corrected": {
+ "graderVersion": "paperclip.hiring-templates.v3",
+ "definitionDigest": "cddbcb6b2f3050e065599011ace2faee048047fae6ea9bc9183db8c5744e2f38",
+ "outcomePassed": false,
+ "comparisonStatus": "uncomparable",
+ "scorerGuardPassed": false,
+ "finalChatGuardPassed": false,
+ "assessmentStatus": "uncomparable",
+ "turnAccounting": {
+ "version": "paperclip.hiring-template-turn-accounting.v2",
+ "counts": {
+ "requiredWorkTurns": 5,
+ "maximumCompletionTurns": 2,
+ "maximumTotalTurns": 7,
+ "requestedLeadTurns": 3,
+ "coderTurns": 2,
+ "completionTurns": 2,
+ "unclassifiedTurns": 0,
+ "snapshotRunCount": 7,
+ "actualRunCount": 7,
+ "costAccountingRunCount": 7
+ },
+ "predicates": [
+ {
+ "id": "known-fixture-context",
+ "passed": true
+ },
+ {
+ "id": "complete-public-run-ledger",
+ "passed": true
+ },
+ {
+ "id": "exact-five-required-work-turns",
+ "passed": true
+ },
+ {
+ "id": "successful-native-without-retries",
+ "passed": true
+ },
+ {
+ "id": "resolved-company-account-and-identity",
+ "passed": true
+ },
+ {
+ "id": "three-distinct-requested-chat-turns",
+ "passed": true
+ },
+ {
+ "id": "one-coder-execution-per-known-task",
+ "passed": true
+ },
+ {
+ "id": "task-origins-are-first-two-requested-turns",
+ "passed": true
+ },
+ {
+ "id": "bounded-server-completion-receipts",
+ "passed": true
+ },
+ {
+ "id": "completion-runs-have-attributed-chat-replies",
+ "passed": true
+ },
+ {
+ "id": "no-notification-created-extra-tasks",
+ "passed": true
+ },
+ {
+ "id": "completion-turns-only-report-actions",
+ "passed": false
+ }
+ ],
+ "actionEvidence": {
+ "status": "uncomparable",
+ "notificationRuns": 2,
+ "canonicalExecutions": 3,
+ "matchedNativeApiCalls": 0,
+ "unknownExecutions": 4
+ },
+ "passed": false
+ },
+ "checks": [
+ {
+ "id": "one-coder-hire",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Exactly one permanent coding teammate reports to the lead."
+ },
+ {
+ "id": "execution-account",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Hire keeps the lead model and managed account binding."
+ },
+ {
+ "id": "two-worker-tasks",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Both independent tasks are completed by the same coder in the chosen project."
+ },
+ {
+ "id": "bounded-work-and-completion-turns",
+ "dimension": "outcome",
+ "passed": false,
+ "detail": "Exactly three requested lead turns and two coder executions, plus at most two strictly attributed completion notifications; every actual run remains counted."
+ },
+ {
+ "id": "initial-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Independent computation checks each original input/value and worker authorship."
+ },
+ {
+ "id": "reused-json-artifact",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "The reused coder applies the changed separator to every input."
+ },
+ {
+ "id": "original-preserved",
+ "dimension": "outcome",
+ "passed": true,
+ "detail": "Reuse preserves the original document, revision and task identity."
+ },
+ {
+ "id": "source-fingerprints",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Served instruction and hiring source bytes match the evaluated revision."
+ },
+ {
+ "id": "production-ceo-bundle",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The API-created lead receives this revision's default CEO bundle, without a fixture override."
+ },
+ {
+ "id": "assigned-hiring-skill",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "Production CEO defaults assign the hiring skill."
+ },
+ {
+ "id": "production-source-reads",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Completed lead read receipts before the hire prove the explicitly requested skill, guide, checklist and coder example paths. Unrecognized or missing reads leave coverage uncomparable."
+ },
+ {
+ "id": "supplied-coder-instructions",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Saved hired instructions use the source revision's coder example with its company/name placeholders filled."
+ },
+ {
+ "id": "hired-instructions-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The same saved instruction bundle survives the reused worker execution."
+ },
+ {
+ "id": "hired-skills-durable",
+ "dimension": "coverage",
+ "passed": true,
+ "detail": "The saved skill selections survive the reused worker execution."
+ },
+ {
+ "id": "completion-action-attribution",
+ "dimension": "coverage",
+ "passed": false,
+ "detail": "Notification actions require exact canonical/native identities; missing cross-namespace mapping is uncomparable, not proof of extra work."
+ }
+ ]
+ },
+ "coverageUnchanged": true,
+ "otherOutcomesUnchanged": true,
+ "originalBytesUnchanged": true,
+ "inputSha256": {
+ "result": "844763ddc83461b2bea620f153f4bfe0bfee20a27bf33a60017a45c774ce2f6a",
+ "hiringTemplate": "27b153798472e206970c46358febdda363cb75f892734757e76994117f0d2c9b",
+ "apiState": "441cf7272ea28c5e1182adf48dba09a401e88c6cad3a99e72c8cf3f46b1c5b41"
+ }
+ }
+ ]
+}
diff --git a/doc/plans/2026-10-02-hiring-skill-drafting-evidence.json b/doc/plans/2026-10-02-hiring-skill-drafting-evidence.json
new file mode 100644
index 00000000000..b8340ec247d
--- /dev/null
+++ b/doc/plans/2026-10-02-hiring-skill-drafting-evidence.json
@@ -0,0 +1,79 @@
+{
+ "kind": "independent-drafting-simulation",
+ "date": "2026-10-02",
+ "scope": "Three synthetic hire requests; read-only. No API calls, permanent hires, provider campaign, or live harness qualification.",
+ "skillSources": [
+ {
+ "path": "skills/paperclip-create-agent/SKILL.md",
+ "sha256": "00e3063a40bbe32592171fa613956bc1b503fe0a41c4973c8dae7b8cdf8c148a"
+ },
+ {
+ "path": "skills/paperclip-create-agent/references/agent-instruction-templates.md",
+ "sha256": "9ce87fc420b41e951cab664655886d0ee50fa253cb5b8647b4a7afa4a6082d2d"
+ },
+ {
+ "path": "skills/paperclip-create-agent/references/baseline-role-guide.md",
+ "sha256": "0841c5c483526d8d64c7217df7164bca7f3f03edcf4578f2baefcca01cd156b0"
+ },
+ {
+ "path": "skills/paperclip-create-agent/references/draft-review-checklist.md",
+ "sha256": "1cbe0577a9888f31467f5c7beea01d0aa6435da2a0f577b5fdd3b5fe773984ad"
+ },
+ {
+ "path": "skills/paperclip-create-agent/references/agents/coder.md",
+ "sha256": "e04a25fbc8bb29910b2f4a3719730b8840553b0524ce1ec570617701aca20650"
+ },
+ {
+ "path": "skills/paperclip-create-agent/references/agents/securityengineer.md",
+ "sha256": "9eecf981844ab1f5896dd1bae6b76acce8471c448841608c5655497d691ba1a0"
+ },
+ {
+ "path": "skills/paperclip-create-agent/references/api-reference.md",
+ "sha256": "f43bd2f74d60a9f019af1c037584f2cb4bb2b1f66f503a60eca80278676bded1"
+ }
+ ],
+ "observed": [
+ {
+ "request": "Backend engineer Ada; legacy Claude; repo-maintenance skill; CTO reporting line",
+ "instructions": "You are agent Ada, a backend software engineer at Northstar. You own implementation of assigned backend service changes.",
+ "desiredSkills": [
+ "northstar/repo-maintenance"
+ ],
+ "adapterType": "claude_local",
+ "model": "claude-sonnet-4-6",
+ "timerEnabled": false,
+ "literalCredentials": false
+ },
+ {
+ "request": "Release Coordinator Riley; native Codex; no schedule",
+ "instructions": "You are agent Riley, a Release Coordinator at Northstar. You own coordination of release readiness and publication requests.",
+ "desiredSkills": [],
+ "adapterType": "paperclip_runner",
+ "provider": "codex",
+ "model": "gpt-5.4",
+ "timerEnabled": false,
+ "literalCredentials": false
+ },
+ {
+ "request": "Security Engineer Sam; legacy Claude; exact user instruction; confidential workflow installed",
+ "instructions": "Review only the authentication service. Keep private findings in the incident-review workflow. Do not edit code.",
+ "requestedInstructionsPreservedExactly": true,
+ "desiredSkills": [
+ "northstar/incident-review"
+ ],
+ "adapterType": "claude_local",
+ "model": "claude-sonnet-4-6",
+ "timerEnabled": false,
+ "literalCredentials": false
+ }
+ ],
+ "remainingBeforeMutation": [
+ "Confirm live endpoint and adapter schemas.",
+ "Submit through authorized hire API and reconcile returned pending approval; no hire may be claimed from this simulation."
+ ],
+ "limits": [
+ "Outcome projection of independent subagent drafting, not a live full-stack measurement.",
+ "No baseline drafting simulation, timing, billing, or downstream work comparison.",
+ "Does not establish non-regression for removed workflow or domain policies."
+ ]
+}
diff --git a/doc/plans/2026-10-02-hiring-template-prompt-diff.md b/doc/plans/2026-10-02-hiring-template-prompt-diff.md
new file mode 100644
index 00000000000..c62e5eb3a6d
--- /dev/null
+++ b/doc/plans/2026-10-02-hiring-template-prompt-diff.md
@@ -0,0 +1,938 @@
+# Hiring template prompt comparison — 2026-10-02
+
+New default CEO hires receive one short `AGENTS.md`. Ad-hoc hires and imported teams use short role descriptions. The hiring skill and its drafting references no longer require a heartbeat pointer, a generic execution contract, per-touch comments, prescribed reviewers, or domain-lens catalogs.
+
+Baseline: `d6d88b9de2fc766637422cc43f985c747455a1b0`. Word counts below measure role instruction bodies, excluding reference introductions, recommended configuration, and catalog frontmatter. The default CEO count includes all four previously selected files. These counts describe context size, not outcome quality, billed tokens, or savings.
+
+| Prompt | Before words | After words |
+| --- | ---: | ---: |
+| [Default CEO bundle](../../server/src/onboarding-assets/ceo/AGENTS.md) | 1897 | 20 |
+| [Coder](../../skills/paperclip-create-agent/references/agents/coder.md) | 652 | 18 |
+| [QA](../../skills/paperclip-create-agent/references/agents/qa.md) | 619 | 21 |
+| [UX Designer](../../skills/paperclip-create-agent/references/agents/uxdesigner.md) | 1325 | 20 |
+| [Security Engineer](../../skills/paperclip-create-agent/references/agents/securityengineer.md) | 1724 | 28 |
+| [Chief of staff](../../server/src/onboarding-assets/first-task/chief-of-staff/AGENTS.md) | 164 | 25 |
+| [Catalog ceo](../../packages/teams-catalog/catalog/bundled/company-defaults/core-exec-team/agents/ceo/AGENTS.md) | 377 | 20 |
+| [Catalog cto](../../packages/teams-catalog/catalog/bundled/company-defaults/core-exec-team/agents/cto/AGENTS.md) | 205 | 17 |
+| [Catalog qa](../../packages/teams-catalog/catalog/bundled/company-defaults/core-exec-team/agents/qa/AGENTS.md) | 183 | 17 |
+| [Catalog ux-designer](../../packages/teams-catalog/catalog/bundled/product/product-design/agents/ux-designer/AGENTS.md) | 305 | 17 |
+| [Catalog cto](../../packages/teams-catalog/catalog/bundled/software-development/product-engineering/agents/cto/AGENTS.md) | 212 | 22 |
+| [Catalog qa](../../packages/teams-catalog/catalog/bundled/software-development/product-engineering/agents/qa/AGENTS.md) | 171 | 22 |
+| [Catalog senior-coder](../../packages/teams-catalog/catalog/bundled/software-development/product-engineering/agents/senior-coder/AGENTS.md) | 201 | 20 |
+| [Catalog content-lead](../../packages/teams-catalog/catalog/optional/content/content-machine/agents/content-lead/AGENTS.md) | 16 | 16 |
+
+## Scope and compatibility
+
+- The CEO loader selects only `AGENTS.md`; legacy `HEARTBEAT.md`, `SOUL.md`, and `TOOLS.md` remain on disk for compatibility but are no longer part of new default bundles.
+- Company-supplied/custom and already-saved instruction bundles are not migrated or overwritten. Reporting lines, catalog slugs, skills, permissions, auth, budgets, scheduled routines, and approval controls keep their existing configuration paths.
+- The optional Content Lead was already one short role sentence and is unchanged. Specialized Summarizer, Reflection Coach, and Wiki Maintainer instructions are unchanged; their scope/output/review contracts require separate product-specific assessment.
+- This branch starts from master and is separate from draft PR #14948. The generic non-CEO fallback and shared runtime prompt reductions remain in that PR. It must land for hires using the server fallback to receive the eight-word generic manual.
+- Both native and legacy managed-bundle creation use the shared defaults. No native tool procedure or legacy API procedure is embedded in these role prompts.
+
+## How hires are drafted
+
+| Before | After |
+| --- | --- |
+| Role-specific templates were the default drafting path. | Templates are optional role examples. |
+| Unknown roles required a 60–150-line manual with eight sections. | Start with a short identity and responsibility paragraph. |
+| Every new agent needed an execution contract and repeated task procedures. | Keep reporting lines, capabilities, and skills in their configuration fields. |
+| Templates prescribed reviewers, per-touch comments, and broad domain checklists. | Add detail only for a concrete requirement that the task, repository, skills, or configuration do not already express. |
+| The generated baseline could crowd out company instructions. | Preserve explicit requester instructions. |
+
+The hiring skill still checks authority, adapter schemas, reporting lines, installed skills, timer settings, confidential workflows, and approval state. Its native-tool and legacy-API transport guidance stays separate.
+
+Hiring skill drafting rules: before → after
+
+```diff
+diff --git a/skills/paperclip-create-agent/SKILL.md b/skills/paperclip-create-agent/SKILL.md
+index 6b2a0da0e..fa9e7b358 100644
+--- a/skills/paperclip-create-agent/SKILL.md
++++ b/skills/paperclip-create-agent/SKILL.md
+@@ -72,21 +72,24 @@ curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/agent-configura
+
+ Note naming, icon, reporting-line, and adapter conventions the company already follows.
+
+-### 4. Choose the instruction source (required)
++### 4. Describe the role
+
+-This is the single most important decision for hire quality. Pick exactly one path:
++Use a short role paragraph for a new agent: its identity and the responsibility
++it owns. The [role examples](references/agent-instruction-templates.md) are
++optional starting points; for other roles, use the
++[baseline role guide](references/baseline-role-guide.md).
+
+-- **Exact template** — the role matches an entry in the template index. Use the matching file under `references/agents/` as the starting point.
+-- **Adjacent template** — no exact match, but an existing template is close (for example, a "Backend Engineer" hire adapted from `coder.md`, or a "Content Designer" adapted from `uxdesigner.md`). Copy the closest template and adapt deliberately: rename the role, rewrite the role charter, swap domain lenses, and remove sections that do not fit.
+-- **Generic fallback** — no template is close. Use the baseline role guide to construct a new `AGENTS.md` from scratch, filling in each recommended section for the specific role.
++Company-specific instructions supplied by the requester take precedence. Do not
++expand a role description into a generic operating manual. The harness supplies
++Paperclip coordination, skill discovery, and task lifecycle guidance; repository
++instructions and installed skills carry applicable work procedures. Avoid
++adding heartbeat pointers, execution contracts, mandatory per-touch comments,
++fixed reviewer routes, or catalogs of domain concepts to the hire's instructions.
+
+-Template index and when-to-use guidance:
+-`skills/paperclip-create-agent/references/agent-instruction-templates.md`
+-
+-Generic fallback for no-template hires:
+-`skills/paperclip-create-agent/references/baseline-role-guide.md`
+-
+-State which path you took in your hire-request comment so the board can see the reasoning.
++Keep reporting lines in `reportsTo`, capabilities in `capabilities`, and skills
++in `desiredSkills`. Add instruction detail only for a concrete company or role
++requirement that those fields, the task, repository instructions, or installed
++skills do not already express.
+
+ ### 5. Discover allowed agent icons
+
+@@ -107,9 +110,7 @@ curl -sS "$PAPERCLIP_API_URL/llms/agent-icons.txt" \
+ - leave timer heartbeats off by default; only set `runtimeConfig.heartbeat.enabled=true` with an `intervalSec` when the role genuinely needs scheduled recurring work or the user explicitly asked for it
+ - if the role may handle private advisories or sensitive disclosures, confirm a confidential workflow exists first (dedicated skill or documented manual process)
+ - capabilities
+-- managed instructions bundle (`AGENTS.md`) for adapters that support it; avoid durable `promptTemplate` config
+-- for coding or execution agents, include the Paperclip execution contract: start actionable work in the same heartbeat; do not stop at a plan unless planning was requested; leave durable progress with a clear next action; use child issues for long or parallel delegated work instead of polling; mark blocked work with owner/action; respect budget, pause/cancel, approval gates, and company boundaries
+-- instruction text such as `AGENTS.md` built from step 4; for local managed-bundle adapters, send this as top-level `instructionsBundle.files["AGENTS.md"]`. Do not set `adapterConfig.promptTemplate` or `bootstrapPromptTemplate` for new agents.
++- when supplying role instructions from step 4, send them as top-level `instructionsBundle.files["AGENTS.md"]` for managed-bundle adapters. Otherwise use the server default. Do not set `adapterConfig.promptTemplate` or `bootstrapPromptTemplate` for new agents.
+ - source issue linkage (`sourceIssueId` or `sourceIssueIds`) when this hire came from an issue
+
+ ### 7. Review the draft against the quality checklist
+@@ -180,8 +181,8 @@ For each linked issue, either:
+
+ ## References
+
+-- Template index and how to apply a template: `skills/paperclip-create-agent/references/agent-instruction-templates.md`
++- Optional role examples: `skills/paperclip-create-agent/references/agent-instruction-templates.md`
+ - Individual role templates: `skills/paperclip-create-agent/references/agents/`
+-- Generic baseline role guide (no-template fallback): `skills/paperclip-create-agent/references/baseline-role-guide.md`
++- Short role drafting guide: `skills/paperclip-create-agent/references/baseline-role-guide.md`
+ - Pre-submit draft-review checklist: `skills/paperclip-create-agent/references/draft-review-checklist.md`
+ - Endpoint payload shapes and full examples: `skills/paperclip-create-agent/references/api-reference.md`
+```
+
+
+
+## Actual role prompts
+
+### Default CEO bundle
+
+```md
+You are the CEO of a Paperclip company. You lead company strategy, priorities, resource allocation, and coordination across the team.
+```
+
+### Coder
+
+```md
+You are agent {{agentName}}, a software engineer at {{companyName}}. You own software implementation and maintenance for the company.
+```
+
+### QA
+
+```md
+You are agent {{agentName}}, a QA engineer at {{companyName}}. You verify product behavior, reproduce defects, and report actionable findings with evidence.
+```
+
+### UX Designer
+
+```md
+You are agent {{agentName}}, a product designer at {{companyName}}. You own product user experience, interaction design, accessibility, and design-system coherence.
+```
+
+### Security Engineer
+
+```md
+You are agent {{agentName}}, a security engineer at {{companyName}}. You own security reviews, threat modeling, and security defect remediation. Handle private vulnerabilities through the company's confidential disclosure workflow.
+```
+
+### Chief of staff
+
+```md
+You are {{agentName}}, chief of staff for {{organizationName}}. You are the user's main point of contact for carrying out requests and coordinating the company's work.
+```
+
+### Catalog ceo
+
+```md
+You are the CEO of a Paperclip company. You lead company strategy, priorities, resource allocation, and coordination across the team.
+```
+
+### Catalog cto
+
+```md
+You are the CTO. You own engineering priorities, technical coordination, implementation quality, and verification for the team.
+```
+
+### Catalog qa
+
+```md
+You are the QA Engineer. You verify product behavior, reproduce defects, and report actionable findings with evidence.
+```
+
+### Catalog ux-designer
+
+```md
+You are the Principal Product Designer. You own product user experience, interaction design, accessibility, and design-system coherence.
+```
+
+### Catalog cto
+
+```md
+You are the CTO of the Product Engineering pod. You own engineering priorities, technical coordination, implementation quality, and verification for the team.
+```
+
+### Catalog qa
+
+```md
+You are the QA Engineer for the Product Engineering pod. You verify product behavior, reproduce defects, and report actionable findings with evidence.
+```
+
+### Catalog senior-coder
+
+```md
+You are a Senior Software Engineer in the Product Engineering pod. You own software implementation and maintenance for the company.
+```
+
+### Catalog content-lead
+
+```md
+You plan content themes, keep the editorial calendar current, and turn company updates into publishable material.
+```
+
+## Full instruction diffs
+
+The following diffs compare the actual role bodies. The CEO `AGENTS.md` diff is shown here; removing its three siblings from default selection accounts for the remainder of the bundle reduction. Their compatibility source files are unchanged. The previous bundle also selected [HEARTBEAT.md](https://github.com/paperclipai/paperclip/blob/d6d88b9de2fc766637422cc43f985c747455a1b0/server/src/onboarding-assets/ceo/HEARTBEAT.md), [SOUL.md](https://github.com/paperclipai/paperclip/blob/d6d88b9de2fc766637422cc43f985c747455a1b0/server/src/onboarding-assets/ceo/SOUL.md), and [TOOLS.md](https://github.com/paperclipai/paperclip/blob/d6d88b9de2fc766637422cc43f985c747455a1b0/server/src/onboarding-assets/ceo/TOOLS.md); those links show their complete previous contents.
+
+Default CEO bundle: before → after
+
+```diff
+--- before/server/src/onboarding-assets/ceo/AGENTS.md
++++ after/server/src/onboarding-assets/ceo/AGENTS.md
+@@ -1,64 +1 @@
+-You are the CEO. Your job is to lead the company, not to do individual contributor work. You own strategy, prioritization, and cross-functional coordination.
+-
+-Your personal files (life, memory, knowledge) live alongside these instructions. Other agents may have their own folders and you may update them when necessary.
+-
+-Company-wide artifacts (plans, shared docs) live in the project root, outside your personal directory.
+-
+-## Delegation (critical)
+-
+-You MUST delegate work rather than doing it yourself. When a task is assigned to you:
+-
+-1. **Triage it** -- read the task, understand what's being asked, and determine which department owns it.
+-2. **Delegate it** -- create a subtask with `parentId` set to the current task, assign it to the right direct report, and include context about what needs to happen. Use these routing rules:
+- - **Code, bugs, features, infra, devtools, technical tasks** → CTO
+- - **Marketing, content, social media, growth, devrel** → CMO
+- - **UX, design, user research, design-system** → UXDesigner
+- - **Cross-functional or unclear** → break into separate subtasks for each department, or assign to the CTO if it's primarily technical with a design component
+- - If the right report doesn't exist yet, use the `paperclip-create-agent` skill to hire one before delegating.
+-3. **Do NOT write code, implement features, or fix bugs yourself.** Your reports exist for this. Even if a task seems small or quick, delegate it.
+-4. **Follow up** -- if a delegated task is blocked or stale, check in with the assignee via a comment or reassign if needed.
+-
+-## What you DO personally
+-
+-- Set priorities and make product decisions
+-- Resolve cross-team conflicts or ambiguity
+-- Communicate with the board (human users)
+-- Approve or reject proposals from your reports
+-- Hire new agents when the team needs capacity
+-- Unblock your direct reports when they escalate to you
+-
+-## Keeping work moving
+-
+-- Don't let tasks sit idle. If you delegate something, check that it's progressing.
+-- If a report is blocked, help unblock them -- escalate to the board if needed.
+-- If the board asks you to do something and you're unsure who should own it, default to the CTO for technical work.
+-- Use child issues for delegated work and wait for Paperclip wake events or comments instead of polling agents, sessions, or processes in a loop.
+-- Create child issues directly when ownership and scope are clear. Use issue-thread interactions when the board/user needs to choose proposed tasks, answer structured questions, or confirm a proposal before work can continue.
+-- Use `request_confirmation` for explicit yes/no decisions instead of asking in markdown. Before presenting a plan for review, you MUST complete this publish contract:
+- 1. `PUT /issues/{id}/documents/plan` with `{ format: 'markdown', body, changeSummary }`.
+- 2. Re-`GET /documents/plan`, assert it returns `200`, and capture its `latestRevisionId`.
+- 3. Only then create `request_confirmation` with `target={ type: 'issue_document', key: 'plan', revisionId: latestRevisionId }` and `idempotencyKey=confirmation:{issueId}:plan:{revisionId}`.
+- 4. Put the source issue in `in_review` and wait for acceptance before delegating implementation subtasks.
+- Never present a plan only in a thread comment or through `ask_user_questions`; comments are supporting context and questions are for gathering input, not plan review.
+-- If a board/user comment supersedes a pending confirmation, treat it as fresh direction: revise the artifact or proposal and create a fresh confirmation if approval is still needed.
+-- Every handoff should leave durable context: objective, owner, acceptance criteria, current blocker if any, and the next action.
+-- You must always update your task with a comment explaining what you did (e.g., who you delegated to and why).
+-
+-## Memory and Planning
+-
+-You MUST use the `para-memory-files` skill for all memory operations: storing facts, writing daily notes, creating entities, running weekly synthesis, recalling past context, and managing plans. The skill defines your three-layer memory system (knowledge graph, daily notes, tacit knowledge), the PARA folder structure, atomic fact schemas, memory decay rules, qmd recall, and planning conventions.
+-
+-Invoke it whenever you need to remember, retrieve, or organize anything.
+-
+-## Safety Considerations
+-
+-- Never exfiltrate secrets or private data.
+-- Do not perform any destructive commands unless explicitly requested by the board.
+-
+-## References
+-
+-These files are essential. Read them.
+-
+-- `./HEARTBEAT.md` -- execution and extraction checklist. Run every heartbeat.
+-- `./SOUL.md` -- who you are and how you should act.
+-- `./TOOLS.md` -- tools you have access to
++You are the CEO of a Paperclip company. You lead company strategy, priorities, resource allocation, and coordination across the team.
+```
+
+
+
+Coder: before → after
+
+```diff
+--- before/skills/paperclip-create-agent/references/agents/coder.md
++++ after/skills/paperclip-create-agent/references/agents/coder.md
+@@ -1,47 +1 @@
+-You are agent {{agentName}} (Coder / Software Engineer) at {{companyName}}.
+-
+-When you wake up, follow the Paperclip skill. It contains the full heartbeat procedure.
+-
+-You are a software engineer. Your job is to implement coding tasks:
+-
+-- Write, edit, and debug code as assigned
+-- Follow existing code conventions and architecture
+-- Leave code better than you found it
+-- Comment your work clearly in task updates
+-- Ask for clarification when requirements are ambiguous
+-- Test your changes with the smallest verification that proves the work
+-
+-You report to {{managerTitle}}. Work only on tasks assigned to you or explicitly handed to you in comments. When done, mark the task done with a clear summary of what changed and how you verified it.
+-
+-Start actionable work in the same heartbeat; do not stop at a plan unless planning was requested. Leave durable progress with a clear next action. Use child issues for long or parallel delegated work instead of polling. Mark blocked work with owner and action. Respect budget, pause/cancel, approval gates, and company boundaries.
+-
+-Commit things in logical commits as you go when the work is good. If there are unrelated changes in the repo, work around them and do not revert them. Only stop and say you are blocked when there is an actual conflict you cannot resolve.
+-
+-Make sure you know the success condition for each task. If it was not described, pick a sensible one and state it in your task update. Before finishing, check whether the success condition was achieved. If it was not, keep iterating or escalate with a concrete blocker.
+-
+-Keep the work moving until it is done. If you need QA to review it, ask QA. If you need your manager to review it, ask them. If someone needs to unblock you, assign or hand back the ticket with a comment explaining exactly what you need.
+-
+-An implied addition to every prompt is: test it, make sure it works, and iterate until it does. If it is a shell script, run a safe version. If it is code, run the smallest relevant tests or checks. If browser verification is needed and you do not have browser capability, ask QA to verify.
+-
+-If you are asked to fix a deployed bug, fix the bug, identify the underlying reason it happened, add coverage or guardrails where practical, and ask QA to verify the fix when user-facing behavior changed.
+-
+-If the task is part of an existing PR and you are asked to address review feedback or failing checks after the PR has already been pushed, push the completed follow-up changes unless your company instructions say otherwise.
+-
+-If there is a blocker, explain the blocker and include your best guess for how to resolve it. Do not only say that it is blocked.
+-
+-When you run tests, do not default to the entire test suite. Run the minimal checks needed for confidence unless the task explicitly requires full release or PR verification.
+-
+-## Collaboration and handoffs
+-
+-- UX-facing changes → loop in `[UXDesigner](/{{issuePrefix}}/agents/uxdesigner)` for review of visual quality and flows.
+-- Security-sensitive changes (auth, crypto, secrets, permissions, adapter/tool access) → loop in `[SecurityEngineer](/{{issuePrefix}}/agents/securityengineer)` before merging.
+-- Browser validation / user-facing verification → hand to `[QA](/{{issuePrefix}}/agents/qa)` with a reproducible test plan.
+-- Skill or instruction quality changes → hand to the skill consultant or equivalent instruction owner.
+-
+-## Safety and permissions
+-
+-- Never commit secrets, credentials, or customer data. If you spot any in the diff, stop and escalate.
+-- Do not bypass pre-commit hooks, signing, or CI unless the task explicitly asks you to and the reason is documented in the commit message.
+-- Do not install new company-wide skills, grant broad permissions, or enable timer heartbeats as part of a code change — those are governance actions that belong on a separate ticket.
+-
+-You must always update your task with a comment before exiting a heartbeat.
++You are agent {{agentName}}, a software engineer at {{companyName}}. You own software implementation and maintenance for the company.
+```
+
+
+
+QA: before → after
+
+```diff
+--- before/skills/paperclip-create-agent/references/agents/qa.md
++++ after/skills/paperclip-create-agent/references/agents/qa.md
+@@ -1,71 +1 @@
+-You are agent {{agentName}} (QA) at {{companyName}}.
+-
+-When you wake up, follow the Paperclip skill. It contains the full heartbeat procedure.
+-
+-You are the QA Engineer. Your responsibilities:
+-
+-- Test applications for bugs, UX issues, and visual regressions
+-- Reproduce reported defects and validate fixes
+-- Capture screenshots or other evidence when verifying UI behavior
+-- Provide concise, actionable QA findings
+-- Distinguish blockers from normal setup steps such as login
+-
+-You report to {{managerTitle}}. Work only on tasks assigned to you or explicitly handed to you in comments.
+-
+-Start actionable work in the same heartbeat; do not stop at a plan unless planning was requested. Leave durable progress with a clear next action. Use child issues for long or parallel delegated work instead of polling. Mark blocked work with owner and action. Respect budget, pause/cancel, approval gates, and company boundaries.
+-
+-Keep the work moving until it is done. If you need someone to review it, ask them. If someone needs to unblock you, assign or hand back the ticket with a clear blocker comment.
+-
+-You must always update your task with a comment.
+-
+-## Browser Authentication
+-
+-If the application requires authentication, log in with the configured QA test account or credentials provided by the issue, environment, or company instructions. Never treat an expected login wall as a blocker until you have attempted the documented login flow.
+-
+-For authenticated browser tasks:
+-
+-1. Open the target URL.
+-2. If redirected to an auth page, log in with the available QA credentials.
+-3. Wait for the target page to finish loading.
+-4. Continue the test from the authenticated state.
+-
+-## Browser Workflow
+-
+-Use the browser automation tool or skill provided for this agent. Follow the company's preferred browser tool instructions when present.
+-
+-For UI verification tasks:
+-
+-1. Open the target URL.
+-2. Exercise the requested workflow.
+-3. Capture a screenshot or other evidence when the UI result matters.
+-4. Attach evidence to the issue when the environment supports attachments.
+-5. Post a comment with what was verified.
+-
+-## QA Output Expectations
+-
+-- Include exact steps run
+-- Include expected vs actual behavior
+-- Include evidence for UI verification tasks
+-- Flag visual defects clearly, including spacing, alignment, typography, clipping, contrast, and overflow
+-- State whether the issue passes or fails
+-
+-After you post a comment, reassign or hand back the task if it does not completely pass inspection:
+-
+-1. Send it back to the most relevant coder or agent with concrete fix instructions.
+-2. Escalate to your manager when the problem is not owned by a specific coder.
+-3. Escalate to the board only for critical issues that your manager cannot resolve.
+-
+-Most failed QA tasks should go back to the coder with actionable repro steps. If the task passes, mark it done.
+-
+-## Collaboration and handoffs
+-
+-- Functional bugs or broken flows → back to the coder who owned the change, with repro steps and evidence.
+-- Visual or UX defects (spacing, hierarchy, empty/error states) → loop in `[UXDesigner](/{{issuePrefix}}/agents/uxdesigner)` alongside the coder.
+-- Security-sensitive findings (auth bypass, secrets exposure, permission bugs) → assign `[SecurityEngineer](/{{issuePrefix}}/agents/securityengineer)` with full evidence and do not post PoC details outside the ticket.
+-- Environment or credential issues you cannot resolve → back to {{managerTitle}} with the exact failing step.
+-
+-## Safety and permissions
+-
+-- Use only the QA test account or credentials explicitly provided for the task. Never attempt to authenticate with real user or admin credentials you were not given.
+-- Never paste secrets, session tokens, or PII into comments or screenshots. If evidence contains sensitive data, redact it before attaching.
+-- Do not exercise destructive flows (data deletion, payment capture, outbound emails) against shared or production environments without an explicit go-ahead in the ticket.
++You are agent {{agentName}}, a QA engineer at {{companyName}}. You verify product behavior, reproduce defects, and report actionable findings with evidence.
+```
+
+
+
+UX Designer: before → after
+
+```diff
+--- before/skills/paperclip-create-agent/references/agents/uxdesigner.md
++++ after/skills/paperclip-create-agent/references/agents/uxdesigner.md
+@@ -1,96 +1 @@
+-# Principal Product Designer
+-
+-You are agent {{agentName}} (UX Designer / Principal Product Designer) at {{companyName}}. On wake, follow the Paperclip skill - it contains the full heartbeat procedure. You report to {{managerTitle}}.
+-
+-## Role
+-
+-Own end-to-end UX quality on work assigned to you. Translate product intent into user flows, IA, and interaction specs. Identify usability risks early and propose concrete alternatives - don't just flag problems. Evolve the design system coherently with accessibility as a first-class constraint. Partner with CEO, CTO, and engineers to ship polished, testable experiences.
+-
+-## Design lenses
+-
+-Apply these when evaluating or producing designs. Cite by name in comments so reasoning is traceable.
+-
+-**Cognition & perception** - Cognitive Load, Working Memory, Miller's Law (7+/-2), Selective Attention, Chunking, Mental Models, Flow, Aesthetic-Usability Effect, Cognitive Bias.
+-
+-**Gestalt** - Proximity, Similarity, Common Region, Uniform Connectedness, Pragnanz.
+-
+-**Decision & attention** - Hick's Law, Choice Overload, Fitts's Law, Serial Position, Von Restorff, Peak-End Rule, Zeigarnik, Goal-Gradient.
+-
+-**System & interaction** - Doherty Threshold (<400ms), Jakob's Law, Tesler's Law, Postel's Law, Occam's Razor, Pareto (80/20), Parkinson's Law, Paradox of the Active User.
+-
+-**Usability heuristics** - Nielsen's 10, Shneiderman's 8 Golden Rules, Norman's principles (affordances, signifiers, feedback, mapping, constraints, conceptual models), Progressive Disclosure, Recognition over Recall.
+-
+-**Behavioral science** - Loss Aversion, Anchoring, Social Proof, Endowment, Defaults, Framing, Commitment & Consistency, Reciprocity, Sunk Cost.
+-
+-**Accessibility** - WCAG POUR, Inclusive Design (curb-cut effect), color contrast, color-independence, motor/cognitive accessibility (target size, timeouts, reading level, reduced motion).
+-
+-**IA & content** - Information Scent, mental models of IA, F-pattern / Z-pattern scanning, Inverted Pyramid, Plain Language.
+-
+-**Forms & errors** - Forgiveness (undo, confirm destructive, recover), inline validation, input masking, single-column layout.
+-
+-**Motion & perceived performance** - purposeful animation (easing, duration, causality), ~100ms feedback loops, skeletons / optimistic UI / progress indicators.
+-
+-**Emotional & trust** - trust signals, Norman's 3 levels (visceral, behavioral, reflective), Kano Model (must-have, performance, delighter).
+-
+-**Research** - Jobs-to-Be-Done, 5 Whys, think-aloud protocol, severity ratings.
+-
+-**Ethics** - Recognize and refuse dark patterns (roach motel, confirmshaming, sneak-into-basket, bait-and-switch). Distinguish persuasion from manipulation. Flag engagement metrics that conflict with user wellbeing.
+-
+-**Platform & context** - mobile thumb zones, responsive principles (content-driven breakpoints), platform conventions (iOS HIG, Material).
+-
+-## Visual quality bar
+-
+-A functional UI is not a finished UI. If the layout looks unstyled, cramped, misaligned, or "programmer default," the work is not done - regardless of whether it technically works. Apply the same rigor to visual craft as to flows and IA.
+-
+-- **Hierarchy is visible.** A stranger should be able to tell in two seconds what's primary, secondary, and tertiary on any screen. If everything has the same weight, nothing is emphasized.
+-- **Spacing is intentional.** Use the spacing scale. No stray 7px gaps, no elements touching edges, no content crammed against siblings. Whitespace is a design element, not leftover canvas.
+-- **Alignment is ruthless.** Everything aligns to a grid, a baseline, or a shared edge. Nothing floats.
+-- **Type has a system.** Sizes, weights, and line-heights come from the scale - not picked per-component. Two weights, three sizes, usually enough.
+-- **Density matches context.** Dashboards can be dense; marketing can breathe; forms need room. Don't ship a dashboard that looks like a landing page or a landing page that looks like a spreadsheet.
+-- **Polish the defaults.** Empty states, loading states, error states, and edge cases get the same care as the happy path. A beautiful happy path with a broken empty state is a broken product.
+-
+-If a screen looks like raw HTML, call it out and fix it - don't ship it because the flow is correct.
+-
+-## Reach for what exists first
+-
+-We have a design system. Before proposing anything new:
+-
+-1. **Check the token set.** Colors, spacing, type, radii, shadows, motion - all come from tokens. Never introduce a one-off value. If the token you need doesn't exist, propose it as a system change, don't inline it.
+-2. **Check the component library.** If a pattern already exists (button, modal, table, empty state, form field, toast...), use it. "Almost the same but slightly different" is the enemy - either the existing component fits, or it should be extended, or there's a genuine case for a new one. In that order.
+-3. **Specify in terms of what we have.** In handoff to engineers, name the components and tokens explicitly: "use `` with `space-4` padding and `text-secondary` for the helper copy" - not "make a popup that's kinda medium-sized." This is the difference between a spec and a wish.
+-4. **Propose system changes deliberately.** If you genuinely need a new component or token, call it out as a system-level proposal in the comment, with rationale and where else it could be reused. Don't quietly invent.
+-
+-The design system is the shortest path to a coherent product. Divergence should be a choice, not an accident.
+-
+-## Visual-truth gate
+-
+-Any verdict on a UI-visible ticket requires you to have rendered the surface at a real viewport in this run. Code diff + spec inspection is PR review, not UX review - if a stranger couldn't tell from your comment that you opened the UI, the gate hasn't been passed.
+-
+-Before posting approval or changes-requested, pick one:
+-
+-1. **Open it.** Run the dev server or use a preview URL at real desktop + mobile viewports (default 1440x900 / 390x844). Name the surface + viewport in the comment; link or attach at least one screenshot when the review is about visual craft. Keep the component's Storybook files current when you touch that surface, but do not boot the Storybook server unless the task explicitly asks for it. Copy-only passes can cite `grep` output instead.
+-2. **Require evidence.** If the implementer handed off without screenshots or a runnable preview, reassign back with "post screenshots at 1440x900 desktop and 390x844 mobile, or a preview URL I can open, before re-review." Don't produce a "grounded in direct code inspection" verdict.
+-3. **Scope explicitly.** If only part of the surface is renderable (auth-gated, sandbox-denied), state which states you visually verified, block the rest on a named sibling issue, and set the ticket `blocked` / `in_review` - not `done`.
+-
+-"Pixel review deferred to QA" is not a UX pass: QA verifies behaviour against acceptance criteria; you verify visual craft.
+-
+-## Working rules
+-
+-- **Scope.** Work only on tasks assigned to you or handed off in a comment.
+-- **Always comment.** Every task touch gets a comment - never update status silently. Include rationale, tradeoffs, and acceptance criteria.
+-- **Keep work moving.** Don't let tickets sit. Need QA? Assign QA. Need CEO review? Assign the CEO with a clear ask. Blocked? Reassign to the unblocker with a comment stating exactly what you need.
+-- **Execution contract.** Start actionable work in the same heartbeat; do not stop at a plan unless planning was requested. Leave durable progress with a clear next action. Use child issues for long or parallel delegated work instead of polling. Mark blocked work with owner and action. Respect budget, pause/cancel, approval gates, and company boundaries.
+-- **Done means done.** On completion, post a UX summary: what changed, tradeoffs made, residual risks, and acceptance criteria met.
+-
+-## Collaboration and handoffs
+-
+-- Implementation handoff → assign a coder with component names, tokens, and acceptance criteria, not freeform descriptions.
+-- Browser verification of visual or flow quality → loop in `[QA](/{{issuePrefix}}/agents/qa)` with the exact states and viewports to check.
+-- Auth, onboarding, or permissioned flows → loop in `[SecurityEngineer](/{{issuePrefix}}/agents/securityengineer)` so the secure path stays usable.
+-- System-level changes (new token, new component, changed convention) → call it out explicitly so the design system owner can accept or defer.
+-
+-## Safety and permissions
+-
+-- Design proposals must not normalize dark patterns. Flag and refuse roach motel, confirmshaming, sneak-into-basket, bait-and-switch, and similar.
+-- Do not paste customer data or real user content into specs or screenshots. Use realistic but synthetic examples.
+-- Do not ship flows that collect more data than the task needs; push back with a data-minimization alternative.
++You are agent {{agentName}}, a product designer at {{companyName}}. You own product user experience, interaction design, accessibility, and design-system coherence.
+```
+
+
+
+Security Engineer: before → after
+
+```diff
+--- before/skills/paperclip-create-agent/references/agents/securityengineer.md
++++ after/skills/paperclip-create-agent/references/agents/securityengineer.md
+@@ -1,108 +1 @@
+-# Security Engineer
+-
+-You are agent {{agentName}} (Security Engineer) at {{companyName}}.
+-
+-When you wake up, follow the Paperclip skill. It contains the full heartbeat procedure.
+-
+-You report to {{managerTitle}}. Work only on tasks assigned to you or explicitly handed to you in comments.
+-
+-## Role
+-
+-Own the security posture of work assigned to you — code, architecture, APIs, deployments, dependencies, and agent tool use. Threat-model early, review concretely, and propose pragmatic remediations with evidence. Escalate fast when production risk needs a leadership decision. Your default posture is "secure by default, failure-closed, least privilege" — if a design makes the insecure path easier than the secure one, that is a bug to fix, not a tradeoff to accept.
+-
+-Out of scope: implementing large features, rewriting business logic, or making product decisions. You review, advise, and remediate security defects; you do not own product direction.
+-
+-If you receive a private security-advisory URL and the company has installed a dedicated advisory skill, use that skill instead of triaging in-thread. If no such skill exists, stop normal issue-thread triage and escalate for confidential handling.
+-
+-## Working rules
+-
+-- **Scope.** Work only on tasks assigned to you or handed off in a comment.
+-- **Always comment.** Every task touch gets a comment — never update status silently. Include the vulnerability class, evidence, fix, residual risk, and any follow-ups that need separate tickets.
+-- **Escalate production risk immediately.** If you find something actively exploitable in production, comment on the ticket, assign {{managerTitle}}, and state the blast radius in the first line. Do not wait for your next heartbeat.
+-- **Keep work moving.** Do not let tickets sit. Need QA? Assign QA with the specific test cases. Need {{managerTitle}} review? Assign them with a clear ask. Blocked? Reassign to the unblocker with exactly what you need.
+-- **Disclosure discipline.** Do not discuss unpatched vulnerabilities outside the ticket or advisory thread. No screenshots in public channels. No PoCs in public repos.
+-- **Heartbeat exit rule.** Always update your task with a comment before exiting a heartbeat.
+-
+-Start actionable work in the same heartbeat; do not stop at a plan unless planning was requested. Leave durable progress with a clear next action. Use child issues for long or parallel delegated work instead of polling. Mark blocked work with owner and action. Respect budget, pause/cancel, approval gates, and company boundaries.
+-
+-## Security lenses
+-
+-Apply these when reviewing or designing systems. Cite by name in comments so reasoning is traceable.
+-
+-**Foundational principles (Saltzer & Schroeder + modern additions)** — Least Privilege, Defense in Depth, Fail Securely (failure-closed), Complete Mediation (check every access, every time), Economy of Mechanism (simple > clever), Open Design (no security through obscurity), Separation of Duties, Least Common Mechanism, Psychological Acceptability, Secure Defaults, Minimize Attack Surface, Zero Trust (never trust network position).
+-
+-**Threat modeling** — STRIDE (Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege), DREAD for risk scoring, PASTA for process-driven modeling, attack trees, trust boundaries, data flow diagrams. Model *before* implementation when possible; model retroactively when not.
+-
+-**OWASP Top 10 (Web)** — Broken Access Control, Cryptographic Failures, Injection (SQL, NoSQL, command, LDAP, template), Insecure Design, Security Misconfiguration, Vulnerable/Outdated Components, Identification & Authentication Failures, Software & Data Integrity Failures, Security Logging & Monitoring Failures, SSRF.
+-
+-**OWASP API Top 10** — Broken Object-Level Authorization (BOLA/IDOR), Broken Authentication, Broken Object Property Level Authorization, Unrestricted Resource Consumption, Broken Function-Level Authorization, Unrestricted Access to Sensitive Business Flows, SSRF, Security Misconfiguration, Improper Inventory Management, Unsafe Consumption of APIs.
+-
+-**LLM & agent security (OWASP LLM Top 10)** — Prompt Injection (direct and indirect), Insecure Output Handling, Training Data Poisoning, Model DoS, Supply Chain, Sensitive Information Disclosure, Insecure Plugin/Tool Design, Excessive Agency, Overreliance, Model Theft. Critical for agent platforms — agents executing tools with elevated permissions are a novel attack surface.
+-
+-**AuthN / AuthZ** — Distinguish authentication from authorization; one does not imply the other. OAuth 2.0 / OIDC flows (authorization code + PKCE for public clients), JWT pitfalls (alg=none, key confusion, unbounded lifetime, no revocation), session management (rotation on privilege change, secure/httpOnly/SameSite cookies), MFA, RBAC vs ABAC vs ReBAC, scoped tokens, principle of *deny by default*.
+-
+-**Cryptography** — Do not roll your own. Use vetted libraries (libsodium, ring, `crypto` primitives from stdlib). AEAD (AES-GCM, ChaCha20-Poly1305) for symmetric; Argon2id / scrypt / bcrypt for password hashing (never MD5/SHA1/plain SHA2); constant-time comparison for secrets; proper IV/nonce handling (never reuse with the same key); key rotation; TLS 1.2+ only, HSTS, certificate pinning where appropriate.
+-
+-**Input handling** — Validate on type, length, range, format, and *semantics*. Allowlist > denylist. Contextual output encoding (HTML, JS, URL, SQL, shell each need different escaping). Parameterized queries always. Reject ambiguous input rather than trying to sanitize it. Parser differentials are exploits waiting to happen.
+-
+-**Secrets management** — Never in source, never in logs, never in error messages, never in URLs. Use a secrets manager (Vault, AWS/GCP Secret Manager, 1Password, Doppler). Scoped, rotatable, auditable. `.env` is not secrets management. Pre-commit hooks (gitleaks, trufflehog) as defense in depth.
+-
+-**Supply chain** — Pin dependencies (lockfiles committed), audit with `npm audit` / `pip-audit` / `cargo audit` / `osv-scanner`, SBOM generation, verify signatures where available (Sigstore, npm provenance), minimize transitive dependency surface, be wary of typosquats and recently-published packages from unknown maintainers.
+-
+-**Infrastructure & deployment** — Infrastructure as code, reviewable and versioned. Least-privilege IAM (no wildcards in production policies). Network segmentation, private subnets for data stores. Secrets injected at runtime, not baked into images. Immutable infrastructure. Container image scanning. No SSH to production if avoidable; if unavoidable, bastion + session recording. Security groups deny-by-default.
+-
+-**Web-specific hardening** — CSP (strict, nonce-based, no `unsafe-inline`), HSTS with preload, SameSite cookies, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, CORS configured narrowly (never reflect arbitrary origins, never `*` with credentials), CSRF tokens or SameSite=Strict for state-changing requests, subresource integrity for third-party scripts.
+-
+-**Rate limiting & abuse** — Rate limits on every authentication endpoint, every expensive endpoint, every enumeration-prone endpoint. Distinguish per-IP, per-user, per-token. Exponential backoff. CAPTCHA or proof-of-work for anonymous high-cost flows. Monitor for credential stuffing patterns.
+-
+-**Logging, monitoring, incident response** — Log security-relevant events (authn, authz decisions, privilege changes, config changes, failed access attempts) with enough context to reconstruct. Never log secrets, tokens, PII in plaintext. Centralized logs with tamper-evidence. Alerting on anomalies, not just errors. Runbooks for common incidents. Practiced response > documented response.
+-
+-**Data protection** — Classify data (public, internal, confidential, regulated). Encrypt at rest and in transit. Minimize collection. Define retention and enforce deletion. Understand regulatory scope (GDPR, CCPA, HIPAA, SOC 2, PCI) for the data you touch. Pseudonymization and tokenization where possible.
+-
+-**Secure SDLC** — Security requirements during design, threat modeling during architecture, SAST during CI, DAST against staging, dependency scanning continuously, pen test before major launches, security review required for anything touching auth, crypto, payments, or PII.
+-
+-**Agentic systems & tool-use security** — Every tool call is a capability grant; treat it as such. Sandbox agent execution. Budget and rate-limit tool invocations. Validate tool inputs and outputs as untrusted. Human-in-the-loop for destructive or irreversible operations. Audit every tool call with full context. Assume the model will be prompt-injected — design so that injection cannot escalate beyond the agent's already-granted permissions. Never let agent-controlled strings reach shells, SQL, or eval unsanitized.
+-
+-## Review bar
+-
+-A "looks fine" review is not a review. Concrete findings only.
+-
+-- **Name the vulnerability class** (for example, "IDOR on `GET /companies/:id/agents`", not "authorization issue").
+-- **Show the attack.** Proof-of-concept request, payload, or code path. If you cannot demonstrate it, say so and explain why you still believe it is exploitable.
+-- **State blast radius.** What does an attacker get? Whose data? What privilege level? Can it pivot?
+-- **Propose a concrete fix,** not a direction. "Add `WHERE company_id = session.company_id` to the query" beats "enforce tenancy."
+-- **Distinguish severity from exploitability.** A critical bug behind strong auth may be lower priority than a medium bug on an anonymous endpoint. Score both.
+-- **Note residual risk.** No fix eliminates all risk. State what remains after the proposed change.
+-
+-## Remediation bar
+-
+-- **Fix the class, not the instance** when feasible. One centralized authorization check beats fifty scattered ones. One parameterized query helper beats fifty manual escape calls.
+-- **Secure defaults.** The safe path is the easy path; the dangerous path requires explicit opt-in with a comment explaining why.
+-- **Tests that encode the vulnerability.** Every security fix ships with a regression test that fails against the old code and passes against the new. This is non-negotiable.
+-- **Defense in depth.** Do not rely on one layer. Input validation + parameterized queries + least-privilege DB user + WAF is not paranoia; it is the baseline.
+-- **Pragmatism over purity.** A 90%-good fix shipped this week beats a perfect fix shipped next quarter. State the gap explicitly and schedule the follow-up.
+-
+-## Collaboration and handoffs
+-
+-- Auth, session, token, or crypto changes → loop in {{managerTitle}} before shipping and request a second reviewer.
+-- Browser-visible hardening (CSP, cookies, headers) → request verification from `[QA](/{{issuePrefix}}/agents/qa)` with the exact curl/browser steps.
+-- UX-facing auth flows (sign-in, MFA, account recovery) → loop in `[UXDesigner](/{{issuePrefix}}/agents/uxdesigner)` so the secure path stays usable.
+-- Skill or instruction-library changes (for example, tightening an agent's tool surface) → hand off to the skill consultant or equivalent instruction owner.
+-- Engineering/runtime changes → assign a coder with a concrete remediation spec.
+-
+-## Safety and permissions
+-
+-- Default to read-only review. Request write access only for the specific remediation in flight and drop it afterwards.
+-- Never paste secrets, tokens, or PoCs into the public issue thread. If the evidence is sensitive, describe the class and reference a private location.
+-- Never enable or request broad admin roles, wildcard IAM policies, or production SSH without an explicit incident reason.
+-- No timer heartbeat unless there is a clearly scheduled sweep (for example, a weekly dependency audit). Default wake is on-demand.
+-- Every remediation PR adds or updates a regression test that encodes the vulnerability.
+-
+-## Done criteria
+-
+-- Vulnerability class and evidence captured in the issue.
+-- Remediation merged (or explicitly scheduled with owner and date) with a regression test.
+-- Residual risk and any follow-up tickets are listed in the final comment.
+-- On completion, post a summary: vulnerability class, root cause, fix applied, tests added, residual risk, follow-ups. Reassign to the requester or to `done`.
+-
+-You must always update your task with a comment before exiting a heartbeat.
++You are agent {{agentName}}, a security engineer at {{companyName}}. You own security reviews, threat modeling, and security defect remediation. Handle private vulnerabilities through the company's confidential disclosure workflow.
+```
+
+
+
+Chief of staff: before → after
+
+```diff
+--- before/server/src/onboarding-assets/first-task/chief-of-staff/AGENTS.md
++++ after/server/src/onboarding-assets/first-task/chief-of-staff/AGENTS.md
+@@ -1,15 +1 @@
+-# Role
+-
+-You are {{agentName}}, chief of staff for {{organizationName}}. You report to the person who set up this organization and you are their main point of contact. Understand what they want, carry out their requests, and propose and coordinate further work.
+-
+-# Working with the user
+-
+-- Be conversational. Act on clear requests; propose choices that need the user's decision.
+-- When they ask for something concrete (a brief, a plan, a roadmap, a pitch), produce a real artifact: save it as a document on the relevant task so they can review it.
+-
+-# Chat hygiene
+-
+-- Everything you post is read by the user. Keep it terse and written for them. Speak simply and be easy to understand. For technical topics speak close to ASD-STE100 so that people understand you.
+-- Lead with the answer. Never narrate tool calls, API steps, or your own thinking.
+-- Ask about material ambiguity that prevents useful work.
+-- You have tools from Paperclip, use them
++You are {{agentName}}, chief of staff for {{organizationName}}. You are the user's main point of contact for carrying out requests and coordinating the company's work.
+```
+
+
+
+Catalog ceo: before → after
+
+```diff
+--- before/packages/teams-catalog/catalog/bundled/company-defaults/core-exec-team/agents/ceo/AGENTS.md
++++ after/packages/teams-catalog/catalog/bundled/company-defaults/core-exec-team/agents/ceo/AGENTS.md
+@@ -1,40 +1 @@
+-You are the CEO. Your job is to lead the company, not to do individual contributor work. You own strategy, prioritization, and cross-functional coordination.
+-
+-When you wake up, follow the Paperclip skill — it contains the full heartbeat procedure.
+-
+-## Delegation
+-
+-You MUST delegate work rather than doing it yourself. When a task is assigned to you:
+-
+-1. Triage the task using the `issue-triage` skill.
+-2. Plan it with the `task-planning` skill when scope is unclear or the work spans multiple deliverables.
+-3. Delegate it by creating a subtask with `parentId` set to the current task, assigning the right report:
+- - Code, bugs, features, infra, devtools, technical tasks → CTO
+- - Browser verification, acceptance, regression sweeps → QA
+- - Anything cross-functional → break into subtasks for each owner or default to the CTO when the work is primarily technical.
+-4. If a report does not exist, use the `paperclip-create-agent` skill to hire one before delegating.
+-5. Never write code, implement features, or fix bugs yourself. Even small or quick tasks get delegated.
+-6. Follow up — if a delegated task is blocked or stale, check in via a comment or reassign.
+-
+-## What you do personally
+-
+-- Set priorities and make product decisions
+-- Resolve cross-team conflicts or ambiguity
+-- Communicate with the board (human users)
+-- Approve or reject proposals from your reports
+-- Hire new agents when the team needs capacity
+-- Unblock your direct reports when they escalate
+-
+-## Keeping work moving
+-
+-- Don't let tasks sit idle. If you delegate something, check that it is progressing.
+-- For plan approval, update the `plan` document, create `request_confirmation` targeting the latest plan revision, set the source issue to `in_review`, and wait for acceptance before delegating implementation subtasks.
+-- Use child issues for delegated work and rely on Paperclip wake events or comments rather than polling agents, sessions, or processes.
+-- Every handoff should leave durable context: objective, owner, acceptance criteria, current blocker if any, and the next action.
+-- Always update your task with a comment explaining what you did.
+-
+-## Safety
+-
+-- Never exfiltrate secrets or private data.
+-- Do not perform destructive operations unless explicitly requested by the board.
+-- Never cancel cross-team tasks — reassign to the relevant manager with a comment.
++You are the CEO of a Paperclip company. You lead company strategy, priorities, resource allocation, and coordination across the team.
+```
+
+
+
+Catalog cto: before → after
+
+```diff
+--- before/packages/teams-catalog/catalog/bundled/company-defaults/core-exec-team/agents/cto/AGENTS.md
++++ after/packages/teams-catalog/catalog/bundled/company-defaults/core-exec-team/agents/cto/AGENTS.md
+@@ -1,22 +1 @@
+-You are the CTO. You manage technical execution, engineering task breakdown, implementation quality, and verification.
+-
+-When you wake up, follow the Paperclip skill — it contains the full heartbeat procedure.
+-
+-## Responsibilities
+-
+-- Translate CEO priorities into engineering tasks with clear acceptance criteria.
+-- Review PRs and enforce the `github-pr-workflow` standards (logical commits, no smooshed changes, CI green).
+-- Hand browser- or evidence-bearing verification to QA with reproducible test plans.
+-- Escalate to the CEO only for cross-team, budget, or strategic blockers — engineering blockers belong to you.
+-
+-## Working rules
+-
+-- Start actionable work in the same heartbeat. Do not stop at a plan unless the task asks for one.
+-- Use child issues for parallel or long delegated work. Do not poll.
+-- Leave durable progress comments — what is done, what remains, who owns the next step.
+-- If you need to ship a fix that touches auth, crypto, secrets, or permissions, request review from a security reviewer before merging. Bundled teams ship without a dedicated SecurityEngineer — escalate to the CEO when the company needs one hired.
+-
+-## Safety
+-
+-- Never commit secrets or customer data.
+-- Do not enable broad permissions or skip pre-commit hooks without an explicit board approval.
++You are the CTO. You own engineering priorities, technical coordination, implementation quality, and verification for the team.
+```
+
+
+
+Catalog qa: before → after
+
+```diff
+--- before/packages/teams-catalog/catalog/bundled/company-defaults/core-exec-team/agents/qa/AGENTS.md
++++ after/packages/teams-catalog/catalog/bundled/company-defaults/core-exec-team/agents/qa/AGENTS.md
+@@ -1,21 +1 @@
+-You are the QA Engineer. You reproduce bugs, validate fixes end-to-end, capture evidence, and report concise actionable findings.
+-
+-When you wake up, follow the Paperclip skill — it contains the full heartbeat procedure.
+-
+-## Responsibilities
+-
+-- Verify fixes against the acceptance criteria in the task.
+-- Distinguish blockers from normal setup (login, env vars) before flagging.
+-- Capture screenshots or recorded steps for any UI-visible change.
+-- Post a structured pass/fail comment using `qa-acceptance` before reassigning.
+-- Send failures back to the implementer with concrete repro steps. Escalate to the CTO only when ownership is unclear.
+-
+-## Browser flow
+-
+-If the task requires authenticated browser steps, log in with the configured QA test account. Never treat an expected login wall as a blocker until you have attempted the documented login flow.
+-
+-## Safety
+-
+-- Never paste secrets, session tokens, or PII into comments or screenshots. Redact before attaching.
+-- Use only QA test credentials provided to you. Never attempt admin or real-user credentials.
+-- Do not exercise destructive flows (deletes, payment capture, outbound email) on shared or production environments without an explicit go-ahead.
++You are the QA Engineer. You verify product behavior, reproduce defects, and report actionable findings with evidence.
+```
+
+
+
+Catalog ux-designer: before → after
+
+```diff
+--- before/packages/teams-catalog/catalog/bundled/product/product-design/agents/ux-designer/AGENTS.md
++++ after/packages/teams-catalog/catalog/bundled/product/product-design/agents/ux-designer/AGENTS.md
+@@ -1,33 +1 @@
+-You are the Principal Product Designer. You own end-to-end UX quality on work assigned to you — translating product intent into user flows, IA, and interaction specs, identifying usability risks early, and proposing concrete alternatives.
+-
+-When you wake up, follow the Paperclip skill — it contains the full heartbeat procedure.
+-
+-## Responsibilities
+-
+-- Produce wireframes for new flows using the `wireframe` skill.
+-- Run structured design critiques on UX-visible work using the `design-critique` skill.
+-- Reach for existing tokens and components first. Propose system-level additions deliberately, with rationale.
+-- Hand implementation off to engineering with component names, tokens, and acceptance criteria — not freeform descriptions.
+-- Loop in QA for browser verification of visual quality at real viewports (default 1440x900 desktop, 390x844 mobile).
+-
+-## Visual-truth gate
+-
+-Any verdict on a UI-visible ticket requires you to have rendered the surface at a real viewport in this run. Code-diff inspection is PR review, not UX review. Before posting approval or changes-requested:
+-
+-1. Open the surface at the target viewports and name them in your comment, or
+-2. Require the implementer to post screenshots or a runnable preview URL before re-review, or
+-3. Scope your verdict explicitly to the parts you visually verified and block the rest on a named sibling issue.
+-
+-"Pixel review deferred to QA" is not a UX pass.
+-
+-## Working rules
+-
+-- Start actionable work in the same heartbeat. Do not stop at a plan unless asked.
+-- Every task touch gets a comment with rationale, tradeoffs, and acceptance criteria.
+-- Use child issues for parallel or long delegated work.
+-
+-## Safety
+-
+-- Refuse dark patterns (roach motel, confirmshaming, sneak-into-basket, bait-and-switch).
+-- Do not paste customer data or real user content into specs. Use realistic but synthetic examples.
+-- Push back with a data-minimization alternative when a flow collects more than the task needs.
++You are the Principal Product Designer. You own product user experience, interaction design, accessibility, and design-system coherence.
+```
+
+
+
+Catalog cto: before → after
+
+```diff
+--- before/packages/teams-catalog/catalog/bundled/software-development/product-engineering/agents/cto/AGENTS.md
++++ after/packages/teams-catalog/catalog/bundled/software-development/product-engineering/agents/cto/AGENTS.md
+@@ -1,22 +1 @@
+-You are the CTO of the Product Engineering pod. You translate the company priorities into engineering tasks, review the resulting work, and keep delivery moving.
+-
+-When you wake up, follow the Paperclip skill — it contains the full heartbeat procedure.
+-
+-## Responsibilities
+-
+-- Break product priorities into well-scoped child issues with explicit acceptance criteria.
+-- Review PRs and uphold the `github-pr-workflow` standards. Reject smooshed commits, missing tests, or red CI.
+-- Hand browser- or evidence-bearing verification to QA with a clear test plan.
+-- Keep docs aligned with shipped changes (`doc-maintenance`) when the surface is user-facing.
+-- Escalate to your manager only on cross-team or strategic blockers — engineering blockers are yours to drive.
+-
+-## Working rules
+-
+-- Start actionable work in the same heartbeat. Do not stop at a plan unless asked.
+-- Use child issues for parallel or long delegated work — do not poll agents or sessions.
+-- Default to small bounded code reviews. Reject "kitchen sink" PRs back to the implementer.
+-
+-## Safety
+-
+-- Never commit secrets, credentials, or customer data. If you spot any in a diff, stop and escalate.
+-- Auth, crypto, secrets, or permissions changes require a security review before merge — route to a security reviewer or escalate to your manager if none exists.
++You are the CTO of the Product Engineering pod. You own engineering priorities, technical coordination, implementation quality, and verification for the team.
+```
+
+
+
+Catalog qa: before → after
+
+```diff
+--- before/packages/teams-catalog/catalog/bundled/software-development/product-engineering/agents/qa/AGENTS.md
++++ after/packages/teams-catalog/catalog/bundled/software-development/product-engineering/agents/qa/AGENTS.md
+@@ -1,20 +1 @@
+-You are the QA Engineer for the Product Engineering pod. You reproduce bugs, validate fixes end-to-end, capture evidence, and report concise actionable findings.
+-
+-When you wake up, follow the Paperclip skill — it contains the full heartbeat procedure.
+-
+-## Responsibilities
+-
+-- Verify fixes against the acceptance criteria using the `qa-acceptance` format.
+-- Capture screenshots or recorded steps for every UI-visible change.
+-- Distinguish blockers from normal setup (login, env vars) before flagging.
+-- Send failures back to the implementer with concrete repro steps; escalate to the CTO only when ownership is unclear.
+-
+-## Browser flow
+-
+-If the task requires authenticated browser steps, log in with the configured QA test account. Never treat an expected login wall as a blocker until you have attempted the documented login flow.
+-
+-## Safety
+-
+-- Never paste secrets, session tokens, or PII into comments or screenshots. Redact before attaching.
+-- Use only QA test credentials. Never attempt admin or real-user credentials.
+-- Do not exercise destructive flows on shared or production environments without an explicit go-ahead.
++You are the QA Engineer for the Product Engineering pod. You verify product behavior, reproduce defects, and report actionable findings with evidence.
+```
+
+
+
+Catalog senior-coder: before → after
+
+```diff
+--- before/packages/teams-catalog/catalog/bundled/software-development/product-engineering/agents/senior-coder/AGENTS.md
++++ after/packages/teams-catalog/catalog/bundled/software-development/product-engineering/agents/senior-coder/AGENTS.md
+@@ -1,24 +1 @@
+-You are a Senior Software Engineer in the Product Engineering pod. You implement code, debug issues, write tests, and ship PRs.
+-
+-When you wake up, follow the Paperclip skill — it contains the full heartbeat procedure.
+-
+-## Responsibilities
+-
+-- Implement assigned tasks following existing code conventions and architecture.
+-- Ship in logical commits — never smoosh unrelated changes together.
+-- Test your changes with the smallest verification that proves the work; do not default to the full test suite.
+-- Ask QA for browser verification when a change is user-facing.
+-- Update docs (`doc-maintenance`) when behavior or APIs change.
+-
+-## Working rules
+-
+-- Start actionable work in the same heartbeat. Do not stop at a plan unless asked.
+-- Commit work-in-progress in coherent steps so reviewers can follow the change.
+-- When blocked, explain the blocker and include your best guess at how to resolve it.
+-- If a PR has already shipped to review, push follow-up changes for review feedback unless instructed otherwise.
+-
+-## Safety
+-
+-- Never commit secrets, credentials, or customer data.
+-- Do not skip pre-commit hooks, signing, or CI without an explicit board approval.
+-- Auth, crypto, secrets, or permissions changes require a security review before merge.
++You are a Senior Software Engineer in the Product Engineering pod. You own software implementation and maintenance for the company.
+```
+
+
+
+## Qualification
+
+The [independent three-request drafting simulation](2026-10-02-hiring-skill-drafting-evidence.json) produced short backend-engineer and release-coordinator role text, retained requested skills and disabled timers, used inherited authentication without literal credentials, and preserved requester-supplied security instructions exactly. It explicitly left schema confirmation and approval reconciliation pending. No API calls or hires occurred; this is drafting evidence, not live runtime qualification.
+
+Focused verification passes 99 server tests and eight shipped-catalog tests. The full build and repository typecheck pass. Credential-free E2E support checks pass 63 files / 842 tests, the E2E typecheck, two-cell hiring discovery, existing 50-cell everyday discovery, and the full 438-cell catalog. The full local `pnpm test:run` was started and stopped before replaying onto newer master, with its original output retained; it is not a completed full-suite pass. Complete checks on the submitted source head run in GitHub CI. The branch includes configuration and import checks for default CEO selection, explicit custom bundles, first-agent rendering, catalog role/reporting/skill metadata, generated catalog bytes, and prepared import sources. The hiring skill also receives a separate drafting simulation with synthetic discovery data. These are not live provider comparisons.
+
+The explicit-only `hiring-templates` suite starts from the source revision's real default CEO, requests the installed hiring skill and coder example, and checks one permanent coder hire, two independently scored saved JSON fixtures, and reuse of that same worker. Its local Codex and ACPX Claude cells expect five provider turns each. Successful source reads before the hire, served source hashes, saved instruction bundles, task ownership, account inheritance, and preservation of the first artifact form the evidence. Long historical templates remain admissible; absent or unrecognized read receipts make coverage uncomparable. These two cells have not yet run live.
+
+Behavioral qualification of the removed CEO delegation/memory policy and QA/UX/security procedures is still outstanding. Existing live `hire-delegate-reuse` starts from a custom CEO studio prompt, so it does not directly qualify the shipped default CEO. The wizard-backed `first-task` suite records the actual first-agent persona and skill snapshots; it covers that selection path but does not by itself qualify hiring from the chief of staff. Preserve that distinction when interpreting existing results. No improved or equivalent outcomes are claimed from smaller prompts or configuration tests.
diff --git a/doc/plans/2026-10-02-legacy-document-skill-repair.json b/doc/plans/2026-10-02-legacy-document-skill-repair.json
new file mode 100644
index 00000000000..b215bc08b82
--- /dev/null
+++ b/doc/plans/2026-10-02-legacy-document-skill-repair.json
@@ -0,0 +1,1187 @@
+{
+ "schema": "paperclip.legacy-document-skill-repair.safe-comparison/v1",
+ "asOf": "2026-10-02T21:22:00Z",
+ "partial": false,
+ "expectedCellsPerVariant": 4,
+ "expectedProviderTurnsPerVariant": 4,
+ "candidateSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "baselineSha": "bc83fe030234439ac51279502a28803958963e2e",
+ "originalMachinePairedDelta": {
+ "newFailures": 0,
+ "newPasses": 1,
+ "unchangedPasses": 1,
+ "unchangedFailures": 2,
+ "pending": 0
+ },
+ "observedBehavioralDeteriorations": [
+ "OpenCode explicit case: candidate lacks a clickable link, while baseline provided a clickable API document URL. Both fail original UI-only oracle; equal machine verdicts hide this presentation deterioration."
+ ],
+ "baseline": [
+ {
+ "executionId": "stock-harness.legacy-claude.local.assigned-skill-explicit-invocation",
+ "profileId": "legacy-claude",
+ "caseId": "assigned-skill-explicit-invocation",
+ "status": "failed",
+ "model": "claude-sonnet-4-6",
+ "durationMs": 34592,
+ "cleanup": "passed",
+ "billing": {
+ "llm": {
+ "runCount": 1,
+ "runsWithTokenUsage": 1,
+ "runsWithReportedCost": 1,
+ "inputTokens": 28439,
+ "outputTokens": 1137,
+ "cachedInputTokens": 143829,
+ "totalTokens": 173405,
+ "reportedCostUsd": 0.16683944999999997,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 23032,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.16683944999999997,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.16683944999999997,
+ "complete": true
+ },
+ "sourceSha": "bc83fe030234439ac51279502a28803958963e2e",
+ "providerDurationMs": 23032,
+ "resultSha256": "67bcbe152852280b58fec97754601c57c416c2cb7965de55557240b8448dca63",
+ "contextEvidenceSha256": "9bc59db9678a3f5cfc207d1aeeec1f868f94429a7a10d8d214621f286532a1b7",
+ "failedBehaviorChecks": [
+ "single-durable-output"
+ ],
+ "publicDocumentCount": 0,
+ "savedRevisionEvidence": false,
+ "runPurposes": [
+ "assignment"
+ ],
+ "prerequisites": {
+ "passed": true,
+ "sourceSha": "bc83fe030234439ac51279502a28803958963e2e",
+ "sourceFingerprint": "27fbbc1792dca136c9c72dd492ff16c18bce0638ce4979985d798cde85175201",
+ "providerCallsBeforeAdmission": 0,
+ "executedChecks": 571
+ }
+ },
+ {
+ "executionId": "stock-harness.legacy-claude.local.assigned-skill-paperclip-document",
+ "profileId": "legacy-claude",
+ "caseId": "assigned-skill-paperclip-document",
+ "status": "passed",
+ "model": "claude-sonnet-4-6",
+ "durationMs": 50778,
+ "cleanup": "passed",
+ "billing": {
+ "llm": {
+ "runCount": 1,
+ "runsWithTokenUsage": 1,
+ "runsWithReportedCost": 1,
+ "inputTokens": 27675,
+ "outputTokens": 2062,
+ "cachedInputTokens": 216852,
+ "totalTokens": 246589,
+ "reportedCostUsd": 0.19975709999999997,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 34999,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.19975709999999997,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.19975709999999997,
+ "complete": true
+ },
+ "sourceSha": "bc83fe030234439ac51279502a28803958963e2e",
+ "providerDurationMs": 34999,
+ "resultSha256": "bca45a760fc5ec30ae8f154d9ec52ab4073b3ce2375256b8718f91200cb79d4e",
+ "contextEvidenceSha256": "473f3b417e71ee823ae9aad2596c7f1379b3fd5cf8d8fd540c30a4f3a2e10e21",
+ "failedBehaviorChecks": [],
+ "publicDocumentCount": 1,
+ "savedRevisionEvidence": true,
+ "runPurposes": [
+ "assignment"
+ ],
+ "prerequisites": {
+ "passed": true,
+ "sourceSha": "bc83fe030234439ac51279502a28803958963e2e",
+ "sourceFingerprint": "27fbbc1792dca136c9c72dd492ff16c18bce0638ce4979985d798cde85175201",
+ "providerCallsBeforeAdmission": 0,
+ "executedChecks": 571
+ }
+ },
+ {
+ "executionId": "stock-harness.legacy-opencode.local.assigned-skill-explicit-invocation",
+ "profileId": "legacy-opencode",
+ "caseId": "assigned-skill-explicit-invocation",
+ "status": "failed",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "durationMs": 47625,
+ "cleanup": "passed",
+ "billing": {
+ "llm": {
+ "runCount": 1,
+ "runsWithTokenUsage": 1,
+ "runsWithReportedCost": 1,
+ "inputTokens": 24068,
+ "outputTokens": 1960,
+ "cachedInputTokens": 149248,
+ "totalTokens": 175276,
+ "reportedCostUsd": 0.0033927116000000003,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 36770,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.0033927116000000003,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.0033927116000000003,
+ "complete": true
+ },
+ "sourceSha": "bc83fe030234439ac51279502a28803958963e2e",
+ "providerDurationMs": 36770,
+ "resultSha256": "a322e292fd7688c714cc8e57e7f64ca70c19f0784dc242b3e809a6e4b0be224e",
+ "contextEvidenceSha256": "3e295ec42b9c7208a7e4b17bf8329d9e1f01ba984c4a586539d7a703ffd59bf6",
+ "failedBehaviorChecks": [
+ "single-durable-output"
+ ],
+ "publicDocumentCount": 0,
+ "savedRevisionEvidence": false,
+ "runPurposes": [
+ "assignment"
+ ],
+ "prerequisites": {
+ "passed": true,
+ "sourceSha": "bc83fe030234439ac51279502a28803958963e2e",
+ "sourceFingerprint": "27fbbc1792dca136c9c72dd492ff16c18bce0638ce4979985d798cde85175201",
+ "providerCallsBeforeAdmission": 0,
+ "executedChecks": 571
+ }
+ },
+ {
+ "executionId": "stock-harness.legacy-opencode.local.assigned-skill-paperclip-document",
+ "profileId": "legacy-opencode",
+ "caseId": "assigned-skill-paperclip-document",
+ "status": "failed",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "durationMs": 217620,
+ "cleanup": "passed",
+ "billing": {
+ "llm": {
+ "runCount": 1,
+ "runsWithTokenUsage": 1,
+ "runsWithReportedCost": 1,
+ "inputTokens": 78795,
+ "outputTokens": 4331,
+ "cachedInputTokens": 846848,
+ "totalTokens": 929974,
+ "reportedCostUsd": 0.0102644593,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 206191,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.0102644593,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.0102644593,
+ "complete": true
+ },
+ "sourceSha": "bc83fe030234439ac51279502a28803958963e2e",
+ "providerDurationMs": 206191,
+ "resultSha256": "60dfb068ea80d0155d93fdace77a29fd19d64bdb0740e6e6b63f7e83ccfb5ded",
+ "contextEvidenceSha256": "23eed2766b5e8db9cea0ba5c76da235cf2d4222fa5718420cc60d6e13c86fa06",
+ "failedBehaviorChecks": [
+ "saved-document-link"
+ ],
+ "publicDocumentCount": 1,
+ "savedRevisionEvidence": true,
+ "runPurposes": [
+ "assignment"
+ ],
+ "prerequisites": {
+ "passed": true,
+ "sourceSha": "bc83fe030234439ac51279502a28803958963e2e",
+ "sourceFingerprint": "27fbbc1792dca136c9c72dd492ff16c18bce0638ce4979985d798cde85175201",
+ "providerCallsBeforeAdmission": 0,
+ "executedChecks": 571
+ },
+ "observedHandoff": "clickable API document URL; rejected by UI-only link oracle"
+ }
+ ],
+ "candidate": [
+ {
+ "executionId": "stock-harness.legacy-claude.local.assigned-skill-explicit-invocation",
+ "profileId": "legacy-claude",
+ "caseId": "assigned-skill-explicit-invocation",
+ "status": "passed",
+ "model": "claude-sonnet-4-6",
+ "durationMs": 46702,
+ "cleanup": "passed",
+ "billing": {
+ "llm": {
+ "runCount": 1,
+ "runsWithTokenUsage": 1,
+ "runsWithReportedCost": 1,
+ "inputTokens": 40330,
+ "outputTokens": 1336,
+ "cachedInputTokens": 185090,
+ "totalTokens": 226756,
+ "reportedCostUsd": 0.22679475,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 27702,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.22679475,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.22679475,
+ "complete": true
+ },
+ "sourceSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "providerDurationMs": 27702,
+ "resultSha256": "2f66f62dc2f16756400a0f5b0b0d55e5c9f5f7cb2590d84ba05f3d4ee6b4ad66",
+ "contextEvidenceSha256": "c5619df489213873db64d35424b08f9852b0099bab07e92d3a71f993008de389",
+ "failedBehaviorChecks": [],
+ "publicDocumentCount": 1,
+ "savedRevisionEvidence": true,
+ "runPurposes": [
+ "assignment"
+ ],
+ "prerequisites": {
+ "passed": true,
+ "sourceSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "sourceFingerprint": "441999ae2618f1f1e9f430c099bbef63d2948495599f0d8b342d8e5f027a7f4c",
+ "providerCallsBeforeAdmission": 0,
+ "executedChecks": 571
+ }
+ },
+ {
+ "executionId": "stock-harness.legacy-claude.local.assigned-skill-paperclip-document",
+ "profileId": "legacy-claude",
+ "caseId": "assigned-skill-paperclip-document",
+ "status": "passed",
+ "model": "claude-sonnet-4-6",
+ "durationMs": 56928,
+ "cleanup": "passed",
+ "billing": {
+ "llm": {
+ "runCount": 1,
+ "runsWithTokenUsage": 1,
+ "runsWithReportedCost": 1,
+ "inputTokens": 42017,
+ "outputTokens": 2468,
+ "cachedInputTokens": 205226,
+ "totalTokens": 249711,
+ "reportedCostUsd": 0.25614254999999997,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 40513,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.25614254999999997,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.25614254999999997,
+ "complete": true
+ },
+ "sourceSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "providerDurationMs": 40513,
+ "resultSha256": "8a0ef693477a03925d8166d1872b5db4f5547ae48eb9df934beabcce9eccf147",
+ "contextEvidenceSha256": "f7aba5c9653567a0c3ee252d01fbcee20c81c432b4402d76c7e00221b6917f2e",
+ "failedBehaviorChecks": [],
+ "publicDocumentCount": 1,
+ "savedRevisionEvidence": true,
+ "runPurposes": [
+ "assignment"
+ ],
+ "prerequisites": {
+ "passed": true,
+ "sourceSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "sourceFingerprint": "441999ae2618f1f1e9f430c099bbef63d2948495599f0d8b342d8e5f027a7f4c",
+ "providerCallsBeforeAdmission": 0,
+ "executedChecks": 571
+ }
+ },
+ {
+ "executionId": "stock-harness.legacy-opencode.local.assigned-skill-explicit-invocation",
+ "profileId": "legacy-opencode",
+ "caseId": "assigned-skill-explicit-invocation",
+ "status": "failed",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "durationMs": 79578,
+ "cleanup": "passed",
+ "billing": {
+ "llm": {
+ "runCount": 2,
+ "runsWithTokenUsage": 2,
+ "runsWithReportedCost": 2,
+ "inputTokens": 54946,
+ "outputTokens": 2264,
+ "cachedInputTokens": 169472,
+ "totalTokens": 226682,
+ "reportedCostUsd": 0.0047148437000000005,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 68032,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.0047148437000000005,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.0047148437000000005,
+ "complete": true
+ },
+ "sourceSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "providerDurationMs": 68032,
+ "resultSha256": "f807c235250d8675d29aa34fc97d0e89be2c7ea885edfc2f3845627037552c0b",
+ "contextEvidenceSha256": "0dc98ad8ef1f22d69c3a3d7344082a6d5a0effc8d9c73c5d4c1267c92800b57a",
+ "failedBehaviorChecks": [
+ "single-durable-output"
+ ],
+ "publicDocumentCount": 0,
+ "savedRevisionEvidence": false,
+ "runPurposes": [
+ "assignment",
+ "issue_disposition_repair"
+ ],
+ "prerequisites": {
+ "passed": true,
+ "sourceSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "sourceFingerprint": "441999ae2618f1f1e9f430c099bbef63d2948495599f0d8b342d8e5f027a7f4c",
+ "providerCallsBeforeAdmission": 0,
+ "executedChecks": 571
+ }
+ },
+ {
+ "executionId": "stock-harness.legacy-opencode.local.assigned-skill-paperclip-document",
+ "profileId": "legacy-opencode",
+ "caseId": "assigned-skill-paperclip-document",
+ "status": "failed",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "durationMs": 59941,
+ "cleanup": "passed",
+ "billing": {
+ "llm": {
+ "runCount": 1,
+ "runsWithTokenUsage": 1,
+ "runsWithReportedCost": 1,
+ "inputTokens": 33724,
+ "outputTokens": 2597,
+ "cachedInputTokens": 147200,
+ "totalTokens": 183521,
+ "reportedCostUsd": 0.0042468724,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 46300,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.0042468724,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.0042468724,
+ "complete": true
+ },
+ "sourceSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "providerDurationMs": 46300,
+ "resultSha256": "cff6e5bf4b6b646ae6f9b5a6a2934c444c37a14f50b591f5226ccac0e4de1dda",
+ "contextEvidenceSha256": "6c943d78291c1e493cb29ca3a52dcb96d186fd18ed51e4cfb17055649162f6f2",
+ "failedBehaviorChecks": [
+ "saved-document-link"
+ ],
+ "publicDocumentCount": 1,
+ "savedRevisionEvidence": true,
+ "runPurposes": [
+ "assignment"
+ ],
+ "prerequisites": {
+ "passed": true,
+ "sourceSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "sourceFingerprint": "441999ae2618f1f1e9f430c099bbef63d2948495599f0d8b342d8e5f027a7f4c",
+ "providerCallsBeforeAdmission": 0,
+ "executedChecks": 571
+ },
+ "observedHandoff": "code-formatted prefix-less UI document path; no clickable anchor"
+ }
+ ],
+ "matchedProfileProof": {
+ "schema": "paperclip.legacy-document-skill-repair.fixture-match-proof/v1",
+ "cells": [
+ {
+ "executionId": "stock-harness.legacy-claude.local.assigned-skill-explicit-invocation",
+ "fixtureConfigSha256": "6c21be9bb3fcec6274372fc586d88e42d82bc0d438e26a69ef614f8e6fcb8519",
+ "model": "claude-sonnet-4-6"
+ },
+ {
+ "executionId": "stock-harness.legacy-claude.local.assigned-skill-paperclip-document",
+ "fixtureConfigSha256": "ea1cd67b0f68ef3830c011768d1a1133b5828c602d5ae3e021889dcd72708344",
+ "model": "claude-sonnet-4-6"
+ },
+ {
+ "executionId": "stock-harness.legacy-opencode.local.assigned-skill-explicit-invocation",
+ "fixtureConfigSha256": "dd673f469cab583d26bc2e4b484f18b27884ec14a59542177026389181e2da2c",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731"
+ },
+ {
+ "executionId": "stock-harness.legacy-opencode.local.assigned-skill-paperclip-document",
+ "fixtureConfigSha256": "b5173358d664ab6b3daa67d8758f18d59ec99cb9c485c02ccf953a9f8375e01e",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731"
+ }
+ ]
+ },
+ "identicalSourceCount": 203,
+ "skillSources": [
+ {
+ "path": "skills/paperclip/SKILL.md",
+ "candidate": {
+ "present": true,
+ "sha256": "65e379cab319bfef5911c0f6c9423cb262c9b8f1fef3fd08d45c1e4f32f8971a"
+ },
+ "baseline": {
+ "present": true,
+ "sha256": "77aafc0c7b16a82254af642f0ebff723dcef7d7fbb6d3354efc0c11032e0344d"
+ }
+ },
+ {
+ "path": "skills/paperclip/references/issue-documents.md",
+ "candidate": {
+ "present": true,
+ "sha256": "353845a406b1b4948487c348c86eb7b8c89a55ae67afe203100eee10aee46336"
+ },
+ "baseline": {
+ "present": false,
+ "sha256": null
+ }
+ }
+ ],
+ "toolDeliveryAudit": {
+ "schema": "paperclip.legacy-document-repair.tool-audit/v1",
+ "rows": [
+ {
+ "variant": "candidate",
+ "case": "assigned-skill-paperclip-document",
+ "sourceSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "runOrdinal": 1,
+ "runPurpose": "assignment",
+ "startedAt": "2026-10-02T20:37:40.215Z",
+ "contextEvidenceSha256": "6c943d78291c1e493cb29ca3a52dcb96d186fd18ed51e4cfb17055649162f6f2",
+ "toolCalls": [
+ {
+ "tool": "skill",
+ "skill": "context-integrity-output-7b55f897b3b41",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "skill",
+ "skill": "paperclip",
+ "operationalSkillLoad": true,
+ "earlyRecipeVisible": true,
+ "newReferencePointerVisible": true,
+ "newReferenceRead": false,
+ "outputTruncated": true,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "read",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": true,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": true,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": true
+ }
+ ]
+ },
+ {
+ "variant": "candidate",
+ "case": "assigned-skill-explicit-invocation",
+ "sourceSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "runOrdinal": 1,
+ "runPurpose": "assignment",
+ "startedAt": "2026-10-02T20:37:37.587Z",
+ "contextEvidenceSha256": "0dc98ad8ef1f22d69c3a3d7344082a6d5a0effc8d9c73c5d4c1267c92800b57a",
+ "toolCalls": [
+ {
+ "tool": "skill",
+ "skill": "context-integrity-output-60e03959432b1",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "write",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": true,
+ "documentApiCall": false,
+ "statusApiCall": false
+ }
+ ]
+ },
+ {
+ "variant": "candidate",
+ "case": "assigned-skill-explicit-invocation",
+ "sourceSha": "abd0b628ca642c09a54a4edc56a5227402f6686e",
+ "runOrdinal": 2,
+ "runPurpose": "issue_disposition_repair",
+ "startedAt": "2026-10-02T20:37:52.592Z",
+ "contextEvidenceSha256": "0dc98ad8ef1f22d69c3a3d7344082a6d5a0effc8d9c73c5d4c1267c92800b57a",
+ "toolCalls": [
+ {
+ "tool": "skill",
+ "skill": "paperclip",
+ "operationalSkillLoad": true,
+ "earlyRecipeVisible": true,
+ "newReferencePointerVisible": true,
+ "newReferenceRead": false,
+ "outputTruncated": true,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": true
+ }
+ ]
+ },
+ {
+ "variant": "baseline",
+ "case": "assigned-skill-explicit-invocation",
+ "sourceSha": "bc83fe030234439ac51279502a28803958963e2e",
+ "runOrdinal": 1,
+ "runPurpose": "assignment",
+ "startedAt": "2026-10-02T20:37:57.110Z",
+ "contextEvidenceSha256": "3e295ec42b9c7208a7e4b17bf8329d9e1f01ba984c4a586539d7a703ffd59bf6",
+ "toolCalls": [
+ {
+ "tool": "skill",
+ "skill": "context-integrity-output-816e6b4cdd6a1",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "write",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": true,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "skill",
+ "skill": "paperclip",
+ "operationalSkillLoad": true,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": true,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": true
+ },
+ {
+ "tool": "write",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": true
+ }
+ ]
+ },
+ {
+ "variant": "baseline",
+ "case": "assigned-skill-paperclip-document",
+ "sourceSha": "bc83fe030234439ac51279502a28803958963e2e",
+ "runOrdinal": 1,
+ "runPurpose": "assignment",
+ "startedAt": "2026-10-02T20:38:02.031Z",
+ "contextEvidenceSha256": "23eed2766b5e8db9cea0ba5c76da235cf2d4222fa5718420cc60d6e13c86fa06",
+ "toolCalls": [
+ {
+ "tool": "skill",
+ "skill": "context-integrity-output-06ce9804653e1",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "skill",
+ "skill": "paperclip",
+ "operationalSkillLoad": true,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": true,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "read",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": true,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "read",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": true,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "read",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": true,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": true,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false
+ },
+ {
+ "tool": "bash",
+ "skill": null,
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": true,
+ "statusApiCall": true
+ }
+ ]
+ }
+ ]
+ },
+ "limitations": [
+ "Tiny manual/shared prompts and merged native Codex base fix remain fixed; only the two operational skill sources differ.",
+ "Original task-document wording is storage-ambiguous; explicit case requests a usable link but its oracle requires the canonical UI route, so the baseline API-link failure has an oracle/request ambiguity.",
+ "Provider-free source review confirms a board-readable GET document endpoint and an unprefixed UI redirect preserving the hash; actual authenticated browser navigation in the cleaned-up measured instance was not replayed.",
+ "One paired trial cannot establish broad performance, causality, timing or spending improvement.",
+ "Candidate OpenCode original has an additional automatic disposition-repair run; all nine actual runs and costs are retained.",
+ "Local runtime is unmetered; reported LLM cost is not a statement of actual external billing.",
+ "Subsequent generated capability metadata and pre-provider drift checks are derived maintenance after these measured frozen revisions, not a new provider qualification."
+ ]
+}
diff --git a/doc/plans/2026-10-02-legacy-document-skill-repair.md b/doc/plans/2026-10-02-legacy-document-skill-repair.md
new file mode 100644
index 00000000000..728e0b7c489
--- /dev/null
+++ b/doc/plans/2026-10-02-legacy-document-skill-repair.md
@@ -0,0 +1,51 @@
+# Legacy document skill repair qualification — 2026-10-02
+
+**TL;DR: one newly passing case (Claude original document delivery), one unchanged pass (Claude explicit storage), two unchanged OpenCode failures, and no pending pairs or new overall machine failures. OpenCode's explicit-case clickable handoff nevertheless got worse:** baseline supplied a clickable API document URL, while candidate supplied only a code-formatted path. Both fail the original UI-only link oracle, whose intended route was narrower than the request's "usable link" wording. This result does not establish general non-regression.
+
+This focused repair keeps the eight-word manual, reduced shared prompts and merged Codex base fix #14920 fixed. It varies only the early operational Paperclip skill recipe and the presence of the new `issue-documents.md` reference. The earlier combined prompt-removal comparison retains its two new classic Claude/OpenCode storage failures; this trial repairs Claude's original case but leaves OpenCode's original regression unresolved.
+
+| Classic profile | Case | Pre-fix skill → repaired skill | Retained evidence |
+| --- | --- | --- | --- |
+| Claude | Original assigned skill | Fail → Pass | Baseline lacks a durable task document; candidate saves one containing the skill marker. |
+| Claude | Explicit Paperclip document | Pass → Pass | Both save the document/revision and provide a canonical UI link. |
+| OpenCode | Original assigned skill | Fail → Fail | Both write a workspace file rather than a public task document. Candidate requires automatic disposition recovery. |
+| OpenCode | Explicit Paperclip document | Fail → Fail | Both save the document/revision. Baseline provides a clickable API URL; candidate gives a code-formatted UI path without an anchor. Original UI-link checks fail in both. |
+
+Original machine verdicts and evidence hashes are retained in the [safe evidence projection](2026-10-02-legacy-document-skill-repair.json). No model was rerun to improve these results.
+
+## Frozen sources and public reports
+
+- [Repaired skill campaign](https://github.com/paperclipai/paperclip/actions/runs/37060885547), source `abd0b628ca642c09a54a4edc56a5227402f6686e`, branch `codex/legacy-document-repaired-skill`. [Published candidate report](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-37060885547-1/index.html).
+- [Pre-fix skill campaign](https://github.com/paperclipai/paperclip/actions/runs/37060888047), source `bc83fe030234439ac51279502a28803958963e2e`, branch `codex/legacy-document-pre-fix-skill`. [Published baseline report](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-37060888047-1/index.html).
+- Both trusted default-branch workflows ran concurrently on separate concurrency targets. All eight cells pass their exact-source prerequisite gate before providers; all eight clean up successfully. Failed campaigns are published successfully and remain failed.
+- The four model/effort/auth/tool/permission/environment configurations match. Models are `claude-sonnet-4-6` and `openrouter/deepseek/deepseek-v4-flash-0731`. The comparison records 203 byte-identical fixture/behavior sources and explicit present/absent skill-source fingerprints. The new reference is absent from the baseline, rather than silently introduced into it.
+- Local admission preparation passed 909 E2E support tests, E2E typecheck and four-cell discovery; the candidate exact-source gate passed 571 checks, including one Rust check. Initial sandbox and obsolete catalog-count attempts remain retained. The original request and behavioral oracle were not weakened.
+
+## What OpenCode actually received
+
+The repaired original assignment invokes only its assigned Context integrity output skill, then writes `task-document.md`. There is no operational Paperclip skill load or issue-document reference read before that local write. A separate automatic `issue_disposition_repair` run then loads Paperclip. Its returned content contains the new early saved-document paragraph and reference pointer even though the overall skill result is marked truncated; it never reads the reference or saves a document, and only finalizes the issue's status.
+
+This is evidence of operational-skill selection after work, not evidence that the assignment saw and ignored the new recipe. The pre-fix original run also writes locally before loading the old Paperclip skill. Whether the adapter should activate operational Paperclip guidance before work is a production-delivery question for review; expanding a skill the first assignment never opened would not address the observed sequence.
+
+The explicit candidate loads the assigned skill, then Paperclip, receives the new early paragraph, reads `issue-documents.md`, and calls the document API successfully. Its saved document has a persisted revision. The remaining defect is its comment's non-clickable path. Baseline supplied an actual Markdown link to the issue-document API GET endpoint. Read-only source review confirms that this endpoint returns the document in board context, and the unprefixed UI issue route redirects through the selected company's prefix while preserving the document hash. Actual authenticated browser navigation against these cleaned-up measured instances was not replayed, so neither URL is classified as a proven broken route. Candidate's missing clickable anchor is directly observable.
+
+A future explicit fixture should name a clickable Paperclip UI document link if that is the intended contract. This clarification would not retroactively pass or fail either original result. A short canonical Markdown UI-link example can be considered separately from operational-skill delivery. No further production instruction change or paid rerun was made for this diagnosis.
+
+## Runs, timing and cost
+
+Eight provider turns were expected; nine actual runs are retained. Candidate OpenCode's original assignment succeeds but leaves the task `in_progress`, triggering automatic disposition recovery. The recovery succeeds and marks it done, without creating the missing document. Both runs, their time and cost are counted rather than selecting a better attempt.
+
+| Profile | Case | Baseline provider seconds | Candidate provider seconds | Baseline reported USD | Candidate reported USD |
+| --- | --- | ---: | ---: | ---: | ---: |
+| legacy-claude | Original | 23.032 | 27.702 | 0.1668394500 | 0.2267947500 |
+| legacy-claude | Explicit storage | 34.999 | 40.513 | 0.1997571000 | 0.2561425500 |
+| legacy-opencode | Original | 36.770 | 68.032 | 0.0033927116 | 0.0047148437 |
+| legacy-opencode | Explicit storage | 206.191 | 46.300 | 0.0102644593 | 0.0042468724 |
+
+Reported LLM totals are $0.3802537209 baseline and $0.4918990161 candidate. All four baseline and five candidate ledger rows contain token usage and reported cost. Local runtime is unmetered and actual external billing is not established. Single trials, the additional recovery and baseline OpenCode's long explicit-case execution prevent a general timing or spending conclusion.
+
+## PR maintenance and remaining qualifications
+
+The skill insertion shifted generated capability heading anchors. General PR CI detected stale `capabilities.yaml`; the paid workflow's narrower build and every exact-source admission still passed before provider access. Both canonical capability metadata inventories are regenerated after measurement, include the new reference where declared, and adds a credential-free admission test that rejects stale/missing manifests. These maintenance changes do not modify the frozen measured branches or the skill bytes used in this comparison.
+
+Draft [PR #14948](https://github.com/paperclipai/paperclip/pull/14948) keeps this repair and the tiny manual; draft [PR #14961](https://github.com/paperclipai/paperclip/pull/14961) measures native completion documentation separately. OpenCode original delivery remains unresolved, and existing Claude chat-memory and legacy ACP credential/receipt findings remain separate. No broad matrix rerun was launched, and merging remains user-controlled.
diff --git a/doc/plans/2026-10-02-openai-dot-runner-adapter.md b/doc/plans/2026-10-02-openai-dot-runner-adapter.md
index 50122ea50ff..bc8e8c365e0 100644
--- a/doc/plans/2026-10-02-openai-dot-runner-adapter.md
+++ b/doc/plans/2026-10-02-openai-dot-runner-adapter.md
@@ -55,9 +55,37 @@ adapter. Keep `paperclip_runner` in the server/UI/CLI registries. The older
cross-surface consistency; its process-spawning package recipe does not define
this provider's execution architecture.
-Assume the public MCP foundation from the referenced gateway work is merged.
-The prototype worktree includes that foundation at `a88448f77`. This assumption
-does not imply that the companion Cloud broker is deployed or qualified.
+The branch now integrates the merged public MCP foundation (`e34abee67`,
+#14846) and scoped browser/device assistant invitations (`22a3ea341`, #14933)
+from master. The preliminary foundation at `a88448f77` is superseded.
+This does not imply that the companion Cloud broker is deployed or qualified.
+
+### Gateway reconciliation — 2026-10-06
+
+The canonical worktree remains `dot-events-prototype/paperclip` on
+`codex/dot-events-prototype`. Master was merged through `c365a16e3`.
+The shared consent implementation now creates distinct agent-purpose grants
+for both browser and device flows, validates request resource and organization
+ownership, and rejects viewer approval. Dot has a separate issuer and scope.
+Verified client metadata, durable verification quotas, event secret rotation,
+subscription refresh races and warm-standby gates use the merged implementation.
+Personal and Dot event workers consume their own subscription resources.
+
+The generated Dot-only migration is now `0311_known_inertia.sql`, after the
+published master migrations. Its table, column, index and constraint additions
+are safe to reapply. Both consent UIs retain the merged organization branding
+and request layout while explaining agent access. Runner provider selection
+uses the current shared harness selector.
+
+Targeted gateway, Dot, onboarding and UI verification passed 125 tests before
+the added migration replay check. Full workspace typecheck/build and token
+gates passed. The full repository suite and Runner recovery checks are running;
+their final results are recorded in the adapter runbook.
+
+The other gateway chat's subsequent assistant-tool expansion is still separate
+work and is not part of this integration. Real-account qualification of the
+dedicated Runner endpoint remains outstanding. Assigned skill files and
+third-party MCP bindings remain unsupported.
### Evidence and limits
diff --git a/doc/plans/2026-10-02-opencode-skill-routing-link-qualification.json b/doc/plans/2026-10-02-opencode-skill-routing-link-qualification.json
new file mode 100644
index 00000000000..f909e31edb8
--- /dev/null
+++ b/doc/plans/2026-10-02-opencode-skill-routing-link-qualification.json
@@ -0,0 +1,1418 @@
+{
+ "schema": "paperclip.opencode-skill-routing-link-comparison/v1",
+ "status": "complete",
+ "candidateSha": "fe9dc1e3c518825242ed889ab9c8352986f8c2ed",
+ "baselineSha": "0d7ecfa96d72fba79b7f0a25052b42c0686c0488",
+ "pairedSummary": {
+ "newFailures": 0,
+ "newPasses": 0,
+ "unchangedPasses": 2,
+ "unchangedFailures": 0,
+ "pendingPairs": 0,
+ "limitation": "Both original cases have deficient handoff links outside their machine oracle; candidate uses incorrect PAP prefix, baseline has bare unprefixed slug path."
+ },
+ "sourceProof": {
+ "identicalTrackedFiles": 8242,
+ "changedTrackedPaths": [
+ "skills/paperclip/SKILL.md",
+ "skills/paperclip/references/issue-documents.md",
+ "tests/runner-e2e/opencode-skill-routing-comparison.json"
+ ],
+ "onlyProductionDifferences": [
+ {
+ "path": "skills/paperclip/SKILL.md",
+ "candidateSha256": "6ca593effe18704f8014ac4e8155f7513c0701aa3c61d3cf0b96d3366c92f0e1",
+ "baselineSha256": "768522e081c1ec43dee4a5794539f7b597ee3708c634d05e388c874df283cc53"
+ },
+ {
+ "path": "skills/paperclip/references/issue-documents.md",
+ "candidateSha256": "a6141e8ba4510b683418197d58598d5a14db2641c49c869ae8aca4e2b05aca97",
+ "baselineSha256": "353845a406b1b4948487c348c86eb7b8c89a55ae67afe203100eee10aee46336"
+ }
+ ],
+ "baselineReceipt": {
+ "schema": "paperclip.opencode-skill-routing.baseline/v1",
+ "candidateSha": "fe9dc1e3c518825242ed889ab9c8352986f8c2ed",
+ "priorSkillSha": "b85668c4065d66e08026218a6bd48a3d22ddd4c9",
+ "expectedCellsPerVariant": 2,
+ "expectedProviderTurnsPerVariant": 2,
+ "heldConstant": [
+ "tiny manual/shared prompts",
+ "native Codex additive base fix",
+ "future explicit clickable UI-link fixture and calibrated grader",
+ "models/effort/auth/permissions/tools/budgets",
+ "all other tracked repository source bytes"
+ ],
+ "onlyChangedProductionSources": [
+ {
+ "path": "skills/paperclip/SKILL.md",
+ "candidateSha256": "6ca593effe18704f8014ac4e8155f7513c0701aa3c61d3cf0b96d3366c92f0e1",
+ "baselineSha256": "768522e081c1ec43dee4a5794539f7b597ee3708c634d05e388c874df283cc53"
+ },
+ {
+ "path": "skills/paperclip/references/issue-documents.md",
+ "candidateSha256": "a6141e8ba4510b683418197d58598d5a14db2641c49c869ae8aca4e2b05aca97",
+ "baselineSha256": "353845a406b1b4948487c348c86eb7b8c89a55ae67afe203100eee10aee46336"
+ }
+ ]
+ },
+ "fixtureConfigurations": {
+ "schema": "paperclip.opencode-skill-routing.fixture-match-proof/v1",
+ "cells": [
+ {
+ "executionId": "stock-harness.legacy-opencode.local.assigned-skill-explicit-invocation",
+ "fixtureConfigSha256": "dd673f469cab583d26bc2e4b484f18b27884ec14a59542177026389181e2da2c",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731"
+ },
+ {
+ "executionId": "stock-harness.legacy-opencode.local.assigned-skill-paperclip-document",
+ "fixtureConfigSha256": "4924cbbcb8768fdbff70d9f53c20835dba28626278da77fb5edcc09c1700fd5f",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731"
+ }
+ ]
+ }
+ },
+ "cells": [
+ {
+ "variant": "baseline",
+ "caseId": "assigned-skill-explicit-invocation",
+ "source": {
+ "sha": "0d7ecfa96d72fba79b7f0a25052b42c0686c0488",
+ "ref": "refs/heads/codex/opencode-pre-routing-skill",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37069552374"
+ },
+ "status": "passed",
+ "attempt": 1,
+ "suiteDefinitionHash": "18a8eb87f11ebaa4d5be89f878de669bc32eee6f58a47c3f19d15bb879519dd8",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "runtimeMode": "legacy",
+ "durationMs": 46285,
+ "providerDurationMs": 25870,
+ "runCount": 1,
+ "recoveryRuns": 0,
+ "cleanup": "passed",
+ "matcherResults": [
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.assigned-skill-present",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The task run must receive one pinned skill version through the public assignment state."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.skill-request-explicit",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The task request must explicitly name the assigned skill with a supported slash or dollar reference."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.skill-source-marker",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The assigned pinned skill source must contain the output marker."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.marker-not-in-request",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The output marker must originate from the assigned skill, not the task request or comments."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.single-durable-output",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Exactly one durable task document must contain the skill's marker."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.completed-task",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Final task status: done."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.successful-runs",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "All recorded context-integrity runs must succeed."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.budget-hard-stops",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Public company and agent records must both retain the 1,000-cent monthly hard stops."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.default-hire-bundle",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The public managed bundle must contain only the eight-word shipped identity, without an injected QA manual."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.provider-runs-present",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The lifecycle oracle must reach actual provider runs; missing runs cannot pass instruction delivery."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.invocation-evidence-complete",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Every legacy run must have a public adapter.invoke event with its actual nonempty prompt."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.generic-procedures-absent",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Neither startup nor continuation may reintroduce the removed generic manual."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.fresh-default-delivered",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "At least one fresh invocation must carry default identity and connection guidance."
+ }
+ ],
+ "billing": {
+ "llm": {
+ "runCount": 1,
+ "runsWithTokenUsage": 1,
+ "runsWithReportedCost": 1,
+ "inputTokens": 34011,
+ "outputTokens": 2533,
+ "cachedInputTokens": 192512,
+ "totalTokens": 229056,
+ "reportedCostUsd": 0.0058472545,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 25870,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.0058472545,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.0058472545,
+ "complete": true
+ },
+ "preflight": {
+ "sourceSha": "0d7ecfa96d72fba79b7f0a25052b42c0686c0488",
+ "sourceFingerprint": "0315602ac6788cf0d65561a73cc85d790768ef90c6815257077a2381f961b96e",
+ "passed": true,
+ "providerCalls": 0,
+ "assertions": 587
+ },
+ "delivery": {
+ "documentCount": 1,
+ "documentKey": "task-document",
+ "savedRevisionNumber": 1,
+ "savedRevisionPresent": true,
+ "markerPresent": true,
+ "markdownLinkTargets": [],
+ "expectedDocumentUiTarget": "/RUN/issues/RUN-1#document-task-document",
+ "hasExactDocumentUiLink": false,
+ "originalCaseRequiresLink": false,
+ "originalBaselineBarePath": true,
+ "originalCandidateWrongPrefix": false
+ },
+ "operationalSkillReadOrder": [
+ {
+ "tool": "skill",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 1,
+ "skill": "assigned-output"
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 2,
+ "skill": null
+ },
+ {
+ "tool": "write",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": true,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 3,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 4,
+ "skill": null
+ },
+ {
+ "tool": "skill",
+ "operationalSkillLoad": true,
+ "earlyRecipeVisible": true,
+ "newReferencePointerVisible": true,
+ "newReferenceRead": false,
+ "outputTruncated": true,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 5,
+ "skill": "paperclip"
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 6,
+ "skill": null
+ },
+ {
+ "tool": "read",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": true,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 7,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": true,
+ "statusApiCall": false,
+ "ordinal": 8,
+ "skill": null
+ },
+ {
+ "tool": "read",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 9,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 10,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": true,
+ "ordinal": 11,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 12,
+ "skill": null
+ }
+ ],
+ "evidenceHashes": {
+ "result": "a4953654cba1d6bd3911ad3cfb000d8bfb21041ef3e3ee409e2c19d14af30f1e",
+ "context": "c3fb84a16e6fe1dead74ffece90035bc99aa247ffa65b4665d5288acbe8a5515",
+ "preflight": "a0756b19a5c20c1bf600a9abeb1b62307c99f37ffc2ff02063709a870bbe2986",
+ "finalStateScreenshot": "49068a59e35b2fb0207bd81ca36d4db639d17c8639c0ce885ac5869fc83320e9"
+ },
+ "screenshotInspected": true
+ },
+ {
+ "variant": "baseline",
+ "caseId": "assigned-skill-paperclip-document",
+ "source": {
+ "sha": "0d7ecfa96d72fba79b7f0a25052b42c0686c0488",
+ "ref": "refs/heads/codex/opencode-pre-routing-skill",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37069552374"
+ },
+ "status": "passed",
+ "attempt": 1,
+ "suiteDefinitionHash": "18a8eb87f11ebaa4d5be89f878de669bc32eee6f58a47c3f19d15bb879519dd8",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "runtimeMode": "legacy",
+ "durationMs": 94804,
+ "providerDurationMs": 73984,
+ "runCount": 1,
+ "recoveryRuns": 0,
+ "cleanup": "passed",
+ "matcherResults": [
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.assigned-skill-present",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The task run must receive one pinned skill version through the public assignment state."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.skill-request-explicit",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The task request must explicitly name the assigned skill with a supported slash or dollar reference."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.skill-source-marker",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The assigned pinned skill source must contain the output marker."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.marker-not-in-request",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The output marker must originate from the assigned skill, not the task request or comments."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.single-durable-output",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Exactly one durable task document must contain the skill's marker."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.saved-document-revision",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The public saved document must have a persisted revision and the requested content."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.saved-document-link",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "An agent completion comment must link the exact saved document on this task; a local path or claimed URL does not suffice."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.completed-task",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Final task status: done."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.successful-runs",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "All recorded context-integrity runs must succeed."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.budget-hard-stops",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Public company and agent records must both retain the 1,000-cent monthly hard stops."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.default-hire-bundle",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The public managed bundle must contain only the eight-word shipped identity, without an injected QA manual."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.provider-runs-present",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The lifecycle oracle must reach actual provider runs; missing runs cannot pass instruction delivery."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.invocation-evidence-complete",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Every legacy run must have a public adapter.invoke event with its actual nonempty prompt."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.generic-procedures-absent",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Neither startup nor continuation may reintroduce the removed generic manual."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.fresh-default-delivered",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "At least one fresh invocation must carry default identity and connection guidance."
+ }
+ ],
+ "billing": {
+ "llm": {
+ "runCount": 1,
+ "runsWithTokenUsage": 1,
+ "runsWithReportedCost": 1,
+ "inputTokens": 62834,
+ "outputTokens": 2127,
+ "cachedInputTokens": 130304,
+ "totalTokens": 195265,
+ "reportedCostUsd": 0.004943647,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 73984,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.004943647,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.004943647,
+ "complete": true
+ },
+ "preflight": {
+ "sourceSha": "0d7ecfa96d72fba79b7f0a25052b42c0686c0488",
+ "sourceFingerprint": "0315602ac6788cf0d65561a73cc85d790768ef90c6815257077a2381f961b96e",
+ "passed": true,
+ "providerCalls": 0,
+ "assertions": 587
+ },
+ "delivery": {
+ "documentCount": 1,
+ "documentKey": "context-integrity-output",
+ "savedRevisionNumber": 1,
+ "savedRevisionPresent": true,
+ "markerPresent": true,
+ "markdownLinkTargets": [
+ "/RUN/issues/RUN-1#document-context-integrity-output"
+ ],
+ "expectedDocumentUiTarget": "/RUN/issues/RUN-1#document-context-integrity-output",
+ "hasExactDocumentUiLink": true,
+ "originalCaseRequiresLink": true,
+ "originalBaselineBarePath": false,
+ "originalCandidateWrongPrefix": false
+ },
+ "operationalSkillReadOrder": [
+ {
+ "tool": "skill",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 1,
+ "skill": "assigned-output"
+ },
+ {
+ "tool": "skill",
+ "operationalSkillLoad": true,
+ "earlyRecipeVisible": true,
+ "newReferencePointerVisible": true,
+ "newReferenceRead": false,
+ "outputTruncated": true,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 2,
+ "skill": "paperclip"
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 3,
+ "skill": null
+ },
+ {
+ "tool": "read",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": true,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 4,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 5,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 6,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": true,
+ "statusApiCall": false,
+ "ordinal": 7,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": true,
+ "ordinal": 8,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 9,
+ "skill": null
+ }
+ ],
+ "evidenceHashes": {
+ "result": "b09f82a96976fdcd5ddfb1655d783db5076a19fde0a5d751ff3df995cd5fac59",
+ "context": "2c630300b0f5737c74a9921d25ed67d2ab2612957f843d9709ebfd57fb84306f",
+ "preflight": "9e6e55c1ca71312f7bb53708bd2f9727e5395c9da8586b285d29e1fee4fe50fe",
+ "finalStateScreenshot": "128e6e0c7be8b8ca0e3e90601bce8c3d33df8c503636d09ffe514df03881173b"
+ },
+ "screenshotInspected": true
+ },
+ {
+ "variant": "candidate",
+ "caseId": "assigned-skill-explicit-invocation",
+ "source": {
+ "sha": "fe9dc1e3c518825242ed889ab9c8352986f8c2ed",
+ "ref": "refs/heads/codex/opencode-stock-routing-qualified",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37069547401"
+ },
+ "status": "passed",
+ "attempt": 1,
+ "suiteDefinitionHash": "62cfca8303c66bf5e29b0665c72b7bb717acf9f96d7a3ef768407afa5bc9870f",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "runtimeMode": "legacy",
+ "durationMs": 89455,
+ "providerDurationMs": 67897,
+ "runCount": 1,
+ "recoveryRuns": 0,
+ "cleanup": "passed",
+ "matcherResults": [
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.assigned-skill-present",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The task run must receive one pinned skill version through the public assignment state."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.skill-request-explicit",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The task request must explicitly name the assigned skill with a supported slash or dollar reference."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.skill-source-marker",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The assigned pinned skill source must contain the output marker."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.marker-not-in-request",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The output marker must originate from the assigned skill, not the task request or comments."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.single-durable-output",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Exactly one durable task document must contain the skill's marker."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.completed-task",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Final task status: done."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.successful-runs",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "All recorded context-integrity runs must succeed."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.budget-hard-stops",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Public company and agent records must both retain the 1,000-cent monthly hard stops."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.default-hire-bundle",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The public managed bundle must contain only the eight-word shipped identity, without an injected QA manual."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.provider-runs-present",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The lifecycle oracle must reach actual provider runs; missing runs cannot pass instruction delivery."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.invocation-evidence-complete",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Every legacy run must have a public adapter.invoke event with its actual nonempty prompt."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.generic-procedures-absent",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Neither startup nor continuation may reintroduce the removed generic manual."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.fresh-default-delivered",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "At least one fresh invocation must carry default identity and connection guidance."
+ }
+ ],
+ "billing": {
+ "llm": {
+ "runCount": 1,
+ "runsWithTokenUsage": 1,
+ "runsWithReportedCost": 1,
+ "inputTokens": 71068,
+ "outputTokens": 1716,
+ "cachedInputTokens": 97792,
+ "totalTokens": 170576,
+ "reportedCostUsd": 0.00413837,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 67897,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.00413837,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.00413837,
+ "complete": true
+ },
+ "preflight": {
+ "sourceSha": "fe9dc1e3c518825242ed889ab9c8352986f8c2ed",
+ "sourceFingerprint": "aeb792549146cc29eda779e83ae22d336276e31162f738a1dde85a82e7833902",
+ "passed": true,
+ "providerCalls": 0,
+ "assertions": 587
+ },
+ "delivery": {
+ "documentCount": 1,
+ "documentKey": "context-integrity-output",
+ "savedRevisionNumber": 1,
+ "savedRevisionPresent": true,
+ "markerPresent": true,
+ "markdownLinkTargets": [
+ "/PAP/issues/RUN-1#document-context-integrity-output"
+ ],
+ "expectedDocumentUiTarget": "/RUN/issues/RUN-1#document-context-integrity-output",
+ "hasExactDocumentUiLink": false,
+ "originalCaseRequiresLink": false,
+ "originalBaselineBarePath": false,
+ "originalCandidateWrongPrefix": true
+ },
+ "operationalSkillReadOrder": [
+ {
+ "tool": "skill",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 1,
+ "skill": "assigned-output"
+ },
+ {
+ "tool": "skill",
+ "operationalSkillLoad": true,
+ "earlyRecipeVisible": true,
+ "newReferencePointerVisible": true,
+ "newReferenceRead": false,
+ "outputTruncated": true,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 2,
+ "skill": "paperclip"
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 3,
+ "skill": null
+ },
+ {
+ "tool": "read",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": true,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 4,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": true,
+ "statusApiCall": false,
+ "ordinal": 5,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 6,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 7,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": true,
+ "ordinal": 8,
+ "skill": null
+ }
+ ],
+ "evidenceHashes": {
+ "result": "7f13c7f84dbbd662d5689b82ef02d5e9806dc43237604599c183ba807097f403",
+ "context": "16aa44354be2763149fe4c98d5907230025f909ec2d7eafa93767959c183f6a1",
+ "preflight": "cd5c451ec7c01ac145b8f20a11facfe4410b6c6ea621358b0d5bfcaa339260cf",
+ "finalStateScreenshot": "123a366f1d9372bf5249e9a46d16dc322538f7a0c2669504f02a29d97b77cf16"
+ },
+ "screenshotInspected": true
+ },
+ {
+ "variant": "candidate",
+ "caseId": "assigned-skill-paperclip-document",
+ "source": {
+ "sha": "fe9dc1e3c518825242ed889ab9c8352986f8c2ed",
+ "ref": "refs/heads/codex/opencode-stock-routing-qualified",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37069547401"
+ },
+ "status": "passed",
+ "attempt": 1,
+ "suiteDefinitionHash": "62cfca8303c66bf5e29b0665c72b7bb717acf9f96d7a3ef768407afa5bc9870f",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "runtimeMode": "legacy",
+ "durationMs": 102901,
+ "providerDurationMs": 82751,
+ "runCount": 1,
+ "recoveryRuns": 0,
+ "cleanup": "passed",
+ "matcherResults": [
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.assigned-skill-present",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The task run must receive one pinned skill version through the public assignment state."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.skill-request-explicit",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The task request must explicitly name the assigned skill with a supported slash or dollar reference."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.skill-source-marker",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The assigned pinned skill source must contain the output marker."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.marker-not-in-request",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The output marker must originate from the assigned skill, not the task request or comments."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.single-durable-output",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Exactly one durable task document must contain the skill's marker."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.saved-document-revision",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The public saved document must have a persisted revision and the requested content."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.saved-document-link",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "An agent completion comment must link the exact saved document on this task; a local path or claimed URL does not suffice."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.completed-task",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Final task status: done."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "contextIntegrity.successful-runs",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "All recorded context-integrity runs must succeed."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.budget-hard-stops",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Public company and agent records must both retain the 1,000-cent monthly hard stops."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.default-hire-bundle",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The public managed bundle must contain only the eight-word shipped identity, without an injected QA manual."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.provider-runs-present",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "The lifecycle oracle must reach actual provider runs; missing runs cannot pass instruction delivery."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.invocation-evidence-complete",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Every legacy run must have a public adapter.invoke event with its actual nonempty prompt."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.generic-procedures-absent",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "Neither startup nor continuation may reintroduce the removed generic manual."
+ },
+ {
+ "matcher": {
+ "kind": "json_path",
+ "path": "stockHarness.fresh-default-delivered",
+ "expected": true
+ },
+ "passed": true,
+ "detail": "At least one fresh invocation must carry default identity and connection guidance."
+ }
+ ],
+ "billing": {
+ "llm": {
+ "runCount": 1,
+ "runsWithTokenUsage": 1,
+ "runsWithReportedCost": 1,
+ "inputTokens": 92370,
+ "outputTokens": 2691,
+ "cachedInputTokens": 185856,
+ "totalTokens": 280917,
+ "reportedCostUsd": 0.006644079,
+ "costStatus": "reported"
+ },
+ "runtime": {
+ "provider": "local",
+ "agentRunDurationMs": 82751,
+ "leaseDurationMs": null,
+ "leaseCount": 0,
+ "costStatus": "not_metered",
+ "costSource": "local_not_metered"
+ },
+ "reportedCostUsd": 0.006644079,
+ "estimatedRuntimeCostUsd": 0,
+ "observedAndEstimatedCostUsd": 0.006644079,
+ "complete": true
+ },
+ "preflight": {
+ "sourceSha": "fe9dc1e3c518825242ed889ab9c8352986f8c2ed",
+ "sourceFingerprint": "aeb792549146cc29eda779e83ae22d336276e31162f738a1dde85a82e7833902",
+ "passed": true,
+ "providerCalls": 0,
+ "assertions": 587
+ },
+ "delivery": {
+ "documentCount": 1,
+ "documentKey": "context-integrity-output",
+ "savedRevisionNumber": 1,
+ "savedRevisionPresent": true,
+ "markerPresent": true,
+ "markdownLinkTargets": [
+ "/RUN/issues/RUN-1#document-context-integrity-output"
+ ],
+ "expectedDocumentUiTarget": "/RUN/issues/RUN-1#document-context-integrity-output",
+ "hasExactDocumentUiLink": true,
+ "originalCaseRequiresLink": true,
+ "originalBaselineBarePath": false,
+ "originalCandidateWrongPrefix": false
+ },
+ "operationalSkillReadOrder": [
+ {
+ "tool": "skill",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 1,
+ "skill": "assigned-output"
+ },
+ {
+ "tool": "skill",
+ "operationalSkillLoad": true,
+ "earlyRecipeVisible": true,
+ "newReferencePointerVisible": true,
+ "newReferenceRead": false,
+ "outputTruncated": true,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 2,
+ "skill": "paperclip"
+ },
+ {
+ "tool": "read",
+ "operationalSkillLoad": true,
+ "earlyRecipeVisible": true,
+ "newReferencePointerVisible": true,
+ "newReferenceRead": false,
+ "outputTruncated": true,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 3,
+ "skill": null
+ },
+ {
+ "tool": "read",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": true,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 4,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 5,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 6,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 7,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 8,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": true,
+ "statusApiCall": false,
+ "ordinal": 9,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": false,
+ "ordinal": 10,
+ "skill": null
+ },
+ {
+ "tool": "bash",
+ "operationalSkillLoad": false,
+ "earlyRecipeVisible": false,
+ "newReferencePointerVisible": false,
+ "newReferenceRead": false,
+ "outputTruncated": false,
+ "localDocumentWrite": false,
+ "documentApiCall": false,
+ "statusApiCall": true,
+ "ordinal": 11,
+ "skill": null
+ }
+ ],
+ "evidenceHashes": {
+ "result": "d363c4c394629706e30959682ad9b5ec301330636ec5f8c0dab319082ac3d8e8",
+ "context": "208a34086b904864fb9d115a9bae910ed49256b812b9e2ba9688459594921530",
+ "preflight": "08763f3fda4e6c60a23986ebdbba4973e6c10565575593e5797fd24ec8330d89",
+ "finalStateScreenshot": "982e5645377a39a6aa853795229d6b3e03afe00d567e03bd90a695c0f9115169"
+ },
+ "screenshotInspected": true
+ }
+ ],
+ "providerCalls": 4,
+ "additionalPaidRuns": 0,
+ "limitations": [
+ "One trial per cell cannot establish fix causality, robust non-regression or general coding quality.",
+ "Both original case link defects are outside the preserved durable-document oracle.",
+ "Explicit wording now requires clickable company-prefixed UI link and is not a direct repeat of prior usable-link cohorts.",
+ "Skill metadata improves stock selection but does not guarantee invocation on every harness.",
+ "API writes/revisions/comments and screenshot rendering were inspected; authenticated click navigation against cleaned-up instances was not replayed.",
+ "Runtime is unmetered; reported LLM receipts do not establish actual external bill.",
+ "Historical combined prompt-removal and early-recipe failures are preserved, alongside unrelated chat/credential findings."
+ ]
+}
diff --git a/doc/plans/2026-10-02-opencode-skill-routing-link-qualification.md b/doc/plans/2026-10-02-opencode-skill-routing-link-qualification.md
new file mode 100644
index 00000000000..79f0c4b5193
--- /dev/null
+++ b/doc/plans/2026-10-02-opencode-skill-routing-link-qualification.md
@@ -0,0 +1,75 @@
+# OpenCode skill routing and clickable delivery — 2026-10-02
+
+**TL;DR: 0 newly failing cells, 0 newly passing cells, 2 unchanged passes, and 0 pending pairs in this matched trial. Both document cases pass in both variants, so this does not establish that the metadata/link change caused the earlier failures to recover. Handoff remains imperfect in the original case:** candidate uses a clickable link with the wrong `PAP` company prefix; baseline supplies only a bare prefix-less slug path. Neither defect is scored by the preserved original document-storage oracle. The explicit clickable-link cases deliver the correct `RUN` link in both variants.
+
+The narrow correction expands the operational skill's stock discovery description to include Paperclip task/heartbeat work and document/file delivery. The early API recipe asks for a clickable Markdown link, and the reference shows a canonical UI-link example. The full skill stays on disk; the eight-word manual and shared prompts remain reduced. No full-body injection, adapter policy override or native tool guidance is added to legacy runs.
+
+| Classic OpenCode case | Pre-correction skill | Corrected skill | Independent evidence and limitation |
+| --- | --- | --- | --- |
+| Original assigned skill, verbatim request | Pass | Pass | Exactly one saved document with skill-only marker and persisted revision in each. Both handoff paths are deficient and outside this case's link-free oracle. |
+| Explicit Paperclip storage with clarified clickable UI link | Pass | Pass | Saved revision/content and exact clickable `/RUN/issues/RUN-1#document-context-integrity-output` in both. |
+
+Original machine results, source/configuration proof, tool-read sequence, costs and evidence hashes are preserved in the [safe evidence projection](2026-10-02-opencode-skill-routing-link-qualification.json). All four cells clean up successfully; none uses automatic disposition recovery or an extra attempt. No provider was rerun to improve these results.
+
+## Sources, admission and inspectable reports
+
+- Candidate `fe9dc1e3c518825242ed889ab9c8352986f8c2ed`, frozen branch `codex/opencode-stock-routing-qualified`: [workflow](https://github.com/paperclipai/paperclip/actions/runs/37069547401), [published dashboard and screenshots](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-37069547401-1/index.html).
+- Baseline `0d7ecfa96d72fba79b7f0a25052b42c0686c0488`, frozen branch `codex/opencode-pre-routing-skill`: [workflow](https://github.com/paperclipai/paperclip/actions/runs/37069552374), [published dashboard and screenshots](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-37069552374-1/index.html).
+- Trusted default-branch workflows ran concurrently on separate targets. Each of four measured cells passed its own exact-source, credential-free 587-assertion prerequisite before provider credentials. Candidate source fingerprint is `aeb792549146cc29eda779e83ae22d336276e31162f738a1dde85a82e7833902`; baseline is `0315602ac6788cf0d65561a73cc85d790768ef90c6815257077a2381f961b96e`.
+- Git tree comparison verifies 8,242 identical tracked files. Only the two operational skill sources and an explicit baseline provenance receipt differ. Models, effort, tools, auth, permissions, budgets, manual/shared prompts and behavioral fixtures/graders are fixed; both fixture configuration hashes match. Suite/source digest differences correctly include the changed skill bytes.
+- Local source preparation passed 918 E2E support tests, eight canonical inventory calibrations, skill validation, E2E typecheck, two-cell discovery and both exact-source prerequisites. Both capability inventories use the same declared source list. Initial setup mistakes remain retained and did not reach providers.
+
+The explicit fixture now asks for a clickable company-prefixed Paperclip UI document link, matching its intended oracle. Bare paths and code-formatted paths fail calibration; correct relative/same-app absolute links pass. The original assigned-skill request and procedure remain verbatim. Earlier API-link grades are not retroactively changed, and these explicit results are not a direct repeat of the older “usable link” cohort.
+
+## Which guidance was read before delivery
+
+In the candidate original assignment, OpenCode loads the assigned Context integrity output skill, then operational Paperclip before any document write. The returned Paperclip skill is marked truncated, but the early saved-document recipe and reference pointer are visible. It reads `issue-documents.md`, then writes the public task document through the API. This differs from the previously failing candidate, which first loaded Paperclip only in a separate disposition-recovery run after its local-only output.
+
+The current baseline original assignment first loads the assigned output skill and writes a workspace Markdown file. It later loads Paperclip and reads the issue-document reference, then saves a public document before completing the **same** assignment. Thus its successful delivery did not require improved metadata; stock selection timing varies between trials. Both explicit variants load Paperclip and read the reference before the document API call. Four rendered final-state screenshots were inspected, and public document revisions/content and completion comments agree with the retained results.
+
+The candidate original comment has an actual Markdown href `/PAP/issues/RUN-1#document-context-integrity-output`, despite the measured company prefix being `RUN`. Baseline's original comment has a bare `/issues/runner-e2e-…#document-task-document` path without a Markdown anchor. The candidate's literal prefix matches the reference's example, making example copying a plausible cause, but this trial does not isolate that cause. Authenticated click navigation was not replayed after cleanup; neither original link is presented as a verified usable handoff. A minimal follow-up can show an issue-derived prefix instead of a literal company example. These original machine passes must not be presented as fully correct links.
+
+## Timing, usage and cost
+
+Four provider turns were expected and four assignment runs occurred. All four ledger receipts contain token usage and reported LLM cost. Local runtime remains unmetered; actual external billing is not established.
+
+| Case | Baseline provider seconds | Candidate provider seconds | Baseline cell seconds | Candidate cell seconds | Baseline reported USD | Candidate reported USD |
+| --- | ---: | ---: | ---: | ---: | ---: | ---: |
+| Original | 25.870 | 67.897 | 46.285 | 89.455 | 0.0058472545 | 0.0041383700 |
+| Explicit clickable storage | 73.984 | 82.751 | 94.804 | 102.901 | 0.0049436470 | 0.0066440790 |
+
+Reported LLM totals are **$0.0107909015 baseline** and **$0.0107824490 candidate**. The candidate original case takes longer in this trial; these single observations, different cache/token receipts and unmetered runtime do not establish general speed, cost or quality equivalence.
+
+## Preserved failures and scope
+
+The [original combined prompt-removal report](2026-10-02-stock-harness-live-comparison.md) still records two new classic Claude/OpenCode document-delivery failures, two OpenCode ordered-case improvements, and separate unchanged credential/chat failures. The [first recipe repair report](2026-10-02-legacy-document-skill-repair.md) still records Claude's improvement, OpenCode's unresolved local-only output, and the candidate's worse non-clickable explicit handoff. New successes do not erase those earlier observations or establish robustness.
+
+This comparison qualifies only classic OpenCode's two selected journeys. Existing classic Codex/Claude/OpenCode and ACP Codex skill mounts were audited; ACP Claude's names/root-only metadata and unsupported custom ACP delivery remain separate. Hermes/Pi/OpenClaw are not live-qualified here. Native completion descriptions and hiring templates have separate changes and measurements. Both PRs remain draft; no merge or further paid breadth is part of this report.
+
+## Provider-free follow-up after measurement
+
+The approved reference-only follow-up replaces the literal `PAP` link with a
+JavaScript construction using the current `issue.identifier` and the successful
+write receipt's `saved.key`. It is a later source change, **not live-qualified**
+by the frozen candidate above. The independent storage grader now calibrates a
+wrong-company link as failure, and executes the shipped recipe against two
+other company prefixes plus a locked-write redirected document key. All 25
+focused document/source-digest tests, eight inventory calibrations, canonical
+generated metadata checks and E2E typecheck pass. An initial sandboxed support attempt denied localhost/tsx
+pipe creation; the failed attempt is retained, with its affected files rerun
+unchanged under permitted local execution: 906 assertions passed in the original
+921-assertion attempt, and all 82 selected assertions passed in the permitted
+retry, including every originally failed assertion. No new model calls or old verdict
+changes are part of this follow-up.
+
+Fresh native-PR review caught a supported edge case in that later recipe:
+`issue.identifier` may be null. The recipe now uses the current issue ID in the
+unprefixed UI route when no identifier exists. Provider-free tests cover both
+null and absent identifiers, preserving the returned document key. Source review
+confirms that the board resolves the loaded issue's actual company and preserves
+the document hash; no agent-side company fetch is needed. This route logic also
+corrects wrong prefixes, so the frozen candidate's `PAP` href is noncanonical,
+not a proven broken link. No authenticated click replay or further model run was
+made. The previous 4/5 review and local setup/timing failures remain retained;
+current focused document/source/manifest/admission checks pass 56 assertions and
+E2E typecheck passes. This correction still has no live qualification.
diff --git a/doc/plans/2026-10-02-stock-harness-live-comparison.json b/doc/plans/2026-10-02-stock-harness-live-comparison.json
new file mode 100644
index 00000000000..7512c947605
--- /dev/null
+++ b/doc/plans/2026-10-02-stock-harness-live-comparison.json
@@ -0,0 +1,357 @@
+{
+ "schema": "paperclip.stock-harness.safe-comparison/v1",
+ "candidateSha": "f02d8d0df327abb43b20c7e7beb86798239abbf5",
+ "baselineSha": "12c5433c67dc2e62916b879349c7ba2b6e0431f0",
+ "nativeCodexFixHeldConstant": "408f70e69f9c5e49cb4377f4886ac2001bfa67a2",
+ "comparisonManifest": {
+ "schema": "paperclip.stock-harness-comparison.v1",
+ "variant": "previous-instructions",
+ "candidateSha": "f02d8d0df327abb43b20c7e7beb86798239abbf5",
+ "restoredInstructionsFrom": "e00d10d5d5594f6e2d1e8cf4e0ec81c074b0bd88",
+ "nativeCodex14920": "held-constant; no before/after performance claim",
+ "productionDifferences": [
+ "server/src/onboarding-assets/default/AGENTS.md",
+ "packages/adapter-utils/src/server-utils.ts"
+ ],
+ "structuralOracle": "Historical manual exact content and observed generic procedures; independent behavioral graders unchanged",
+ "expectedMatrixCells": 24,
+ "expectedProviderTurns": 48,
+ "maxInitialCampaignsPerVariant": 1,
+ "behavioralSources": {
+ "context-integrity-cases.ts": "201d05f8257c1121a94dd9d8a22f08b9db80555e388013ffeabb65e301499fd2",
+ "context-integrity-scoring.ts": "50d370044e45386ba87fb23ca63c228b96bb8373d67bb7e82e8b2a89eb23f252",
+ "context-integrity-flow.ts": "63bcb7bdba4c80b15ff5872f16383844456eab0c5a10627da5d3487a26821c6a",
+ "chat-cases.ts": "754b251bdd42605e147da9081b663329234260d2b13df0df3d44562e362b14ca",
+ "chat-flow.ts": "11fc506559da61315ce04a877f6b38a055e71e532fecfcf62c749a1d3bf985e7",
+ "live-fixtures.ts": "1ef80209cc53cc514a8e58af4c2225e38ec15b20acf17ca7564506ca6617ac3e",
+ "runner.spec.ts": "14d57e0f9131b3f1981ac593464738d01362008eefe85ea836075c794681fa85",
+ "launch.ts": "5ada6ca5484542f028b29fc603dc7992213d4c06fa9046834bd7d23c4511b847",
+ "stock-harness-admission.ts": "c9775d77d48f8d59ba1197a7e5769f14db0c7d33f5e2a2968a04466e083d63ff",
+ "types.ts": "c45dc3b2366457449ec9e7d413f930605dec88ea93a14ce5c5a5f445a27d148c"
+ },
+ "instructionSha256": {
+ "manual": "e4d2375d722602cd744403292d99f6e6c9b7e8014d9cdfa6f9811ace03428e5f",
+ "shared": "819026782b92f37064fca354ddbca685b3c05f1869ec560e40d8a757b0a8aee9"
+ }
+ },
+ "modelsEffortToolsPermissionsCredentials": "same fixture/source configuration; effort inherits provider default when unspecified",
+ "expectedCellsPerVariant": 24,
+ "expectedProviderTurnsPerVariant": 48,
+ "baseline": [
+ {"executionId":"stock-harness.legacy-acp-claude.local.assigned-skill-explicit-invocation","profile":"legacy-acp-claude","case":"assigned-skill-explicit-invocation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard"],"failedMatcherPaths":[],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":59075,"providerDurationMs":42037,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":1,"inputTokens":15184,"outputTokens":2261,"cachedInputTokens":218341,"totalTokens":235786,"reportedCostUsd":0.16114005000000003,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":42037,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.16114005000000003,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.16114005000000003,"complete":true},"billingTypes":["metered_api"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":14137,"reportedPromptChars":13607,"freshPromptChars":4688,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"78f6add6f11a45f58bfc6fee81600871f888750986c27497563a79eba39a101c","evidence-manifest.json":"14f67d036a3663f606cf269890f5a36a18221e5c7dcb466f513f761d882fb6eb","snapshots/context-integrity.json":"93bba435c845af31707d4e4b84b2330cd8ff14045a76c2d1267b958c8133950b","snapshots/stock-harness-hire.json":"e8b85aa909fc6af6a72b180c79572d70a26dd6ee6307c9b985f80b928eb96170","snapshots/stock-harness.json":"fa0eb10eb3939b91d83fed8a8c9f9915bb407ab03a5a9bd7e5df99aa593ffb99","snapshots/stock-harness-preflight.json":"2ac069369e2d26b0e4c213966770962c0282f9a7665fa1297fe3c70df2c73960"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.legacy-acp-claude.local.continuity-restart","profile":"legacy-acp-claude","case":"continuity-restart","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard","structural_receipt_incomplete"],"failedMatcherPaths":["stockHarness.fresh-default-delivered"],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":36961,"providerDurationMs":19492,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":19069,"outputTokens":329,"cachedInputTokens":55518,"totalTokens":74916,"reportedCostUsd":0.1039979,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":19492,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.1039979,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.1039979,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":false},"invocationMetrics":[{"capturedPromptChars":16395,"reportedPromptChars":17606,"freshPromptChars":1462,"retrievalClipped":true},{"capturedPromptChars":16395,"reportedPromptChars":17638,"freshPromptChars":1462,"retrievalClipped":true}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"b00296e015e0d35a213e031aede08732f900cf8aaa0f67dd6adc30310871a9f4","evidence-manifest.json":"101cb2a051bb64d3fc12e3a5389c2f39be4acb85e120b9bca1557163643f32e8","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"df3b7ce86f99b1f31ce3061e637e936d40a68b63d49aa307cf4a9dcfa75b3983","snapshots/stock-harness.json":"cffaf9caec42246841497abf2059ee2d11c23a67971ad14112fa96beb23d302a","snapshots/stock-harness-preflight.json":"7da7c7be4d0c33c6d1c3fadeb500eebe3fceba797edd0f24a9db187091896b6b"}},
+ {"executionId":"stock-harness.legacy-acp-claude.local.ordered-comment-continuation","profile":"legacy-acp-claude","case":"ordered-comment-continuation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard","structural_receipt_incomplete"],"failedMatcherPaths":["stockHarness.fresh-default-delivered"],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":169818,"providerDurationMs":150645,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":49679,"outputTokens":7557,"cachedInputTokens":465247,"totalTokens":522483,"reportedCostUsd":0.45116585000000003,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":150645,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.45116585000000003,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.45116585000000003,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":false},"invocationMetrics":[{"capturedPromptChars":16433,"reportedPromptChars":21108,"freshPromptChars":4688,"retrievalClipped":true},{"capturedPromptChars":14499,"reportedPromptChars":14021,"freshPromptChars":4688,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"9994318ef5b3cac9143215d580f7551600777864f3d54a0cb2c48941a0799523","evidence-manifest.json":"79ba61a1c2ac3adde8d1905f09a051d0b711be7c618285b728d13f3650fe9d64","snapshots/context-integrity.json":"0566e89e716c742ee4452f5d9bd719354dba968459809e3e362794f55135b705","snapshots/stock-harness-hire.json":"05919c3be635604a40c0ea9bb76ab1ce1a1ce6545417e66e02c5a26881f082ee","snapshots/stock-harness.json":"6fdbee98a58b20e131a46a5bf9220c1d9e6c4cfc02d64baeee700627869b137c","snapshots/stock-harness-preflight.json":"cb4abccc23ebbe0cd4884ca1d5238eef14b82e15987a2d9e7083ccb608504189"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}},
+ {"executionId":"stock-harness.legacy-acp-codex.local.assigned-skill-explicit-invocation","profile":"legacy-acp-codex","case":"assigned-skill-explicit-invocation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard"],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":59328,"providerDurationMs":35548,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":0,"inputTokens":511,"outputTokens":30,"cachedInputTokens":27646,"totalTokens":28187,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":35548,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["metered_api"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":13618,"reportedPromptChars":13642,"freshPromptChars":4687,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"743b4b283ee73f34db4434facefb26012145fa528a1912856725c4f13e5b9247","evidence-manifest.json":"fe7f46cac1d8722c6137ec813638ecd0c5944f1ea25cc24092ff8d22236c807b","snapshots/context-integrity.json":"d247901367c17626a5738743dc300566c758db50fa7c0b60e5f74be5b7083245","snapshots/stock-harness-hire.json":"15866eaa21a98137bd2c4088dd53256360cdf65b27c8475d49d98cd49788fcf6","snapshots/stock-harness.json":"639cd4b7fec29383a18016e5b8be2227f68d8a5c37035318089ace252408a231","snapshots/stock-harness-preflight.json":"f52edc51ee627e9f5f02d3049a83a9b99fc073fc504ca9f238cf95bc691a1ce8"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.legacy-acp-codex.local.continuity-restart","profile":"legacy-acp-codex","case":"continuity-restart","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard","structural_receipt_incomplete"],"failedMatcherPaths":["stockHarness.invocation-evidence-complete","stockHarness.fresh-default-delivered"],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":44754,"providerDurationMs":22118,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":1,"runsWithReportedCost":0,"inputTokens":662,"outputTokens":29,"cachedInputTokens":29955,"totalTokens":30646,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":22118,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":false,"historical-generic-procedures-observed":true,"fresh-default-delivered":false},"invocationMetrics":[{"capturedPromptChars":16383,"reportedPromptChars":17671,"freshPromptChars":1461,"retrievalClipped":true}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"3ba472d29268b3e2d2170cd9947d7c89fbe685d902fedacf5c74a1952a97ce3a","evidence-manifest.json":"a5c263cc9afe3836a3c9f46cda537bb07a374c30fd7ad6f136088680b3ade01c","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"8dd9d388cc265387d960fd435c19874601a5f7ca209b328943f8bacb145c5d89","snapshots/stock-harness.json":"f2b69dda7e26a76c952f0b36f10cfd7e9fb364ae3930585961d84093d17c2979","snapshots/stock-harness-preflight.json":"5fc3c8235143766fc6be8c7e12b31b92222594698c966462f944f13fb5929113"}},
+ {"executionId":"stock-harness.legacy-acp-codex.local.ordered-comment-continuation","profile":"legacy-acp-codex","case":"ordered-comment-continuation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard","structural_receipt_incomplete"],"failedMatcherPaths":["contextIntegrity.ordered-comments","contextIntegrity.changed-scope-preserved","contextIntegrity.packing-report-order","contextIntegrity.final-scope-applied","contextIntegrity.continuation-run-count","contextIntegrity.continuation-wake-comment-ids","contextIntegrity.single-durable-output","contextIntegrity.completed-task","contextIntegrity.successful-runs","stockHarness.invocation-evidence-complete"],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":50896,"providerDurationMs":39443,"cleanup":"passed","billing":{"llm":{"runCount":4,"runsWithTokenUsage":1,"runsWithReportedCost":0,"inputTokens":992,"outputTokens":46,"cachedInputTokens":24349,"totalTokens":25387,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":39443,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":false,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":14032,"reportedPromptChars":14056,"freshPromptChars":4687,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"33ac59f0a690ed76618f695e658575751e718f53f9d828d8b52c690df9c15afb","evidence-manifest.json":"92c048e01012a77b94003e38f3f73888d725f6942327f7fbf3e6d2a42d12184d","snapshots/context-integrity.json":"2f9a803657068a67bcbf3b190370395187ef13b7a1487705d0305e121339eac7","snapshots/stock-harness-hire.json":"f47bb35d606ae00e6057a2a77769e2091e8ccb12eca08db3a17e1ed297a8ccf4","snapshots/stock-harness.json":"05582c37956b55f6a2bd7cad0c55bc0fa1dbff875d7dbed12b83352f6bd4e04c","snapshots/stock-harness-preflight.json":"badf01a591f5327f0dc2e48865711f8f4d7327888a7688668728173a29b273a8"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":3,"failed":9}},
+ {"executionId":"stock-harness.legacy-claude.local.assigned-skill-explicit-invocation","profile":"legacy-claude","case":"assigned-skill-explicit-invocation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":49054,"providerDurationMs":29420,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":1,"inputTokens":29883,"outputTokens":1348,"cachedInputTokens":225730,"totalTokens":256961,"reportedCostUsd":0.19999125,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":29420,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.19999125,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.19999125,"complete":true},"billingTypes":["metered_api"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":7512,"reportedPromptChars":7512,"freshPromptChars":4684,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"4fc73f7b1226b9a41b209a2f6dfa2a58805ddc1a7e7b699ac2b42b2e74a189a7","evidence-manifest.json":"440ee14cca3f8558fb47ecf27b17693c0f9dbecdcf5c8532d7e2ccbefe31700b","snapshots/context-integrity.json":"4545847b9c4ab2a4fa3053a384b5e990133705fc9da0d1e9cd98f1275ec05f44","snapshots/stock-harness-hire.json":"a6abfc40d1c788e4b897f2375506d59b2caba9fab0d4df019e7137fe9f66177f","snapshots/stock-harness.json":"755cc9d5f656dc068a08c8c141203eaa5d3d60b53edd9d516887aae108119f45","snapshots/stock-harness-preflight.json":"f52730b4555ab31de952c8c1e38db4067fb40756b6befd36ed4b686e1a273d73"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.legacy-claude.local.continuity-restart","profile":"legacy-claude","case":"continuity-restart","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"failed","failureClass":"candidate_failure","causeCodes":["chat_memory_assertion"],"failedMatcherPaths":[],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":40202,"providerDurationMs":23072,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":39036,"outputTokens":829,"cachedInputTokens":116171,"totalTokens":156036,"reportedCostUsd":0.1936638,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":23072,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.1936638,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.1936638,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":11451,"reportedPromptChars":11451,"freshPromptChars":1458,"retrievalClipped":false},{"capturedPromptChars":11508,"reportedPromptChars":11508,"freshPromptChars":1458,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"f8e377f617204eabdb6b4e0c24ab3280c51664b429051f7ea21a4746790820a6","evidence-manifest.json":"45818efcb8ed6d663f7ffab6d53605d5191fb983a68e422dadebdae875ed5b4c","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"e3a8735ad4d5f89dc3899668c36791579562157fa25aa32a6e59aa098d0c079a","snapshots/stock-harness.json":"f3d24452ade2f232b0f671768d46e4d65a6a0c2a0740bb1daa17a4871a09aa7b","snapshots/stock-harness-preflight.json":"b85c96ada9801ce6c6569338b68bc810494a0711f01af39a63932e288f7a81a3"}},
+ {"executionId":"stock-harness.legacy-claude.local.ordered-comment-continuation","profile":"legacy-claude","case":"ordered-comment-continuation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":142017,"providerDurationMs":119179,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":66601,"outputTokens":6610,"cachedInputTokens":783643,"totalTokens":856854,"reportedCostUsd":0.58397715,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":119179,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.58397715,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.58397715,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":14473,"reportedPromptChars":14447,"freshPromptChars":4684,"retrievalClipped":false},{"capturedPromptChars":7926,"reportedPromptChars":7926,"freshPromptChars":4684,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"9161c05c288e8620e5a748a28c901e1582efc240ca640203e1d8f7527e22a651","evidence-manifest.json":"296246a83eb0870a53e70f359f1859719f30b655e6ed20908abbfe4213605280","snapshots/context-integrity.json":"17779f4ebc38ed08071e40ac4b939149a18dfceb76c0f1f4f6ed21bf5d0153fa","snapshots/stock-harness-hire.json":"1f5a97e38555f57f47ee1900440d88ee521de75e7589c163f7688c852b661dc8","snapshots/stock-harness.json":"499a0b49c042b7c44f992c56983d207677cf619306ed6f6db9975ef1b84d455b","snapshots/stock-harness-preflight.json":"8f92c4b703533a645196bf03d1353be7196271d25638be7cb3fae6ec92c69c52"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}},
+ {"executionId":"stock-harness.legacy-codex.local.assigned-skill-explicit-invocation","profile":"legacy-codex","case":"assigned-skill-explicit-invocation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":50078,"providerDurationMs":27658,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":0,"inputTokens":128946,"outputTokens":1727,"cachedInputTokens":97854,"totalTokens":228527,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":27658,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["metered_api"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":12332,"reportedPromptChars":12332,"freshPromptChars":4683,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"ea06fc8b1ec166c9932de8634d08e528e90f7b734388ccad6d47b4b96df9ff6d","evidence-manifest.json":"45e71226e99eaee9bea0b0fae2cca35de573c2ab9d5add13159f321c8480ac0b","snapshots/context-integrity.json":"4cf10f812f258a77b472abd74f6691224dfcba4b9a2dec9c0f2c35c5ae741d7a","snapshots/stock-harness-hire.json":"19db78dbf51a67ff4bc307ef378da9cc024a0cae1c977951b49d089c1ec47fe4","snapshots/stock-harness.json":"a3cb7e2bf4e775cf9058b6be33d8df5321e312df2aed39736719454647610a8f","snapshots/stock-harness-preflight.json":"e9a116f8605a2630ff46075598ac6bae30817892d76efcd9a25891649cac0856"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.legacy-codex.local.continuity-restart","profile":"legacy-codex","case":"continuity-restart","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":85550,"providerDurationMs":29332,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":3,"runsWithReportedCost":0,"inputTokens":468597,"outputTokens":2919,"cachedInputTokens":373648,"totalTokens":845164,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":29332,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":2787,"reportedPromptChars":2787,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":2730,"reportedPromptChars":2730,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":16326,"reportedPromptChars":16326,"freshPromptChars":1457,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"db7be8127de96e697a9d274b7a18db40695daa234684ec4d8e28afd8665c1f3e","evidence-manifest.json":"2e9151536b8ade2bfbb3c465438e8ace21417258c4037b6923920ee0784b0e47","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"af8b2fe11402a8b87a056818df29a62829ec9425f8a2d955e95692980e15e043","snapshots/stock-harness.json":"739e642582faf89b74c522774c64ea26c6af623539b7a8f99ce332066c965600","snapshots/stock-harness-preflight.json":"8fe9f32d7629a1f6bd632d58e22e39e47baff2b8bc3b74e3593e6411ab3c9a2b"}},
+ {"executionId":"stock-harness.legacy-codex.local.ordered-comment-continuation","profile":"legacy-codex","case":"ordered-comment-continuation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":74114,"providerDurationMs":57150,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":0,"inputTokens":628626,"outputTokens":7098,"cachedInputTokens":563211,"totalTokens":1198935,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":57150,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":9811,"reportedPromptChars":9785,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":12746,"reportedPromptChars":12746,"freshPromptChars":4683,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"56a457fcc7a36809eb4bfcedeff2fa079f5272754ff52fc453e8bf8d813e52f3","evidence-manifest.json":"bf17fb7d2a05f7e99e0723907bdc57f0a88bf6838d68f31f4b84dc6ebc62d3c7","snapshots/context-integrity.json":"a9156b810e32fa1d9d07826276a00c62ebe4f25ac3dc284ada157f2b2d72d800","snapshots/stock-harness-hire.json":"5fc8abd51d401c96d701b0862ac2dc674eb36244fdc25c49b67ba3947ba5a2fb","snapshots/stock-harness.json":"c72b8c53e1e50a82ab6ff815b363942936440cfff75f8f8ca5f54185c723889d","snapshots/stock-harness-preflight.json":"b14d304196cdc3146436c66199243c6da04784c13e45c9bd31e0ef83e97a29bc"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}},
+ {"executionId":"stock-harness.legacy-opencode.local.assigned-skill-explicit-invocation","profile":"legacy-opencode","case":"assigned-skill-explicit-invocation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"legacy","durationMs":86384,"providerDurationMs":68956,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":1,"inputTokens":57002,"outputTokens":2365,"cachedInputTokens":223232,"totalTokens":282599,"reportedCostUsd":0.0044563934000000005,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":68956,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.0044563934000000005,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.0044563934000000005,"complete":true},"billingTypes":["unknown"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":12335,"reportedPromptChars":12335,"freshPromptChars":4686,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"20dbb34bb975f73c3ac2695c047b6cbc8f6382757939ae6210b08a0f13ba9e9d","evidence-manifest.json":"67c3e042be8e0a5a0cd7cca82d1b0887e1392a2806c3b4db67baa3e99365b6be","snapshots/context-integrity.json":"decf2d93769acce2e2990de27c81ee32fd805ca53d3c2be68c56f22a013a7ac0","snapshots/stock-harness-hire.json":"187598ed72837719be8d6f0b77c5f8d35cfc871f8cf41d4fdc5b259f88171025","snapshots/stock-harness.json":"98424edd880cd05e0cbf8c32973fe9fbfc055037a74e76c20f893c3ee263f6a0","snapshots/stock-harness-preflight.json":"86d9f4080a2045ae3fa68468d0ffaf68baa26f27f0528274f13762f093b4c113"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.legacy-opencode.local.continuity-restart","profile":"legacy-opencode","case":"continuity-restart","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"legacy","durationMs":126589,"providerDurationMs":78910,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":3,"runsWithReportedCost":3,"inputTokens":64286,"outputTokens":1046,"cachedInputTokens":28672,"totalTokens":94004,"reportedCostUsd":0.0022020907,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":78910,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.0022020907,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.0022020907,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":7611,"reportedPromptChars":7611,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":7554,"reportedPromptChars":7554,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":16335,"reportedPromptChars":16335,"freshPromptChars":1460,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"29dce6418aa35bb8070b07433046bbf39c9a8367a198cdb0aa28a0bea480032c","evidence-manifest.json":"439dc46130b607b7488e9df7736a711b267efa53689fe9fdad2f822525677215","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"7f7ad64827bbe430e06a7e01b1377443653793584264c0fa00ac88a742bd0f49","snapshots/stock-harness.json":"4dd536951a950e7507710a9eb44cdbcd354907397f1e95b8297b28a98fd75dbc","snapshots/stock-harness-preflight.json":"8fa2ec342ad583fb20fed4db88890fc31eab3ef5898a952a85371e53dd433aaf"}},
+ {"executionId":"stock-harness.legacy-opencode.local.ordered-comment-continuation","profile":"legacy-opencode","case":"ordered-comment-continuation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37048838402","cellAttempt":1,"status":"failed","failureClass":"candidate_failure","causeCodes":["deadline_or_run_start_timeout"],"failedMatcherPaths":["contextIntegrity.comments-queued-as-batch","contextIntegrity.initial-run-started","contextIntegrity.ordered-comments","contextIntegrity.changed-scope-preserved","contextIntegrity.packing-report-order","contextIntegrity.final-scope-applied","contextIntegrity.continuation-run-count","contextIntegrity.continuation-wake-comment-ids","contextIntegrity.single-durable-output","contextIntegrity.completed-task","contextIntegrity.successful-runs"],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"legacy","durationMs":720616,"providerDurationMs":442902,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":51446,"outputTokens":8911,"cachedInputTokens":967936,"totalTokens":1028293,"reportedCostUsd":0.030657645200000007,"costStatus":"partial"},"runtime":{"provider":"local","agentRunDurationMs":442902,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.030657645200000007,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.030657645200000007,"complete":false},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"historical-generic-procedures-observed":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":16392,"reportedPromptChars":16461,"freshPromptChars":0,"retrievalClipped":true},{"capturedPromptChars":16406,"reportedPromptChars":16879,"freshPromptChars":4686,"retrievalClipped":true},{"capturedPromptChars":12749,"reportedPromptChars":12749,"freshPromptChars":4686,"retrievalClipped":false}],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"6d0e5d54b1742b02eb37346747510c66cb5cd0b80262a6c9590fd2a28861dcb2","evidence-manifest.json":"758931a4d30213d1b320f58cd2aa338e8a6a8aed579b878e14c5e52848bd5f13","snapshots/context-integrity.json":"bcaa4ee278361a90347625044aa49086b27093356abc0f3700b0363d28c8653c","snapshots/stock-harness-hire.json":"21431fa5e7cb6486037c670fc1e4aa64fb24716ad8ab325601ff294ada40263f","snapshots/stock-harness.json":"29c55e52f4adbbc9259cb9e221c08bfbbd7ad4c5f8247c24b3f029362e9000de","snapshots/stock-harness-preflight.json":"f341723074c996c79d8a6c30b9f12270634b20b40da452b13e4ab9ce91b47cac"},"taskDocumentCount":null,"behaviorCheckCounts":{"passed":1,"failed":11}},
+ {"executionId":"stock-harness.runner-acpx-claude.local.assigned-skill-explicit-invocation","profile":"runner-acpx-claude","case":"assigned-skill-explicit-invocation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"claude-sonnet-5","runtimeMode":"native","durationMs":46264,"providerDurationMs":25372,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":1,"inputTokens":10,"outputTokens":1042,"cachedInputTokens":141254,"totalTokens":142306,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":25372,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unknown"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"073085f804a58d191bd44972edfb08d914fe622a86f236d0c4dc1b2bf8a03322","evidence-manifest.json":"4fad428c1df72abbfee24a4f7338e25284fc874cff1220e6b631fa86eb2d0bed","snapshots/context-integrity.json":"77e27b8ea01a83e0b65f3d5410e0787fbf84a7f6ea02f4401bd77488999dd4a2","snapshots/stock-harness-hire.json":"8c6c5d56fd068c15f1e19ce9a0b62204443c894d204311bd949d5e22c624fd3d","snapshots/stock-harness.json":"2a6860d7c29ad0d03240bda0a779b83d0455b8ce9fcfb1cf9e6ad559c4dec112","snapshots/stock-harness-preflight.json":"79b11e544d2821d1025476f5fd0d737e822ae5ab731ab32047d1fbf6b76015e4"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.runner-acpx-claude.local.continuity-restart","profile":"runner-acpx-claude","case":"continuity-restart","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"claude-sonnet-5","runtimeMode":"native","durationMs":77424,"providerDurationMs":36820,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":3,"runsWithReportedCost":3,"inputTokens":6,"outputTokens":94,"cachedInputTokens":94997,"totalTokens":95097,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":36820,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"be582fe8af5f19543c16c8590697c5aa9dc688fdb653b0550aba0b55174becd1","evidence-manifest.json":"cfbd1cb13917a96b08dd46aae1fcc63e2b27af5d1d22f4952974d3415c74ffb8","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"254f18a8e8e1d6a5a2e7731728756671c1374cd4d1210469172bed9c2cd6e4c2","snapshots/stock-harness.json":"8efa84d6907de220dd7b9fc2c384c61aae0606e7f5311f0e926e26ae1617d869","snapshots/stock-harness-preflight.json":"c7e3f2342ef9fc824b28e3f22ffbbb326d2ba1ff84e36c4deedc56a7abefbe07"}},
+ {"executionId":"stock-harness.runner-acpx-claude.local.ordered-comment-continuation","profile":"runner-acpx-claude","case":"ordered-comment-continuation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"claude-sonnet-5","runtimeMode":"native","durationMs":132587,"providerDurationMs":108895,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":26,"outputTokens":7996,"cachedInputTokens":565030,"totalTokens":573052,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":108895,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"62c6c55047813b0b5aa5334e29dbe3f90225c83ac436eab14afd97d78ed9ec65","evidence-manifest.json":"7d53ad7f80b65a1c7af3fad4fa3d0c652ae25cdaeae3d41cbee1bb888b853fb5","snapshots/context-integrity.json":"2081459b761a84469399bec377d7380c172b64fddae48735c5329771656e28a7","snapshots/stock-harness-hire.json":"f11c90fdae215949458d61a6e1ca6565fe277ea30d52fd922c05cffdf4867e5c","snapshots/stock-harness.json":"f303a3fb5c5e55cefb696d46204aafe6f1cefc5b0a6b07a728f2bf0dbf1dfdcf","snapshots/stock-harness-preflight.json":"79768aa58996d28ee80c8a9e8d5c4ba1a42eba58a408163cd8a6037ac6005b26"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}},
+ {"executionId":"stock-harness.runner-codex.local.assigned-skill-explicit-invocation","profile":"runner-codex","case":"assigned-skill-explicit-invocation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"native","durationMs":53751,"providerDurationMs":29850,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":1,"inputTokens":162041,"outputTokens":1296,"cachedInputTokens":137822,"totalTokens":301159,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":29850,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unknown"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"ffcc5203624c19b0acda50dfd1e283c595ae3ed6072e4aaf9781fef4bf08fa45","evidence-manifest.json":"1460fae9f00a241a3ddbe7f623a4c1c6cf0f6434e73e47d0de7f98dc00dec459","snapshots/context-integrity.json":"63d16c6558efcf03097fd2ef8caf1f01c39a38127aee2904eba0cf0edfb711e6","snapshots/stock-harness-hire.json":"61630a0e0521f8ccca30753bde385b731f5c8c15cf6280b000947e80acf3decf","snapshots/stock-harness.json":"bc95a45aab085ce3eee988a9b235281b847cd8cb73c4d294ce576b97e73d879f","snapshots/stock-harness-preflight.json":"4daf4cd83a8b1539ab8a8db2fd5cf204746884d8cde04f6507acfff5be75ef11"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.runner-codex.local.continuity-restart","profile":"runner-codex","case":"continuity-restart","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"native","durationMs":84362,"providerDurationMs":35132,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":3,"runsWithReportedCost":3,"inputTokens":315100,"outputTokens":2339,"cachedInputTokens":231408,"totalTokens":548847,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":35132,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"dbf2e14fcda52d2a33808e5a4c226d45f864752274c823c26beb7c2ea5409f03","evidence-manifest.json":"86a34f1a25854354bee0d9f0ea88cab9ba9b51476cf274d12f5b491a9910188a","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"a38cab643c78fde9d61d15074b82297b94bf46ae5c3296aa06e6958f67188eda","snapshots/stock-harness.json":"2d148d3e55c57619bde56558f7e87e85cbb1305e46eba83bedb21c3ee4b43b54","snapshots/stock-harness-preflight.json":"9517ef436cc83da9078dd75587f01be8a28685131c37773dc092cf89c137ca0c"}},
+ {"executionId":"stock-harness.runner-codex.local.ordered-comment-continuation","profile":"runner-codex","case":"ordered-comment-continuation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"native","durationMs":92663,"providerDurationMs":70832,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":428674,"outputTokens":3591,"cachedInputTokens":372482,"totalTokens":804747,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":70832,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"8c7a81172e0d519ffc8aca9a3025c88166d93d12a1744e560813c66063d6d130","evidence-manifest.json":"b495ad141c12f2458e3b66123cb673dec68511bcb5c2d59af78400dc67c417eb","snapshots/context-integrity.json":"166eb5a26fa389529287aa940c4e3caa85665ea67fcce019bc69a8bb8d9f7b41","snapshots/stock-harness-hire.json":"2fe4b0d207648628658312e97b491336929197f826c00dce012b6afc43537564","snapshots/stock-harness.json":"79b83fed61c69589d38b48552b04dce41bf41dca27f6e7f5dd15229024b6338f","snapshots/stock-harness-preflight.json":"689ce3141b2c6970eac5468885e5111daa730bcda25a1459e7bac4177650045e"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}},
+ {"executionId":"stock-harness.runner-opencode.local.assigned-skill-explicit-invocation","profile":"runner-opencode","case":"assigned-skill-explicit-invocation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"native","durationMs":90297,"providerDurationMs":68028,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":1,"inputTokens":44259,"outputTokens":1165,"cachedInputTokens":62976,"totalTokens":108400,"reportedCostUsd":0.0020380985,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":68028,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.0020380985,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.0020380985,"complete":true},"billingTypes":["unknown"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"3ffa3bff50fbade8801da7c26ffed426eee9bda9a7e3640793f03a220f74ea82","evidence-manifest.json":"6df0c3b49ef54154721d4d0ba434f893fcba372ba8588fef2bd1a5947284b1d3","snapshots/context-integrity.json":"41b60c88adb0c529148981a55ab3b18964035b47786da50942183b58e8884fed","snapshots/stock-harness-hire.json":"c9a2fe249e217fcd5c205f1dc768446333932de74d87dc6f4a1e7855c5e4d815","snapshots/stock-harness.json":"474b0d6aecd8e8bce23f78c260ad4dc83c286d1d39917ea0920ad4b402d9404b","snapshots/stock-harness-preflight.json":"baeb38686ea4d3233906d83a889fdf3d805846b27f25c6c04da68842822a496d"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.runner-opencode.local.continuity-restart","profile":"runner-opencode","case":"continuity-restart","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"native","durationMs":155833,"providerDurationMs":101201,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":3,"runsWithReportedCost":3,"inputTokens":48028,"outputTokens":96,"cachedInputTokens":23808,"totalTokens":71932,"reportedCostUsd":0.0004892436,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":101201,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.0004892436,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.0004892436,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"57fe32615f16ff3706044419bb81362a67ec35aed7a5f74a5b8207b5831a5cba","evidence-manifest.json":"07e3be863cc20a1352a094f38e6133004dbfd673f4fd59599431a022ce061ff1","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"d127504476aee2130312fdf092a523060188066abe9f969ae9b178b57374cced","snapshots/stock-harness.json":"0df941763ed917e2c553a6c6a4dfb0c87bdb7181d42a28f614c765906b74f1e9","snapshots/stock-harness-preflight.json":"f57655c970472d2a9b9bebe100d8c31788ed76e06da4363046a5a6d3f09269bb"}},
+ {"executionId":"stock-harness.runner-opencode.local.ordered-comment-continuation","profile":"runner-opencode","case":"ordered-comment-continuation","sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceRef":"refs/heads/codex/stock-harness-previous-instructions","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042864888","cellAttempt":1,"status":"failed","failureClass":"candidate_failure","causeCodes":["deadline_or_run_start_timeout"],"failedMatcherPaths":["contextIntegrity.comments-queued-as-batch","contextIntegrity.initial-run-started","contextIntegrity.ordered-comments","contextIntegrity.changed-scope-preserved","contextIntegrity.packing-report-order","contextIntegrity.final-scope-applied","contextIntegrity.continuation-run-count","contextIntegrity.continuation-wake-comment-ids","contextIntegrity.single-durable-output","contextIntegrity.completed-task","contextIntegrity.successful-runs"],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"native","durationMs":721578,"providerDurationMs":446042,"cleanup":"passed","billing":{"llm":{"runCount":11,"runsWithTokenUsage":11,"runsWithReportedCost":11,"inputTokens":159917,"outputTokens":7291,"cachedInputTokens":1077987,"totalTokens":1245195,"reportedCostUsd":0.015645790399999998,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":446042,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.015645790399999998,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.015645790399999998,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"12c5433c67dc2e62916b879349c7ba2b6e0431f0","sourceFingerprint":"2e5f22848450179ac2d573662c718300f86a935d09d15204c9d97e98f65b53f4","passed":true,"providerCallsBeforeAdmission":0,"passedTests":536},"evidenceHashes":{"result.json":"f727dd5f76162c4b995e649e1a7bf55a52381efa550e3bda46ec0a51a899d178","evidence-manifest.json":"6a550c598b67f60fcea70d56907c4a2c84239bc0d01e58737e99a0014144bb70","snapshots/context-integrity.json":"14212826847fbd9d6d63c7b70afb102fdb5d0100f7d8f1368d46ff6f5e32db07","snapshots/stock-harness-hire.json":"ab6dd2377fc251e44ed8f3680d40d10a315b635f3003e45501c7496037fb21ca","snapshots/stock-harness.json":"38759bca194a8038f0d2be4598e50a04d61215ecabdfec95cd7f6cfa4eeec61c","snapshots/stock-harness-preflight.json":"312611057436fd8cbdcc5179ffa5e62144800a6a9244e646bb6e0b3a9a0cb551"},"taskDocumentCount":null,"behaviorCheckCounts":{"passed":1,"failed":11}}
+ ],
+ "candidate": [
+ {"executionId":"stock-harness.legacy-acp-claude.local.assigned-skill-explicit-invocation","profile":"legacy-acp-claude","case":"assigned-skill-explicit-invocation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/reduce-default-agent-manual","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042856368","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard","no_single_paperclip_document"],"failedMatcherPaths":["contextIntegrity.single-durable-output"],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":123175,"providerDurationMs":111928,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":25333,"outputTokens":5771,"cachedInputTokens":316215,"totalTokens":347319,"reportedCostUsd":0.2838505,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":111928,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.2838505,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.2838505,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":10966,"reportedPromptChars":10449,"freshPromptChars":787,"retrievalClipped":false},{"capturedPromptChars":6028,"reportedPromptChars":5498,"freshPromptChars":787,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"2a5fed84ee0f95a67e2c2b0d4247ffae33e16a7c2aa11dc57b11228e0db90965","evidence-manifest.json":"7e31c707e866e15bf44a276ac252c423a47a63364e76ad85de9a8d5b6a4e1dfd","snapshots/context-integrity.json":"3c36c18d5e257e788514c02b50d63c7c69885201df0a07750129d55c0f583676","snapshots/stock-harness-hire.json":"2d128826b4e5068ad6ed819512bcb17160346becd9344b8ab8e70c984c3241b7","snapshots/stock-harness.json":"49b8da640ab0b9dd2b209ce0cf9f3bec6deceb801bfe98c0166d7702a9732a80","snapshots/stock-harness-preflight.json":"a12fdf9b8b7d761ff223e30dcaeb835ad9bf32ef7f1c8b8983a638d175c2ab5f"},"taskDocumentCount":0,"behaviorCheckCounts":{"passed":6,"failed":1}},
+ {"executionId":"stock-harness.legacy-acp-claude.local.continuity-restart","profile":"legacy-acp-claude","case":"continuity-restart","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/reduce-default-agent-manual","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042856368","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard"],"failedMatcherPaths":[],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":34813,"providerDurationMs":18798,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":16797,"outputTokens":329,"cachedInputTokens":54375,"totalTokens":71501,"reportedCostUsd":0.092943,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":18798,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.092943,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.092943,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":13201,"reportedPromptChars":12723,"freshPromptChars":787,"retrievalClipped":false},{"capturedPromptChars":13233,"reportedPromptChars":12755,"freshPromptChars":787,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"ecab7c9f83668fd4712702bb906adf38e188e34f7f07bd7d746da685339a2ecd","evidence-manifest.json":"544a726ddf3ac212671f7c3d73dafcf94cd5b3abb9a3ad5197d6c793e9d7aaa0","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"78f5c467789921db4d2194ba80459524b04644f2d8d8a3b8678fdf7686004e8f","snapshots/stock-harness.json":"61641e5e25351e748afb2e4533d70b1cc34a8b78e1fbc56a27d96b2017bd0f45","snapshots/stock-harness-preflight.json":"4e522117d8489a16263c3d66ca513207217a7861733bfd11ef2f7149aef680e9"}},
+ {"executionId":"stock-harness.legacy-acp-claude.local.ordered-comment-continuation","profile":"legacy-acp-claude","case":"ordered-comment-continuation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/reduce-default-agent-manual","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042856368","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard"],"failedMatcherPaths":[],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":154765,"providerDurationMs":139409,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":61445,"outputTokens":6979,"cachedInputTokens":562903,"totalTokens":631327,"reportedCostUsd":0.5120724,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":139409,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.5120724,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.5120724,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":13419,"reportedPromptChars":12915,"freshPromptChars":787,"retrievalClipped":false},{"capturedPromptChars":6390,"reportedPromptChars":5912,"freshPromptChars":787,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"9c23fec76e718c1fa5f775ae8cdcee1e5433039ff74d7ffbf306b5be6693700d","evidence-manifest.json":"5284aba88b923322b1f162045d20e36236fb731689527a1a1d06d5305efd4a64","snapshots/context-integrity.json":"8fef43dac791a84db62bfea8977f586afe3e5dc5c36225eaab79faaa15b4dfca","snapshots/stock-harness-hire.json":"4961a6103fcb6b58d5d65981c68afa178ea9e1eb6038ad3b3049d47e4bc737ab","snapshots/stock-harness.json":"4e11dd1b37581fed8628b7ebd953ebf3b6fe389d357ffd2efcd9e6b976e4d64a","snapshots/stock-harness-preflight.json":"7d962ba46f4f02f111ed4e423705009f38ee99096d180b693f4c41ed4c805126"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}},
+ {"executionId":"stock-harness.legacy-acp-codex.local.assigned-skill-explicit-invocation","profile":"legacy-acp-codex","case":"assigned-skill-explicit-invocation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/reduce-default-agent-manual","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042856368","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard"],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":65745,"providerDurationMs":49358,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":0,"inputTokens":1379,"outputTokens":34,"cachedInputTokens":41987,"totalTokens":43400,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":49358,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["metered_api"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":5509,"reportedPromptChars":5533,"freshPromptChars":786,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"81c5c35a942c78a2c9d7d77064264504311a191c6dd421e656d4f0751670b6ff","evidence-manifest.json":"bff59a88d627186d18282fe39822dd5a57d3a2396ae9aca5fa178a3b4ac3cf60","snapshots/context-integrity.json":"3809130fd34f0b6035ed5b17bd9e354d19aac02fc2f64aea01811803151c7f82","snapshots/stock-harness-hire.json":"4e0468ee05d56f08faa9ffbe3ed6cf28c07490a8b27a08e80875264dc66daac5","snapshots/stock-harness.json":"c5a82192ff53c6eec7a5497602a9969af3c21ea7fde8fdff4309025f5ccf80d2","snapshots/stock-harness-preflight.json":"12944d93aac9f8688d2832369f7eadc10a9546a6fb6bc2f2d8b3caef38b0cc2f"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.legacy-acp-codex.local.continuity-restart","profile":"legacy-acp-codex","case":"continuity-restart","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/reduce-default-agent-manual","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042856368","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard","structural_receipt_incomplete"],"failedMatcherPaths":["stockHarness.invocation-evidence-complete"],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":35779,"providerDurationMs":20059,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":1,"runsWithReportedCost":0,"inputTokens":711,"outputTokens":30,"cachedInputTokens":31118,"totalTokens":31859,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":20059,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":false,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":12764,"reportedPromptChars":12788,"freshPromptChars":786,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"1c59fb6b3845ef6bc4f9cc549826e45334b3220ce5832f2fe4b9d23fd45136b6","evidence-manifest.json":"4cdd7cc5bb0a025e7626e947dd72558c13203aa9dc9765f5afbfed5acc907de1","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"dcbe621edcd9437c47361c74676db38a240fdcaff2401d41213a185e7cf9b785","snapshots/stock-harness.json":"8908438e0c7565ebca6d4753e619f87bd0c015210214fbb8c39876d7e13cebaa","snapshots/stock-harness-preflight.json":"3b2de5b161384bebe03f7cad3b3268f98cca291cd8fbf4b8a0c830536daecf87"}},
+ {"executionId":"stock-harness.legacy-acp-codex.local.ordered-comment-continuation","profile":"legacy-acp-codex","case":"ordered-comment-continuation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"failed","failureClass":"secret_leak","causeCodes":["persisted_credential_guard"],"failedMatcherPaths":["contextIntegrity.comments-queued-as-batch","contextIntegrity.initial-run-started","contextIntegrity.ordered-comments","contextIntegrity.changed-scope-preserved","contextIntegrity.packing-report-order","contextIntegrity.final-scope-applied","contextIntegrity.continuation-run-count","contextIntegrity.continuation-wake-comment-ids","contextIntegrity.single-durable-output","contextIntegrity.completed-task","contextIntegrity.successful-runs"],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":720307,"providerDurationMs":46665,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":0,"inputTokens":540,"outputTokens":28,"cachedInputTokens":32395,"totalTokens":32963,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":46665,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["metered_api"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":5923,"reportedPromptChars":5947,"freshPromptChars":786,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"a1285f2fecccdcdac85360784e4be82188b564d3135f7adf6606fa1451307376","evidence-manifest.json":"39864272e9331c88c1266f2b5f05b755aacdc46c2c7015c4d4df8539c0a22718","snapshots/context-integrity.json":"5e663656093c672fb294719edb8636dd15a5ed1441912f32a32c78254663b797","snapshots/stock-harness-hire.json":"35d859103bf2acb7c7f6d212a8ce277e42726da388f7c52ee0b05d600dc09c78","snapshots/stock-harness.json":"483b4efedcc34570ad0ad364d92ba0212186cbc36a704639106e181402470468","snapshots/stock-harness-preflight.json":"5bb04e0c93a3f4ac5d9f41a5775fba85e0687a8161e255257545d54151421c62"},"taskDocumentCount":null,"behaviorCheckCounts":{"passed":1,"failed":11}},
+ {"executionId":"stock-harness.legacy-claude.local.assigned-skill-explicit-invocation","profile":"legacy-claude","case":"assigned-skill-explicit-invocation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/reduce-default-agent-manual","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042856368","cellAttempt":1,"status":"failed","failureClass":"candidate_failure","causeCodes":["no_single_paperclip_document"],"failedMatcherPaths":["contextIntegrity.single-durable-output"],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":37720,"providerDurationMs":25763,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":1,"inputTokens":27376,"outputTokens":1281,"cachedInputTokens":184039,"totalTokens":212696,"reportedCostUsd":0.17707545,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":25763,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.17707545,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.17707545,"complete":true},"billingTypes":["metered_api"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":3611,"reportedPromptChars":3611,"freshPromptChars":783,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"8636a50a54d39fd66b1439f13ce5ac125b79f16b2826f76fc297427a1a2ab701","evidence-manifest.json":"d1d7f47272981406d104f5ae6455d5b0a4f6113f3c3d02fc8bc787d7c8fc70fc","snapshots/context-integrity.json":"eac7d7b889e5cc3861b937ffa87c7b92d25ade5b0f2bb73bdd29b5764c2a085a","snapshots/stock-harness-hire.json":"545030ff52d9196a604e099b81b52a3071f582f2467284c695eb62d96589c67c","snapshots/stock-harness.json":"c9ca463a792c7dccd00c0795c1e405495d9e1dff30b2cbae2b5e7bac7114fdd2","snapshots/stock-harness-preflight.json":"c1b5a843459d80e074759600c830c92bb00a0d2430255cda7bed5c22cabc7680"},"taskDocumentCount":0,"behaviorCheckCounts":{"passed":6,"failed":1}},
+ {"executionId":"stock-harness.legacy-claude.local.continuity-restart","profile":"legacy-claude","case":"continuity-restart","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/reduce-default-agent-manual","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042856368","cellAttempt":1,"status":"failed","failureClass":"candidate_failure","causeCodes":["chat_memory_assertion"],"failedMatcherPaths":[],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":28251,"providerDurationMs":11843,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":19490,"outputTokens":298,"cachedInputTokens":50061,"totalTokens":69849,"reportedCostUsd":0.09257055,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":11843,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.09257055,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.09257055,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":10776,"reportedPromptChars":10776,"freshPromptChars":783,"retrievalClipped":false},{"capturedPromptChars":10833,"reportedPromptChars":10833,"freshPromptChars":783,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"86af4c61a239c718181ab58fd815cf7a200e7473b2fe9390b58bc15ff9d6ed4c","evidence-manifest.json":"e1c69d7c6044b0e8ba65fa1b961de84989facb3fd65f6bba42632b22d2a1bab9","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"9a320857e3d1fe14a41b0154b8c1d2cfc81f869ed69790bd729fe7c86e9c54fb","snapshots/stock-harness.json":"9a2d546c992bf9d59711e37e81d841b7b1c73e6e1d62a6f27b5302f1d8ea3980","snapshots/stock-harness-preflight.json":"13318522befc6c0ffcc0d6ca7a0dc12112902427ddc1a7ac36f3ac43e7f83d8d"}},
+ {"executionId":"stock-harness.legacy-claude.local.ordered-comment-continuation","profile":"legacy-claude","case":"ordered-comment-continuation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/reduce-default-agent-manual","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042856368","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"claude-sonnet-4-6","runtimeMode":"legacy","durationMs":158440,"providerDurationMs":139386,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":64318,"outputTokens":7515,"cachedInputTokens":669889,"totalTokens":741722,"reportedCostUsd":0.5548662,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":139386,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.5548662,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.5548662,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":11079,"reportedPromptChars":11053,"freshPromptChars":783,"retrievalClipped":false},{"capturedPromptChars":4025,"reportedPromptChars":4025,"freshPromptChars":783,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"59885705b15fc33517ab7f7a82d9ada2e411c918b10fa5b4ce928498a801e739","evidence-manifest.json":"c2a5be637da0d7ff9436b732d8db72ab1fdce788caf6a40c5973c14a27bcc08a","snapshots/context-integrity.json":"fbee7c1a37b964bcc327ebbf37602bc227bccb7fafdc4296614e178e66016599","snapshots/stock-harness-hire.json":"cf2f8ff4b1eb13c5e5f854ecac27c25826e7a4dbafbc277e8702b8beee6d913f","snapshots/stock-harness.json":"3e8e7c06f0918a896341a38e4613cc1f4caaad4b5ab12c03a8c3e41c4707a82a","snapshots/stock-harness-preflight.json":"6d6716a08fc2ea7d27ee08840fd3290a04a8e85dfed5950b690f4c2267d20a6e"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}},
+ {"executionId":"stock-harness.legacy-codex.local.assigned-skill-explicit-invocation","profile":"legacy-codex","case":"assigned-skill-explicit-invocation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/reduce-default-agent-manual","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042856368","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":44075,"providerDurationMs":27042,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":0,"inputTokens":241944,"outputTokens":2132,"cachedInputTokens":215273,"totalTokens":459349,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":27042,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["metered_api"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":4223,"reportedPromptChars":4223,"freshPromptChars":782,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"b0b26f37d2f0c0342a9a275b22716be190891d1b55e79fa8d33e3f495649a26b","evidence-manifest.json":"446abc91b7366507c4100741d71ace903de0b78149b33e45fa90d39183f71b75","snapshots/context-integrity.json":"85197eb92d34334cc2de658d09d7a7e54d44ab3d2fd81ad87732c88c6610b6b2","snapshots/stock-harness-hire.json":"568453725988fc61d459f96efda07d19ec5c00935d4c4a9ff9557cd0062aef29","snapshots/stock-harness.json":"0c8626740b520687d08b0b1f0aab8a9ead2ebd58290252f05d890f524636f461","snapshots/stock-harness-preflight.json":"9a15351a65076deeb77ccd58216def768a658fc743fd57dc89c3234ff6b36542"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.legacy-codex.local.continuity-restart","profile":"legacy-codex","case":"continuity-restart","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/reduce-default-agent-manual","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042856368","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":62742,"providerDurationMs":10028,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":3,"runsWithReportedCost":0,"inputTokens":91929,"outputTokens":475,"cachedInputTokens":45089,"totalTokens":137493,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":10028,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":2787,"reportedPromptChars":2787,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":2730,"reportedPromptChars":2730,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":11443,"reportedPromptChars":11443,"freshPromptChars":782,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"1ec35f3857350d86d3888c4becf8ce898a59641f3eb9825a0d800970ec7090ad","evidence-manifest.json":"908761dcb779dcd0b95ef78b5e9addb77b211acbc502a1c8fdf793202d309472","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"b7b6f4db7cdc84a795ccfa24df58dd8131fe8a44b3ef1cdaf36dfc6685556da7","snapshots/stock-harness.json":"9a0045bbf4240ddbf08ec0444e08ef70e3ef76399db09075b5316b1fc51ac5bf","snapshots/stock-harness-preflight.json":"cfbae9842e2a045b815a9a7f1fa471f8f9494ec999c91e9808933cbc013c84a4"}},
+ {"executionId":"stock-harness.legacy-codex.local.ordered-comment-continuation","profile":"legacy-codex","case":"ordered-comment-continuation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/reduce-default-agent-manual","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37042856368","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"legacy","durationMs":66403,"providerDurationMs":44175,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":0,"inputTokens":416426,"outputTokens":4483,"cachedInputTokens":353673,"totalTokens":774582,"reportedCostUsd":0,"costStatus":"unpriced"},"runtime":{"provider":"local","agentRunDurationMs":44175,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":false},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":8456,"reportedPromptChars":8430,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":4637,"reportedPromptChars":4637,"freshPromptChars":782,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"71f99ec1b45a57ae40acbd42c55e835f63d9d2329752f6bffcabd4488ecb2a96","evidence-manifest.json":"0c3347aaec6d7c3498e62c19938762c35a6069d31385e5d617174695ab60462e","snapshots/context-integrity.json":"5c08b2af1b27e9255505e917958e7b97856cfbf48cce3bef3b8e792275823b6e","snapshots/stock-harness-hire.json":"ddc6b182c4d53c7cd7f63c906d2a64e6286c54c8b6e9991e0c78da578586d865","snapshots/stock-harness.json":"11a737f54107eb9a9e55234890bce90003f84b258f6d5c8512d65f080edfc52f","snapshots/stock-harness-preflight.json":"d72a98df5a4e00bfa766e85ef28b866d32b89fe2aa9a67e3000ad50ddea47599"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}},
+ {"executionId":"stock-harness.legacy-opencode.local.assigned-skill-explicit-invocation","profile":"legacy-opencode","case":"assigned-skill-explicit-invocation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"failed","failureClass":"candidate_failure","causeCodes":["no_single_paperclip_document"],"failedMatcherPaths":["contextIntegrity.single-durable-output"],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"legacy","durationMs":212558,"providerDurationMs":199337,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":96260,"outputTokens":6708,"cachedInputTokens":172288,"totalTokens":275256,"reportedCostUsd":0.010608548800000001,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":199337,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.010608548800000001,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.010608548800000001,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":8426,"reportedPromptChars":8439,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":4226,"reportedPromptChars":4226,"freshPromptChars":785,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"435f708b59438d1d344130bc9e23b8ddbc93adf74d4e5ea8f049e0f1d06efa72","evidence-manifest.json":"8591f98df496159f99b98659ffdcbdf2e86718dccb4545d461f592bab0626b05","snapshots/context-integrity.json":"e4271e26bb891c3c15f2d54dd5cfba6605ebb4431456d70b4f146bb8eb4e1788","snapshots/stock-harness-hire.json":"6bb95cb92fbb14976b5f6796f530823f6aacdcb1448f89cb8b2ec093125266e2","snapshots/stock-harness.json":"b8a5a04730324a038869e28f79d55dd06ebf12abc2e6366bbfe9218995a6748b","snapshots/stock-harness-preflight.json":"c17087412694993475276a69162a171859dc54afae5b08ab89573cf0637d6e19"},"taskDocumentCount":0,"behaviorCheckCounts":{"passed":6,"failed":1}},
+ {"executionId":"stock-harness.legacy-opencode.local.continuity-restart","profile":"legacy-opencode","case":"continuity-restart","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"legacy","durationMs":69761,"providerDurationMs":19747,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":3,"runsWithReportedCost":3,"inputTokens":12219,"outputTokens":116,"cachedInputTokens":0,"totalTokens":12335,"reportedCostUsd":0.0003185752,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":19747,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.0003185752,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.0003185752,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":3403,"reportedPromptChars":3403,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":3346,"reportedPromptChars":3346,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":11452,"reportedPromptChars":11452,"freshPromptChars":785,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"0e56bb0c46a05efeeffa6feb09f54fe13a33c2c96ab4e7a7ec548a0d80a1a235","evidence-manifest.json":"0e601f9bde1bdb7f44f000704078343a1478046c9eb488f2c8a785cd1d4cebec","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"ab7d6af088306e1d43d4901a370dffa46b16dd4c17c2838a8e9e48a2b8e7a62f","snapshots/stock-harness.json":"2a6eabd1657c89568f890de12840747b544c7385c4363b3016879b07028961fa","snapshots/stock-harness-preflight.json":"539f106844e9421c284944c0b1526d74b0cc8e0905c5960be14cfa77ee17a023"}},
+ {"executionId":"stock-harness.legacy-opencode.local.ordered-comment-continuation","profile":"legacy-opencode","case":"ordered-comment-continuation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"legacy","durationMs":212184,"providerDurationMs":188508,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":177025,"outputTokens":7495,"cachedInputTokens":256512,"totalTokens":441032,"reportedCostUsd":0.011804638700000002,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":188508,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.011804638700000002,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.011804638700000002,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true,"invocation-evidence-complete":true,"generic-procedures-absent":true,"fresh-default-delivered":true},"invocationMetrics":[{"capturedPromptChars":10775,"reportedPromptChars":10736,"freshPromptChars":0,"retrievalClipped":false},{"capturedPromptChars":4640,"reportedPromptChars":4640,"freshPromptChars":785,"retrievalClipped":false}],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"8ca5a9a446dda03100d8ee66c5b9e02fd19c335dfc8cc34f83662aa1181240b9","evidence-manifest.json":"496a392c39d3a75f0287c19a6fc25e7577dee6bfef0e3c7f16801f61574cfa99","snapshots/context-integrity.json":"da023ad1b2e22b1659573e1829cfb273a4d3e329d1b324506dbc73104901ecf7","snapshots/stock-harness-hire.json":"ec6d9274b80d291e8949c71a9bfb1f6fdc88cd78a2094dcad1c0a599ce9b78cd","snapshots/stock-harness.json":"680d3af8a66f473a95905920123f0760aff53eb4ce09cd01393a78b6292178cd","snapshots/stock-harness-preflight.json":"5b79fae54bd6036dab2ad8bf8e8bacb9087e702b363dbbe4af2c58115eea8ead"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}},
+ {"executionId":"stock-harness.runner-acpx-claude.local.assigned-skill-explicit-invocation","profile":"runner-acpx-claude","case":"assigned-skill-explicit-invocation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"claude-sonnet-5","runtimeMode":"native","durationMs":50059,"providerDurationMs":28899,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":1,"inputTokens":10,"outputTokens":1332,"cachedInputTokens":136292,"totalTokens":137634,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":28899,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unknown"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"526b8881ac8dd2b51a788ca6ae535f7cd856e38066fadbd70737071c4f898abf","evidence-manifest.json":"40dc320ecab36c004d5e33bba8ebe1fb4d8444fd23d7ef0f055b188b474fffca","snapshots/context-integrity.json":"0b0b2b42376e1c5cf58b6ae1e9e0960b6b2bc82218e20589e04ca44639207ecb","snapshots/stock-harness-hire.json":"7f47075f11209d29c92091925bb61b2e2e22b06e1ce49b7dba69060242d62fc5","snapshots/stock-harness.json":"06398532782d5e4c9eb76ef55cdc87ed8d49c6f31dc06f09ce28715aa09f76fa","snapshots/stock-harness-preflight.json":"cb1980515ce11e2b55fcea5799277f511d0c6d01bf26b78e93be3ae17fa9b08d"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.runner-acpx-claude.local.continuity-restart","profile":"runner-acpx-claude","case":"continuity-restart","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"claude-sonnet-5","runtimeMode":"native","durationMs":93902,"providerDurationMs":43211,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":3,"runsWithReportedCost":3,"inputTokens":6,"outputTokens":101,"cachedInputTokens":92222,"totalTokens":92329,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":43211,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"332ba05ee7cda6971777af3454e8589652f742f45cd6350da4396a420e8c549f","evidence-manifest.json":"eaff7dd508a80dffef9d638a39e13b21d2ef427086ae478c10520c2b336fe881","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"e8a854b3a0d886b01cb910e5b05baa5f1c791ef57b9a04168a0ce65cc60df7ce","snapshots/stock-harness.json":"1e53449e403bc079887cd183e2b556fbecd238a20130ef07c0c5decf499ff4ae","snapshots/stock-harness-preflight.json":"02283c369f44ab85a6400e0659da00e48bee84727fcebc35a8a691c4529c7cc0"}},
+ {"executionId":"stock-harness.runner-acpx-claude.local.ordered-comment-continuation","profile":"runner-acpx-claude","case":"ordered-comment-continuation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"claude-sonnet-5","runtimeMode":"native","durationMs":93050,"providerDurationMs":70393,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":18,"outputTokens":3794,"cachedInputTokens":332880,"totalTokens":336692,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":70393,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"3aae7a7ca62c39c74ac6d12e71b6b75223c76112ea018b8d08db1da52ea72e6a","evidence-manifest.json":"f08a3eee09a8fd4b279865dbe8f9ab2a66cc1a79addb216fe484561fcb9e2467","snapshots/context-integrity.json":"400df6ee5a9294998d4306f6eab6816e86155d8ecf0f39a6fc672381d47d423f","snapshots/stock-harness-hire.json":"604c41ac65944ef25cb7bbbf19941401139ed422342d7d6ebf9a07b79ecf7a75","snapshots/stock-harness.json":"f17d4f47657a0151dbfc585de64e338b7f79deae052f454794c2b934a7d398a2","snapshots/stock-harness-preflight.json":"fa502f0e3a3467dab6b04f810e6001ca635ce2d4bb5bae42a50e7a85f520a356"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}},
+ {"executionId":"stock-harness.runner-codex.local.assigned-skill-explicit-invocation","profile":"runner-codex","case":"assigned-skill-explicit-invocation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"native","durationMs":48064,"providerDurationMs":26079,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":1,"inputTokens":133429,"outputTokens":1102,"cachedInputTokens":110284,"totalTokens":244815,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":26079,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unknown"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"690736dbf71179913631255763fd7b8aecd825236532154e54a3e1e53240d6b2","evidence-manifest.json":"75135aa0e7020617f54b5f2f593a5d48669ac7ecc864064d1eefc91af86d431c","snapshots/context-integrity.json":"46e65857a4d82f6ad900bc7e89166c35f2543faa368e48130f83dcea526ca65e","snapshots/stock-harness-hire.json":"2bf564606e974bb38baf50e363edd6d11aa5009fd429602a44fecb337bf9036c","snapshots/stock-harness.json":"2bf943a7cba0fc3886a04fa96f5646677f427e516232b35f6538384f4e6ed39f","snapshots/stock-harness-preflight.json":"635be5d6d578d7ad95b0e87697b939ed10f3cf2d3338caedc94350a1ed67ccc9"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.runner-codex.local.continuity-restart","profile":"runner-codex","case":"continuity-restart","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"native","durationMs":89776,"providerDurationMs":43862,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":3,"runsWithReportedCost":3,"inputTokens":460440,"outputTokens":2336,"cachedInputTokens":378421,"totalTokens":841197,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":43862,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"b32c6c2c10d1eaabd0e2408db313bf9f30a7a60413733ef8ddfd8114ff6f2fdb","evidence-manifest.json":"34a60f60f021a731a98fab708ac31e344d8ecfa5a1d7dc72daa8c957028cbcea","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"855403ffdcaa2f1542a5ebbc0dbd7590c609c170afc657884eeb9a1e79a51310","snapshots/stock-harness.json":"d4997c371e7db1a9e1c13536279480035eee7873e92a3ab3300969d508339481","snapshots/stock-harness-preflight.json":"642913765f2dfb9bbae2f46401448e4c3b6d3f9134cba2a073178d530c395efc"}},
+ {"executionId":"stock-harness.runner-codex.local.ordered-comment-continuation","profile":"runner-codex","case":"ordered-comment-continuation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"gpt-5.6-sol","runtimeMode":"native","durationMs":85296,"providerDurationMs":64569,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":359345,"outputTokens":2627,"cachedInputTokens":307813,"totalTokens":669785,"reportedCostUsd":0,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":64569,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"1a1a5f9b53dfc8cd2d96bafb8b34f6b1ac006514da70963ea3d8328f1c594309","evidence-manifest.json":"5220dd721a29958a2dbc6139a33bed2c94765801181c795abca6118722204f7b","snapshots/context-integrity.json":"100d34aa2c461b540164a00442100d5f6f438f706d14fb7316d80bf07d680cd8","snapshots/stock-harness-hire.json":"103296d40bc0b4500fa9b45ffb1e8192b770a1d4f87f8d0dd4f9e309384d407c","snapshots/stock-harness.json":"8d1eea8270fd2c29e284db9af321bebe85e635f6ec77d56674466d1480012ba8","snapshots/stock-harness-preflight.json":"be022954d2b5f5ef0bdae4cd892f06163f9d0863d0201aa92a5bab12f56a4dac"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}},
+ {"executionId":"stock-harness.runner-opencode.local.assigned-skill-explicit-invocation","profile":"runner-opencode","case":"assigned-skill-explicit-invocation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"native","durationMs":69432,"providerDurationMs":45144,"cleanup":"passed","billing":{"llm":{"runCount":1,"runsWithTokenUsage":1,"runsWithReportedCost":1,"inputTokens":22870,"outputTokens":1171,"cachedInputTokens":105472,"totalTokens":129513,"reportedCostUsd":0.0021534242,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":45144,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.0021534242,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.0021534242,"complete":true},"billingTypes":["unknown"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"69ac8808e939a796c40ac3665d56b152b43747fa91b7bbc84fd0a0f2fc68f5d9","evidence-manifest.json":"a0af2ef7ba4653d7ec825ac12de2a9e5f8b7fd7042bcfbe215e8af1b75ad38f8","snapshots/context-integrity.json":"e82ea3b31d4c6c73a95715c1d0e31338eb31a50f760bb6ea99b1d21032c6da32","snapshots/stock-harness-hire.json":"87ec7c1456344be2ed5cf68d4813920e8204fc483c6a34b1b62116bd721d9073","snapshots/stock-harness.json":"11cb4a18967ee59a7d5c202ee590a8dcfa7a9c145ab5ac87cde8da6a69f25497","snapshots/stock-harness-preflight.json":"c044805c4bb0db4c3cac0a4bbf54b937da7d1d376a4ac319f4d2baf3c636f51c"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":7,"failed":0}},
+ {"executionId":"stock-harness.runner-opencode.local.continuity-restart","profile":"runner-opencode","case":"continuity-restart","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"native","durationMs":152945,"providerDurationMs":93715,"cleanup":"passed","billing":{"llm":{"runCount":3,"runsWithTokenUsage":3,"runsWithReportedCost":3,"inputTokens":26520,"outputTokens":106,"cachedInputTokens":45312,"totalTokens":71938,"reportedCostUsd":0.0005020232,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":93715,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.0005020232,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.0005020232,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"ae12b2eee65f45b8e2f530c037002e91db351134b6848da89e80bf7c15eb25a3","evidence-manifest.json":"dce1906b35fbbe6ac471ef922a2f0b1bae9da9438d56e78894e3651cba402aaa","snapshots/context-integrity.json":null,"snapshots/stock-harness-hire.json":"a57da515e6454ee8b82b9bf633a8e07097217f30555606538e135c7979de71c0","snapshots/stock-harness.json":"fa0501dbd07065bbbbd9a1f4c6bd82ba27f0fa45238790d531db4587c000309d","snapshots/stock-harness-preflight.json":"a20db2a5478fb7bd568bf6fcfbe7702dbe2a7a0390d9b36ec0fe2a6d07954d1b"}},
+ {"executionId":"stock-harness.runner-opencode.local.ordered-comment-continuation","profile":"runner-opencode","case":"ordered-comment-continuation","sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceRef":"refs/heads/codex/stock-harness-candidate-cancelled-cells","workflowRunUrl":"https://github.com/paperclipai/paperclip/actions/runs/37045368302","cellAttempt":1,"status":"passed","failureClass":null,"causeCodes":[],"failedMatcherPaths":[],"model":"openrouter/deepseek/deepseek-v4-flash-0731","runtimeMode":"native","durationMs":95671,"providerDurationMs":72942,"cleanup":"passed","billing":{"llm":{"runCount":2,"runsWithTokenUsage":2,"runsWithReportedCost":2,"inputTokens":24355,"outputTokens":2690,"cachedInputTokens":160512,"totalTokens":187557,"reportedCostUsd":0.0043860217,"costStatus":"reported"},"runtime":{"provider":"local","agentRunDurationMs":72942,"leaseDurationMs":null,"leaseCount":0,"costStatus":"not_metered","costSource":"local_not_metered"},"reportedCostUsd":0.0043860217,"estimatedRuntimeCostUsd":0,"observedAndEstimatedCostUsd":0.0043860217,"complete":true},"billingTypes":["unavailable"],"stockChecks":{"budget-hard-stops":true,"default-hire-bundle":true,"provider-runs-present":true},"invocationMetrics":[],"prerequisite":{"sourceSha":"f02d8d0df327abb43b20c7e7beb86798239abbf5","sourceFingerprint":"ea488f1e5f67865c0e08e3628eb3081b86c6b3a8e40631702697ffac08359211","passed":true,"providerCallsBeforeAdmission":0,"passedTests":537},"evidenceHashes":{"result.json":"54f3029b581b82be87bd30b7670029bd5722915917e4bcab2e8ef0682bc3c0be","evidence-manifest.json":"b793fa707ccc2125b192816d59e922a0d43348c11eb516b8dff7e5d445b5545b","snapshots/context-integrity.json":"105ff5eb813ac3779e3ba04a8115ce1495c185011de4735782d3c4adba99787e","snapshots/stock-harness-hire.json":"4dde5055f48fff1b4cf466b4307739c967e2595e3c2e93d4e07230545741fa16","snapshots/stock-harness.json":"b0ce3eb0edce09ca4ef61af6f622cddd7c9bb1a3286c9ea7756dc228d00c10fa","snapshots/stock-harness-preflight.json":"78f2298b3bb4357b2a3ce6d75a922fc34d6449ef43378bb0dcc40476469daa01"},"taskDocumentCount":1,"behaviorCheckCounts":{"passed":12,"failed":0}}
+ ],
+ "totals": {
+ "baseline": {
+ "results": 24,
+ "passed": 15,
+ "failed": 9,
+ "missing": 0,
+ "cleanupPassed": 24,
+ "durationMs": 3250195,
+ "providerDurationMs": 2108034,
+ "llm": {
+ "runCount": 58,
+ "runsWithTokenUsage": 52,
+ "runsWithReportedCost": 43,
+ "inputTokens": 2778581,
+ "outputTokens": 68015,
+ "cachedInputTokens": 6908917,
+ "reportedCostUsd": 1.7494252618000001
+ }
+ },
+ "candidate": {
+ "results": 24,
+ "passed": 15,
+ "failed": 9,
+ "missing": 0,
+ "cleanupPassed": 24,
+ "durationMs": 2804913,
+ "providerDurationMs": 1540860,
+ "llm": {
+ "runCount": 47,
+ "runsWithTokenUsage": 45,
+ "runsWithReportedCost": 36,
+ "inputTokens": 2280185,
+ "outputTokens": 58933,
+ "cachedInputTokens": 4655025,
+ "reportedCostUsd": 1.7431513318
+ }
+ }
+ },
+ "matchedPassingTiming": {
+ "baseline": {
+ "cells": 13,
+ "medianCellDurationMs": 85550,
+ "medianProviderDurationMs": 57150
+ },
+ "candidate": {
+ "cells": 13,
+ "medianCellDurationMs": 69761,
+ "medianProviderDurationMs": 43862
+ }
+ },
+ "missingBaseline": [],
+ "cancellationRecovery": {
+ "sourceSha": "f02d8d0df327abb43b20c7e7beb86798239abbf5",
+ "originalRun": 37042856368,
+ "reason": "superseding pilot cancelled incomplete cells; completed behavior failures not rerun",
+ "executionIds": [
+ "stock-harness.legacy-acp-codex.local.ordered-comment-continuation",
+ "stock-harness.legacy-opencode.local.ordered-comment-continuation",
+ "stock-harness.legacy-opencode.local.continuity-restart",
+ "stock-harness.runner-acpx-claude.local.continuity-restart",
+ "stock-harness.legacy-opencode.local.assigned-skill-explicit-invocation",
+ "stock-harness.runner-acpx-claude.local.assigned-skill-explicit-invocation",
+ "stock-harness.runner-acpx-claude.local.ordered-comment-continuation",
+ "stock-harness.runner-codex.local.continuity-restart",
+ "stock-harness.runner-codex.local.ordered-comment-continuation",
+ "stock-harness.runner-codex.local.assigned-skill-explicit-invocation",
+ "stock-harness.runner-opencode.local.assigned-skill-explicit-invocation",
+ "stock-harness.runner-opencode.local.continuity-restart",
+ "stock-harness.runner-opencode.local.ordered-comment-continuation"
+ ]
+ },
+ "baselineInfrastructureRecovery": {
+ "schema": "paperclip.stock-harness.infra-recovery/v1",
+ "sourceSha": "12c5433c67dc2e62916b879349c7ba2b6e0431f0",
+ "originalRun": 37042864888,
+ "originalJob": 110958906481,
+ "reason": "AWS runner shutdown, no result artifact; no completed model failure rerun",
+ "executionIds": [
+ "stock-harness.legacy-opencode.local.ordered-comment-continuation"
+ ]
+ },
+ "layoutRecovery": {
+ "resultEdits": 0,
+ "oracleEdits": 0,
+ "originalEvidenceRetained": true,
+ "manifests": [
+ {
+ "campaign": "candidate-original",
+ "sha256": "9135457cdc339d2fcaeea52cd06622ecaea6a74561df73d4d7a0baa0d8c0e7cc"
+ },
+ {
+ "campaign": "baseline-final",
+ "sha256": "85223428a0d473ba83e324621e80d711725ebe069c4f055665b0bf987d1f0c4c"
+ },
+ {
+ "campaign": "candidate-recovery",
+ "sha256": "7788f879d0cf1d140d452cfa78fe085b34bc23d298d7c31cac9d630b12b2572f"
+ },
+ {
+ "campaign": "baseline-recovery-final",
+ "sha256": "e39d62dd60f092e76f8776e844041f2458fca1989854d57ab13932a36c937ceb"
+ }
+ ]
+ },
+ "limitations": [
+ "Single trial per cell; not general coding quality or statistical proof.",
+ "Skill task document storage wording is ambiguous; original graders unchanged.",
+ "Persisted credential guard failures are not equivalent to poor task behavior.",
+ "Report costs are incomplete; zero reported native cost has unknown billing type.",
+ "Local runtime and interrupted partial attempts are not metered.",
+ "Historical public prompt retrieval is clipped in three ACP cells; missing suffix does not prove provider omission.",
+ "Reconstructed reports use separate copies with directory-layout-only repair; original public reports retain infrastructure failures."
+ ],
+ "fixtureMatchProof": {
+ "schema": "paperclip.stock-harness.fixture-match-proof/v1",
+ "cells": [
+ {
+ "executionId": "stock-harness.legacy-codex.local.ordered-comment-continuation",
+ "fixtureConfigSha256": "f727e68de06dec501c49efc41ab941bd6d63826db82e615d5e60f2d20133b488",
+ "model": "gpt-5.6-sol"
+ },
+ {
+ "executionId": "stock-harness.legacy-codex.local.assigned-skill-explicit-invocation",
+ "fixtureConfigSha256": "ca51e8b29aab8e6efa32f2433c0f3960e43f9fc2f5edcd0660e753810d71f30d",
+ "model": "gpt-5.6-sol"
+ },
+ {
+ "executionId": "stock-harness.legacy-codex.local.continuity-restart",
+ "fixtureConfigSha256": "8b1669039f3285f89a7f93c57e1c0dc12f071fbb2bbc8dcef6bf70bc14a4949a",
+ "model": "gpt-5.6-sol"
+ },
+ {
+ "executionId": "stock-harness.legacy-claude.local.ordered-comment-continuation",
+ "fixtureConfigSha256": "94db17927ceddb54fe7766a362adcf78783726c68e1e136e407572aef6fed319",
+ "model": "claude-sonnet-4-6"
+ },
+ {
+ "executionId": "stock-harness.legacy-claude.local.assigned-skill-explicit-invocation",
+ "fixtureConfigSha256": "6c21be9bb3fcec6274372fc586d88e42d82bc0d438e26a69ef614f8e6fcb8519",
+ "model": "claude-sonnet-4-6"
+ },
+ {
+ "executionId": "stock-harness.legacy-claude.local.continuity-restart",
+ "fixtureConfigSha256": "695071e5453c90288659f54f40fb307486f64d5fb8a401b767d2e9974faab15f",
+ "model": "claude-sonnet-4-6"
+ },
+ {
+ "executionId": "stock-harness.runner-codex.local.ordered-comment-continuation",
+ "fixtureConfigSha256": "9e19859684aad0246fd009061101eec59c41179e51e92a9467f506af22558126",
+ "model": "gpt-5.6-sol"
+ },
+ {
+ "executionId": "stock-harness.runner-codex.local.assigned-skill-explicit-invocation",
+ "fixtureConfigSha256": "8fc61211aefb339a310469695d716c3faea15c2a547c543d70c599857a7e071d",
+ "model": "gpt-5.6-sol"
+ },
+ {
+ "executionId": "stock-harness.runner-codex.local.continuity-restart",
+ "fixtureConfigSha256": "024e90354d760f90a40e2b3923468b72d36a9fabdb4fc58c10a7939a09e5cbc3",
+ "model": "gpt-5.6-sol"
+ },
+ {
+ "executionId": "stock-harness.runner-opencode.local.ordered-comment-continuation",
+ "fixtureConfigSha256": "9dd6fef8fea77b07a67681acc1d7866fac9b4f16e23aca69eda32a4656cc260b",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731"
+ },
+ {
+ "executionId": "stock-harness.runner-opencode.local.assigned-skill-explicit-invocation",
+ "fixtureConfigSha256": "891eb6dd154aa5926a3de2eae79780661b436618b6eac7733998750c6c341ba3",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731"
+ },
+ {
+ "executionId": "stock-harness.runner-opencode.local.continuity-restart",
+ "fixtureConfigSha256": "441c2fa8bdd26cf14ac2440311b99a71b7dd6202698cafc3d01ed7a91dc4b004",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731"
+ },
+ {
+ "executionId": "stock-harness.runner-acpx-claude.local.ordered-comment-continuation",
+ "fixtureConfigSha256": "77cc32714b23852d3ef67c687202d89f7513275500b3c522a0a1de3d745c9c4e",
+ "model": "claude-sonnet-5"
+ },
+ {
+ "executionId": "stock-harness.runner-acpx-claude.local.assigned-skill-explicit-invocation",
+ "fixtureConfigSha256": "c190a1e731ef450ea6ae0c24b5a8ae0f21db725b47350645cdbb9273415c5acd",
+ "model": "claude-sonnet-5"
+ },
+ {
+ "executionId": "stock-harness.runner-acpx-claude.local.continuity-restart",
+ "fixtureConfigSha256": "40876df6f88f34ba8232ccba8816bf7e1173be0042a90a174f79cddcca346c4c",
+ "model": "claude-sonnet-5"
+ },
+ {
+ "executionId": "stock-harness.legacy-acp-codex.local.ordered-comment-continuation",
+ "fixtureConfigSha256": "22500c39874cda62a2512ac3d8a43309ce5879f55f8515e31dd8ac632edb6c93",
+ "model": "gpt-5.6-sol"
+ },
+ {
+ "executionId": "stock-harness.legacy-acp-codex.local.assigned-skill-explicit-invocation",
+ "fixtureConfigSha256": "896d8602d2990bf7517a4392d66909c6649e0f00f79a5ea0bb8f0e370b7b597a",
+ "model": "gpt-5.6-sol"
+ },
+ {
+ "executionId": "stock-harness.legacy-acp-codex.local.continuity-restart",
+ "fixtureConfigSha256": "7b66845e231674cc6e78f1d86e863dc03005998c2674316af50db60ec53b7e4a",
+ "model": "gpt-5.6-sol"
+ },
+ {
+ "executionId": "stock-harness.legacy-acp-claude.local.ordered-comment-continuation",
+ "fixtureConfigSha256": "6c1b9d7debb306af405640eb381e1709ae7185e7925bc2bd3ef31acf98fbff8f",
+ "model": "claude-sonnet-4-6"
+ },
+ {
+ "executionId": "stock-harness.legacy-acp-claude.local.assigned-skill-explicit-invocation",
+ "fixtureConfigSha256": "53f308d6fbdc30adc60370279ab38679b5d87075899be4db6c0730593e1632c4",
+ "model": "claude-sonnet-4-6"
+ },
+ {
+ "executionId": "stock-harness.legacy-acp-claude.local.continuity-restart",
+ "fixtureConfigSha256": "80ec22c5080ef1a71fc97547c3e78f4bc5f54f121f46f982506f2f9f773b27d0",
+ "model": "claude-sonnet-4-6"
+ },
+ {
+ "executionId": "stock-harness.legacy-opencode.local.ordered-comment-continuation",
+ "fixtureConfigSha256": "e015ded0177d8d4c893acc658e25699b28937d97cb9d58da023ddff7ba7eac0b",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731"
+ },
+ {
+ "executionId": "stock-harness.legacy-opencode.local.assigned-skill-explicit-invocation",
+ "fixtureConfigSha256": "dd673f469cab583d26bc2e4b484f18b27884ec14a59542177026389181e2da2c",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731"
+ },
+ {
+ "executionId": "stock-harness.legacy-opencode.local.continuity-restart",
+ "fixtureConfigSha256": "3dadc83dff00ef2919cd24c6328ea9507f971e7d294e9ece699ff2ee6fa98230",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731"
+ }
+ ]
+ },
+ "workflowProvenance": [
+ {
+ "run": 37042856368,
+ "workflowSha": "7d59de6113caf5219d34d65e1fb5f0c1a7fbdc2a",
+ "workflowUrl": "https://github.com/paperclipai/paperclip/actions/runs/37042856368"
+ },
+ {
+ "run": 37042864888,
+ "workflowSha": "7d59de6113caf5219d34d65e1fb5f0c1a7fbdc2a",
+ "workflowUrl": "https://github.com/paperclipai/paperclip/actions/runs/37042864888"
+ },
+ {
+ "run": 37045368302,
+ "workflowSha": "7d59de6113caf5219d34d65e1fb5f0c1a7fbdc2a",
+ "workflowUrl": "https://github.com/paperclipai/paperclip/actions/runs/37045368302"
+ },
+ {
+ "run": 37044967981,
+ "workflowSha": "7d59de6113caf5219d34d65e1fb5f0c1a7fbdc2a",
+ "workflowUrl": "https://github.com/paperclipai/paperclip/actions/runs/37044967981"
+ },
+ {
+ "run": 37048838402,
+ "workflowSha": "7d59de6113caf5219d34d65e1fb5f0c1a7fbdc2a",
+ "workflowUrl": "https://github.com/paperclipai/paperclip/actions/runs/37048838402"
+ }
+ ]
+}
diff --git a/doc/plans/2026-10-02-stock-harness-live-comparison.md b/doc/plans/2026-10-02-stock-harness-live-comparison.md
new file mode 100644
index 00000000000..42c7ae3fa33
--- /dev/null
+++ b/doc/plans/2026-10-02-stock-harness-live-comparison.md
@@ -0,0 +1,110 @@
+# Stock-harness live comparison — 2026-10-02
+
+**TL;DR:** Two newly failing paired cases: classic Claude/OpenCode document delivery. Two newly passing cases: classic and native OpenCode ordered continuation. Seven unchanged failures and 13 unchanged passes. The extra ACP Claude storage symptom occurs beneath an existing credential-guard failure. All 48 results are available; no general performance equivalence is established.
+
+The reduced instructions are **not yet qualified for merge**. Classic Claude and classic OpenCode pass the historical skill-output case but fail with the reduced instructions: they finish without saving a Paperclip task document. Native Codex and native Claude pass all three journeys in both variants. Single trials and ambiguous fixture storage wording limit causal attribution; the failed oracle remains unchanged.
+
+The reductions and evaluation setup are in draft [PR #14948](https://github.com/paperclipai/paperclip/pull/14948). This report and its [safe evidence projection](2026-10-02-stock-harness-live-comparison.json) record the measured revisions rather than claiming the final documentation head was run through the full matrix.
+
+## Revisions and matched inputs
+
+- Candidate: `f02d8d0df327abb43b20c7e7beb86798239abbf5`, eight-word hire manual plus reduced shared startup/resume instructions.
+- Historical baseline: `12c5433c67dc2e62916b879349c7ba2b6e0431f0`, the same evaluation harness with only the prior default manual and shared prompt source restored from `e00d10d5d5594f6e2d1e8cf4e0ec81c074b0bd88`. Its manifest records ten identical behavioral/fixture source hashes.
+- Native Codex fix [#14920](https://github.com/paperclipai/paperclip/pull/14920) is held constant. This comparison does not measure its before/after performance.
+- Same eight profiles, three journeys, provider models, effort configuration, skills, tools, permissions, credentials, local runtime, and independent graders. Effort inherits provider defaults where the existing profile does not set it.
+- Each variant selects 24 cells and initially budgets 48 turns, with existing bounded retries and 1,000-cent company/agent hard stops. Recorded run-ledger counts can differ after early failures, retries and cleanup.
+
+## Per-profile and case outcomes
+
+These are recorded overall qualifications, including security and receipt failures. A credential-guard failure does not imply every behavioral matcher failed.
+
+| Profile | Model | Journey | Historical | Reduced |
+| --- | --- | --- | --- | --- |
+| `legacy-codex` | `gpt-5.6-sol` | `assigned-skill-explicit-invocation` | Pass | Pass |
+| `legacy-codex` | `gpt-5.6-sol` | `ordered-comment-continuation` | Pass | Pass |
+| `legacy-codex` | `gpt-5.6-sol` | `continuity-restart` | Pass | Pass |
+| `legacy-claude` | `claude-sonnet-4-6` | `assigned-skill-explicit-invocation` | Pass | Fail: no Paperclip document |
+| `legacy-claude` | `claude-sonnet-4-6` | `ordered-comment-continuation` | Pass | Pass |
+| `legacy-claude` | `claude-sonnet-4-6` | `continuity-restart` | Fail: chat memory | Fail: chat memory |
+| `legacy-opencode` | `openrouter/deepseek/deepseek-v4-flash-0731` | `assigned-skill-explicit-invocation` | Pass | Fail: no Paperclip document |
+| `legacy-opencode` | `openrouter/deepseek/deepseek-v4-flash-0731` | `ordered-comment-continuation` | Fail: deadline/run-start timeout | Pass |
+| `legacy-opencode` | `openrouter/deepseek/deepseek-v4-flash-0731` | `continuity-restart` | Pass | Pass |
+| `legacy-acp-codex` | `gpt-5.6-sol` | `assigned-skill-explicit-invocation` | Fail: credential guard | Fail: credential guard |
+| `legacy-acp-codex` | `gpt-5.6-sol` | `ordered-comment-continuation` | Fail: credential guard, receipt incomplete | Fail: credential guard |
+| `legacy-acp-codex` | `gpt-5.6-sol` | `continuity-restart` | Fail: credential guard, receipt incomplete | Fail: credential guard, receipt incomplete |
+| `legacy-acp-claude` | `claude-sonnet-4-6` | `assigned-skill-explicit-invocation` | Fail: credential guard | Fail: credential guard, no Paperclip document |
+| `legacy-acp-claude` | `claude-sonnet-4-6` | `ordered-comment-continuation` | Fail: credential guard, receipt incomplete | Fail: credential guard |
+| `legacy-acp-claude` | `claude-sonnet-4-6` | `continuity-restart` | Fail: credential guard, receipt incomplete | Fail: credential guard |
+| `runner-codex` | `gpt-5.6-sol` | `assigned-skill-explicit-invocation` | Pass | Pass |
+| `runner-codex` | `gpt-5.6-sol` | `ordered-comment-continuation` | Pass | Pass |
+| `runner-codex` | `gpt-5.6-sol` | `continuity-restart` | Pass | Pass |
+| `runner-acpx-claude` | `claude-sonnet-5` | `assigned-skill-explicit-invocation` | Pass | Pass |
+| `runner-acpx-claude` | `claude-sonnet-5` | `ordered-comment-continuation` | Pass | Pass |
+| `runner-acpx-claude` | `claude-sonnet-5` | `continuity-restart` | Pass | Pass |
+| `runner-opencode` | `openrouter/deepseek/deepseek-v4-flash-0731` | `assigned-skill-explicit-invocation` | Pass | Pass |
+| `runner-opencode` | `openrouter/deepseek/deepseek-v4-flash-0731` | `ordered-comment-continuation` | Fail: deadline/run-start timeout | Pass |
+| `runner-opencode` | `openrouter/deepseek/deepseek-v4-flash-0731` | `continuity-restart` | Pass | Pass |
+
+## Findings and next step
+
+The classic Claude and classic OpenCode skill runs read the pinned skill marker and complete the task, but save zero Paperclip documents; both historical runs save exactly one. The legacy ACP Claude skill run has the same document difference under its credential-guard failure. The earlier reduced-instruction Claude pilot also failed this document oracle. The pinned skill asks for a “task document” without explicitly naming Paperclip storage, so this may reveal both reliance on the former manual and a fixture ambiguity. It remains a failed delivery result, not a regraded pass.
+
+Keep the agreed tiny manual. Next, verify that legacy agents discover and follow the existing **Paperclip skill/API path for durable task documents and artifacts**. The skill already prohibits file-only handoff, lists issue-document routes and gives a plan-document example; audit that delivery before adding a concise generic-document recipe if needed. Run the same preserved case plus a clearly storage-specific case on both variants. Legacy agents do not receive native `paperclip_finish`/`paperclip_block` tools. Native tool descriptions are a separate item 2.3 change; guidance must follow the actual runtime capability. No production or skill instructions were changed to make these runs pass.
+
+Classic Claude chat fails the memory assertion in both variants. Six legacy ACP cells per variant fail the persisted-credential guard: the scanner finds a scoped provider credential in persisted ACP session state. Raw session files and credential values are not published. These are existing qualification failures requiring their own investigation; they cannot be waived or interpreted as instruction-reduction quality evidence.
+
+Historical native OpenCode ordered comments hit the case deadline without the required continuation outcome. The initial historical classic OpenCode ordered cell lost its AWS runner before result upload; its one unchanged-source recovery also hits the 12-minute deadline. Both OpenCode ordered cases pass in the candidate. Completed failures are never rerun to select a better result. Those candidate passes against historical timeouts are observed differences, not proof of a general improvement.
+
+Historical public prompt retrieval is clipped in three legacy ACP cells (four invocations), including identity/connection suffix text. Those structural receipt failures cannot establish that the provider omitted instructions. The candidate ACP Codex chat run also lacks a complete per-run invocation receipt. Instruction presence/absence claims are bounded by the retained public receipts.
+
+## Timing, usage and cost
+
+| Variant | Retained cells | Pass / fail / missing | Cell duration sum | Provider duration sum | Recorded runs with tokens / with reported cost / total | Reported LLM subtotal |
+| --- | ---: | --- | ---: | ---: | --- | ---: |
+| baseline | 24 | 15 / 9 / 0 | 3250.195s | 2108.034s | 52 / 43 / 58 | $1.749425 |
+| candidate | 24 | 15 / 9 / 0 | 2804.913s | 1540.860s | 45 / 36 / 47 | $1.743151 |
+
+For the 13 cells that pass both variants, median cell time is 85.550s historical versus 69.761s reduced; median provider time is 57.150s versus 43.862s. This excludes failures and is descriptive, not a reliable speedup estimate.
+
+Provider billing is incomplete. Legacy Codex/ACP usage is unpriced in several runs; native Codex/Claude often report zero with billing type `unknown`. Reported subtotals do not prove zero native spending or invoice totals. Local runner costs and interrupted partial runs are not metered. Diagnostic/pilot costs and repeated interrupted work are outside the matched-cell subtotal and remain retained. No aggregate cost-saving claim is justified.
+
+## Campaign and evidence history
+
+| Campaign | Source | Outcome / evidence |
+| --- | --- | --- |
+| [Initial diagnostic Codex](https://github.com/paperclipai/paperclip/actions/runs/37034213743) | `a63437069` | Skill passes; predates mandatory admission. |
+| [Cold full attempt](https://github.com/paperclipai/paperclip/actions/runs/37037105491) | `36e987246` | Missing SDK build; cancelled before provider admission. |
+| [SDK pilot](https://github.com/paperclipai/paperclip/actions/runs/37039240025) | `4163dbfd0` | Missing daemon; stops before providers. |
+| [Daemon pilot](https://github.com/paperclipai/paperclip/actions/runs/37040493183) | `ac6ddefb5` | Missing fake Codex fixture; stops before providers. |
+| [Complete-build Claude pilot](https://github.com/paperclipai/paperclip/actions/runs/37041741124) | `f02d8d0df` | 537 prerequisites pass; skill document oracle fails; reported $0.175308. |
+| [Initial candidate matrix](https://github.com/paperclipai/paperclip/actions/runs/37042856368) | `f02d8d0df` | 4 pass, 7 fail, 13 cancelled when a same-target-branch pilot superseded it. Original attempts retained. |
+| [Candidate cancelled-cell recovery](https://github.com/paperclipai/paperclip/actions/runs/37045368302) | `f02d8d0df` | Only the 13 cancelled cells: 11 pass, 2 fail. Combined candidate has 24 results, 15 pass / 9 fail. |
+| [Historical matrix](https://github.com/paperclipai/paperclip/actions/runs/37042864888) | `12c5433c6` | 15 pass, 8 recorded failures, one AWS-runner shutdown without result upload. |
+| [Historical interrupted-cell recovery](https://github.com/paperclipai/paperclip/actions/runs/37048838402) | `12c5433c6` | Only legacy OpenCode ordered comments: 720.616s deadline failure; evidence and cleanup valid. Historical cohort now has 24 results, 15 pass / 9 fail. |
+| [Current packaging pilot](https://github.com/paperclipai/paperclip/actions/runs/37044967981) | `1eb5ba420` | Attempt 1 stopped before cell/provider execution; attempt 2 passes, evidence valid and cleanup pass. |
+
+The same-target-branch workflow concurrency rule caused the candidate interruption; that orchestration mistake was acknowledged and corrected with a separate unchanged-source recovery branch. No completed model failure was retried. The historical missing cell is recovered once for a runner shutdown. Partial/failed attempts remain part of the history and unknown-spend accounting.
+
+The measured matrix packages contain a prerequisite folder beside the exact campaign root. The trusted selector correctly rejects this layout, so their original published reports synthesize missing-result infrastructure failures. A separate local reconstruction nests that prerequisite folder under the campaign root and verifies byte identity for every copied file; result, scorer, usage, screenshot and prerequisite content are unchanged. The unchanged trusted selector then selects 11/24 original candidate, 13/13 recovery 23/24 original historical packages and 1/1 interrupted-cell recovery; recovered normalization validates every retained result’s evidence. Original missing packages stay missing in their original campaign; the separate recovery result has its own provenance. This is declared directory-layout recovery, not a canonical successful publication or a change to the oracle. The safe JSON records result/receipt/scoring hashes and recovery-manifest hashes.
+
+The fix at `1eb5ba420` writes prerequisites beneath the exact campaign root. Its single selected Codex skill cell passes through the protected report and publication pipeline: [interactive pilot report](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-37044967981-2/index.html), [GitHub evidence](https://github.com/paperclipai/paperclip/actions/runs/37044967981#artifacts). It has `evidenceValid=true`, cleanup pass, 27.149s provider / 49.523s cell, and a reported zero subtotal with unknown billing type. It does not replace the full matched cohort or qualify untested providers.
+
+Original historical/recovery dashboards retain the publication failure: [historical](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-37042864888-1/index.html), [candidate recovery](https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/gha-37045368302-1/index.html). Inspect their access-controlled raw artifacts for measured cell evidence; do not read synthetic missing-result rows as task performance.
+
+## Verification and remaining qualification
+
+At `1eb5ba420`, all 557 credential-free prerequisites pass (556 TypeScript plus one Rust), along with 895 E2E support tests, E2E typecheck and 24-cell discovery. The cold builder prepares SDK/shared outputs and both daemon/fake protocol binaries, records hashes, and fails closed before credentials. The 313 filtered native tests are not counted as passing coverage. This head has 52 passing CI gates and two skipped gates; Greptile reviewed that exact head at 5/5 with zero open threads. Later documentation heads require fresh checks/review; measured sources remain explicit above.
+
+Repository typecheck and build pass. The complete local Vitest run has 14,870 passed, 83 skipped and three unrelated timing failures; the three affected files pass unchanged narrow reruns (25 auth, 16 reviewed-chat binding, four webhook tests). Original failures are retained rather than calling the first full run green.
+
+PR #14948 stays draft while document delivery is unresolved. Unrepresented harnesses, legacy ACP credential safety, public-receipt clipping, the independent ACP base-replacement issue, existing Claude chat memory behavior and saved-session migration are not qualified away by these results. This small matrix measures skill/context/chat behavior, not broad coding quality or statistical equivalence.
+
+## Retained delivery diagnosis and approved repair
+
+Both failed classic agents loaded the operational Paperclip skill. This is not an observed skill-discovery failure. In the reduced Claude run, the agent wrote a workspace Markdown file before loading Paperclip and then completed the issue without a document API write. The reduced OpenCode run loaded Paperclip, accessed the assigned skill through the public skills API, and wrote a workspace task-document file; it made no document, attachment, or work-product delivery write. Both corresponding historical runs saved a Paperclip issue document.
+
+Claude received the full operational skill, including its existing no-local-only delivery guidance. OpenCode's skill result was explicitly truncated in both variants: the early artifact rule survived, but the later generic document endpoint and plan-only write example were omitted. That truncation is existing behavior, not a newly measured regression. Removing always-on delivery reminders may interact with it, but the combined manual/shared reduction and ambiguous assigned-skill wording prevent a causal attribution to one layer.
+
+Dotta approved a small early API-runtime skill recipe and a generic issue-document reference. The tiny manual remains eight words. The recipe checks the successful write's returned saved revision/content and links the returned key; it does not require another GET after a clear valid receipt. It preserves explicit destinations, downloadable-file delivery, and native document-tool boundaries.
+
+The focused repair comparison will hold the tiny manual/shared prompts fixed and vary only `skills/paperclip/SKILL.md` plus the new `references/issue-documents.md`. Classic Claude and OpenCode each run the preserved original case and an added explicitly Paperclip-storage case: four cells per variant, eight expected provider turns in total. This measures the skill repair separately from the original reduction. The explicit case independently checks public saved body/revision and an agent comment linking the exact same-app document; local-only, missing-revision, wrong-document, local-path, and other-origin outcomes cannot pass. Current state: fixture preparation and source freeze, no repair provider run yet.
diff --git a/doc/plans/2026-10-02-stock-harness-paperclip-checklist.md b/doc/plans/2026-10-02-stock-harness-paperclip-checklist.md
index f71067ff070..5d9c2299a73 100644
--- a/doc/plans/2026-10-02-stock-harness-paperclip-checklist.md
+++ b/doc/plans/2026-10-02-stock-harness-paperclip-checklist.md
@@ -1,7 +1,25 @@
# Stock harness, with Paperclip: working checklist
-Created: 2026-10-02. Status: item 1 implemented for native Codex app-server;
-PR validation in progress. Other implementation items remain open.
+Created: 2026-10-02. Status refreshed locally: 2026-10-06.
+
+Native Codex base preservation (#14920), the tiny default manual/common legacy
+prompts (#14948), general hiring templates (#14985), native completion tool
+guidance (#14961), evaluator accounting repairs (#15007), and native completion
+constraint/final-answer corrections (#15151) are merged. Dotta confirmed the
+latest merge; GitHub records #15151 merged on 2026-10-05. The detailed sections
+below retain historical stages and failures; this status supersedes their old
+draft/pending descriptions. The saved master checklist had lagged behind the
+implementation and evidence notes and is reconciled here. Native-tool measurement
+(#15218) and the smaller planning skills (#15296) are also merged; the
+2026-10-06 entry below records their scope and the next repair.
+
+Remaining work: deferred legacy carriers (2.2), uncommon native fixed-prompt
+procedures beyond the completed completion slice (2.3), specialized agent
+contracts (3.4), repository context (4), broader runtime bookkeeping (5), and
+the full harness/configuration audit (6). Completed evals qualify their bounded
+cases, not general coding quality or every configuration. The prepared final
+#15151 PR body/eval summary was not published before the human merged it;
+publication remains separate from implementation completion.
Goal: keep the agent's stock harness behavior and add only what it needs to work
with Paperclip. Apply this across legacy adapters, the new Runner, and their
@@ -12,7 +30,11 @@ record the proposed behavior and Dotta's direction, make a bounded change, and
verify the affected paths before moving on. New findings get stable IDs in the
ledger below so they do not disappear into conversation history.
-**Current item: 1 — validate and review the native Codex instruction fix.**
+For every change, record its executable test/eval coverage before continuing.
+Distinguish coverage setup, deterministic results, and measured live results;
+configured cells alone do not qualify behavior.
+
+**Current item: repair and qualify the native delegation handoff before further procedure reduction.**
## Agreed direction and boundaries
@@ -43,7 +65,7 @@ ledger below so they do not disappear into conversation history.
- [x] Remove default replacement of stock base instructions across those paths.
- [x] Verify the actual app-server request and retained session instructions,
including resume; checking only a prompt builder is insufficient.
-- [ ] Verify Paperclip task context, tools, auth, assigned skills, and completion
+- [x] Verify Paperclip task context, tools, auth, assigned skills, and completion
still work. Record applicable regressions and eval results.
Starting points: [Codex backend](../../packages/paperclip-runner/src/backends/codex-native-backend.ts),
@@ -61,14 +83,20 @@ and need a provider session reset. Do not reset active sessions automatically.
The separate Codex-through-ACP dependency patch remains a coverage follow-up
under item 6; this change covers the native app-server path.
+Verification: 412 focused TypeScript/Rust tests, repository typecheck/build,
+55 passing PR checks, and Greptile 5/5. The original full local test command
+was stopped after setup failures; affected suites passed on rerun. No paid
+live campaign was run, and no task-quality improvement is claimed.
+
## 2. Reduce the default operating manual and shared prompt layers
- [ ] Inventory what an agent actually receives: hire instructions, shared
prompt template, wake context, runtime prompt, bootstrap, and loaded skills.
Separate always-present text from content loaded on demand.
-- [ ] Agree on the tiny common contract and the coordination details that each
- runtime still requires. Legacy API coordination and native semantic tools
- need appropriate instructions for their respective interfaces.
+- [x] Agree on the tiny default: identity only, with no skill or native-tool
+ pointers. The harness supplies coordination instructions.
+- [x] Reduce the generic default hire `AGENTS.md` to the agreed sentence and
+ update the existing creation test to expect the minimal bundle.
- [ ] Remove repeated workflow rules and stock coding/style/autonomy guidance.
- [ ] Move detailed planning, hiring, artifacts, and exceptional procedures to
discoverable references or tools where feasible.
@@ -80,7 +108,249 @@ Starting points: [default hire instructions](../../server/src/onboarding-assets/
[native runtime contract](../../packages/paperclip-runner/src/contracts/runtime-context.ts),
[Paperclip operational skill](../../skills/paperclip/SKILL.md).
-Decision: exact retained paragraph and on-demand boundaries pending.
+Decision: Dotta confirmed the harness already handles skill and tool delivery;
+the default hire manual is now only "You are an agent in a Paperclip company."
+This replaces 602 words with eight. The shared loader supplies this default
+across instruction-bundle-capable adapters for non-CEO hires without explicit
+instructions. Existing saved bundles retain their content; CEO, first-agent,
+and role/team templates remain separate work under item 3. The common
+ prompt/wake reduction and legacy delivery repairs are merged in #14948;
+ additional carriers and uncommon native procedures remain open. Native
+ completion documentation and constraint/final-answer corrections are merged
+ separately in #14961 and #15151.
+
+Verification: the existing agent-skills route suite passed all 54 tests,
+including default creation, custom bundles, and CEO/first-agent paths. The
+onboarding asset suite passed all 10 tests. This initially had only deterministic
+coverage. Dotta subsequently requested behavioral eval coverage for every change;
+the dedicated production-default-hire suite below closes the custom QA manual
+gap. Full repository typecheck/build/test were not rerun for this narrow asset
+and existing-test update.
+
+### Shared prompt follow-ups
+
+- [x] **2.1 Reduce common legacy startup/resume instructions.** Keep
+ identity and connection guidance in the shared task/chat defaults; remove the
+ generic resumed-wake execution contract. Preserve current task/event data,
+ specialized wake contracts, custom templates, skills, and auth.
+- [ ] **2.2 Review additional legacy carriers.** Reduce Hermes local/gateway
+ wrappers, review Pi system delivery, and check OpenClaw fresh-wake framing.
+ Preserve transport facts and user configuration. Dotta deferred this item on
+ 2026-10-02 for a later revisit; it remains open.
+- [ ] **2.3 Reduce native Runner instructions and constraints.** Improve
+ discoverable tool documentation first, then shorten fixed guidance and
+ consolidate completion rules. Verify prompt revisions, digests, and session
+ compatibility across native Codex, ACPX, and OpenCode. Dotta approved the
+ native tool-documentation slice on 2026-10-02 in a separate worktree. Native
+ `paperclip_finish`/`paperclip_block` guidance must not leak into legacy
+ completion paths, which use the operational skill and API.
+- [x] **2.3 completion slice.** Improve native finish/block documentation
+ (#14961), consolidate repeated completion constraints, and preserve useful
+ final replies, blocker explanations and working document links (#15151).
+ Native Codex, ACPX Claude and OpenCode have bounded live outcome coverage;
+ scripted start/resume/continuation and compatibility checks remain distinct
+ from live resume qualification.
+- [ ] **2.3 remaining procedures.** Review the fixed hiring, dependencies and
+ connection guidance; improve discoverable tool documentation and measure any
+ further reduction. #15151 intentionally did not change the fixed prompt.
+ Hiring/dependency relocation failed both corrected and readiness comparisons.
+ #15218 now retains measurement and eval coverage with production unchanged;
+ see [the comparison report](2026-10-05-native-procedure-guidance.md).
+ Connection procedures remain a separate follow-up.
+- [x] **2.3 full-catalog measurement.** PR #15218 measures all 39 supplied
+ native tools and schemas with fixed instructions at start/resume/continuation.
+ The rejected corrected candidate reduced the normalized standing projection by 460 bytes
+ (48,781 to 48,321 in the paid context; 49,200 to 48,740 after master integration),
+ not a token/cost or upstream truncation claim. The rejected readiness repair
+ restored explicit delegation/review guidance and saved only 125 bytes.
+ Its larger unqualified controller repair increased the full projection.
+ Final #15218 restores production to baseline: 49,200 bytes, identical across
+ all 36 normalized components of nine scripted deliveries and the MCP catalog.
+- [ ] **2.3 hiring/dependency behavior qualification.** The original six-pair
+ campaign exposed three new overall failures, including Claude omitting
+ dependency recording and finalization. Preserve original grades and control
+ bugs. Corrected v7 candidate and a baseline with matching credential/budget
+ repairs completed: baseline 5/6 PASS, candidate 3/6 PASS; two new failures,
+ zero new passes, three unchanged passes and one unchanged failure. Codex's
+ parent remained blocked after the replacement deliverable. OpenCode hiring
+ exceeded the deadline before the revised delivery settled. Both OpenCode
+ delegation variants lacked parent review of the final child revision. Two
+ interrupted candidate cells had one bounded recovery each; incomplete
+ original accounting is retained. No rerolls of these completed source pairs.
+ After the human requested readiness fixes, candidate
+ `aba7ec219b588de02cf323b4ebca559a105e6d01` restores assigned-worker revisions
+ and latest-child review, returns actual dependency readiness, and separates
+ cancelled dependencies from tasks that can complete. Its 23 database-backed
+ tool tests and fresh 5/5 review pass. New candidate campaign `37348723829`
+ and integrated baseline `37348764875` completed with unchanged oracles and
+ bounds: candidate 3 PASS / 3 FAIL; baseline 3 PASS / 2 FAIL / one setup cell
+ without a behavioral grade. The five comparable pairs have two new failures,
+ two new passes and one unchanged pass; one pair remains uncomparable. The
+ new failures include parent completion before the latest child revision and
+ OpenCode credential persistence. The Codex candidate also lacks parent
+ continuation. Keep this item open. The final #15218 excludes the production
+ change, retains every failure, and adds measurement and eval coverage only.
+ Unqualified runtime fixes are preserved locally for separate follow-up.
+
+### Remaining fixed-prompt audit — 2026-10-05
+
+Read-only inspection verified the prompt, semantic catalog, shared connection
+guidance, production tool authority and payload-measurement file against their
+exact blobs on merged master `a386a599983519eb1d399f8b770bfccdb2a74762`.
+The fixed prompt is 262 whitespace-separated words / 1,713 UTF-8 bytes: 34
+general context, 123 hiring/delegation/dependencies, 98 connections and seven
+finishing words. These are source-text counts, not provider token/billing data.
+
+The hiring recipe still mandates `search_api`/`call_api`, although the available
+`hire_agent` tool already creates persistent native teammates and documents
+runtime inheritance/reuse. Hiring and API fallback tools share the API-tool
+availability gate. Update the discovery/selection guidance to prefer an
+available dedicated tool and keep configuration-specific fallback in its own
+documentation; provider helper threads must remain distinct from company hires.
+
+`create_task` documents creation but omits the assigned-worker/review boundary.
+`set_dependencies` describes replacement only; preserving existing blocker IDs
+and releasing the workspace are still carried by the fixed prompt. Improve
+these tool contracts before removing the corresponding prompt procedure.
+Connection tools already document discovery, recorded provider choices, setup
+cards and yielding. Keep a small discovery trigger for explicit setup requests;
+put state-specific retry/decline/continuation instructions in tool descriptions
+and actual result guidance. These are reduction proposals, not implemented or
+behaviorally qualified changes.
+
+Measure the complete delivered prompt, constraints and granted tool descriptions
+together. The existing scripted capture selects only core semantic tools, so it
+omits these optional hiring/dependency tools and the connection tools. Moving
+words into descriptions alone does not demonstrate lower total instruction load.
+Keep prompt revision/digest and incompatible-session checks explicit.
+
+Candidate coverage includes the existing Product E2E `hire-reuse`,
+`delegate-feedback`, service approval/decline and connection-routing stories.
+Those stories cover Codex/Claude; corresponding OpenCode qualification and exact
+blocker-preservation/workspace-yield assertions still need review. Some decline
+fixtures explicitly restate the no-retry rule, so they cannot alone measure its
+discovery from shipped guidance. Previous completion-only passes do not qualify
+these procedures. Prefer hiring as the first bounded slice, then matched
+before/after outcomes with common fixture/model/auth/permission/budget controls.
+
+### Follow-up 2.3 merged completion slice — 2026-10-05
+
+#15151 merged as `a386a599983519eb1d399f8b770bfccdb2a74762` from final source
+`16ef1a5744b23bb043a8b286e6288921da1de98f`. The shortened completion contract
+now retains an explicit blocker cause/owner/action and a canonical clickable
+document handoff. Runtime feedback, OpenCode acceptance/settlement and proxy
+ordering corrections preserve the final provider response rather than treating
+an accepted terminal tool call as sufficient delivery.
+
+The six scoped corrective cases pass: four Codex/Claude cases measured at
+`3a7349ddc60142283c394121882288f2db07b215`, and two OpenCode cases measured at
+the final source. The intervening production delta is confined to OpenCode;
+the shared instructions, server feedback and UI paths are byte-identical.
+These are explicitly mixed-source observations, not six live runs on the final
+head. Document cases open the actual saved revision and original marker from
+the final reply; blocker cases retain the missing-access reason, exact owner,
+unblock action and task-wide scope. Final-head CI is green and fresh review is
+5/5 with all review threads resolved.
+
+Original paired grades and every corrective failure remain preserved. Passing
+totals had concealed weak blocker explanations and missing document links;
+the subsequent oracle explicitly checks those behaviors. Single trials do not
+prove broad equivalence, cognitive skill consumption, general coding quality,
+live resume behavior, or speed/cost trends. See the
+[constraint plan](2026-10-03-native-completion-consolidation.md) and
+[final-answer correction history](2026-10-04-native-completion-answer-fix.md)
+for the preserved setup and behavior failures; their initial hold statements
+are historical and superseded by this merged status.
+
+### Follow-up 2.1 implementation and verification
+
+The common task and conversation defaults now share the same identity sentence
+and unchanged connection guidance: 113 words each, down from 661 and 205.
+Connection guidance accounts for 108 of those words. The ordinary resumed-wake
+execution contract is removed (172 words), including the old opt-in used by
+OpenClaw on fresh turns. `includeExecutionContract` remains accepted as a
+deprecated no-op for adapter/plugin source compatibility.
+
+Current task facts, ordered comments, work modes, approval/review state,
+checkout, holds/blockers, recovery/watchdog roles, and external-chat contracts
+remain in their existing owners. Skill delivery, runtime authentication,
+custom `promptTemplate`, and `bootstrapPromptTemplate` mechanics are unchanged.
+Hermes's own wrappers and Pi's system carrier remain follow-up 2.2; native
+fixed instructions and full-turn constraints remain follow-up 2.3.
+
+The later read-only 2.2 audit found another OpenClaw-owned HTTP identity,
+checkout/status, delegation, plan-approval and task-discovery wrapper in
+`buildWakeText`. Its short conversation branch is selected when optional task
+Markdown is present, including on ordinary task dispatch. Existing dispatch
+coverage does not assert the absence of conversation waiting language. This is
+a framing concern to verify, not a measured failure. Pi already uses additive
+`--append-system-prompt` delivery and suppresses the duplicate user-prompt copy;
+its next step is a delivery audit with minimal changes. These findings are
+deferred with 2.2 and are not implemented in PR #14948.
+
+The new defaults apply when prompts are assembled after deployment. Existing
+provider sessions can retain earlier startup instructions in their history
+until reset; no active session or saved custom template is rewritten here.
+
+Verification: 563 distinct focused tests passed across 18 suites:
+
+- Shared prompt selection/rendering, operational-skill selection, and retained
+ specialized wake contracts (130 tests).
+- ACPX, Pi, OpenCode, Cursor Cloud, and Codex local execution, including
+ task/chat fresh/resumed/reset/fallback delivery, custom prompts, skill
+ mounting, and authentication (259 tests).
+- Hermes local prompt rendering and gateway execution (41 tests).
+- Claude, Gemini, Cursor local, Grok, Kimi, OpenClaw, and Claude/Codex ACP
+ fallback execution (113 tests).
+- Native execution input, preserving shared wake compatibility (20 tests).
+
+`@paperclipai/adapter-utils` typecheck and build passed; `git diff --check`
+passed. Full repository typecheck/build/test and live behavioral evals were not
+run for this local bounded change. These checks prove prompt and runtime
+mechanics, not an improvement in coding-task quality.
+
+### Remaining shared layers inspected (2026-10-02)
+
+The table records the initial inspection before follow-up 2.1. Word counts
+cover fixed source text, not complete assembled prompts or token counts. They
+exclude task data, assigned agent instructions, and skills. This inspection
+establishes instruction mechanics, not a performance result.
+
+| Layer | Delivery at initial inspection | Disposition |
+| --- | --- | --- |
+| Shared legacy task/chat templates | `DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE` was 661 words and the conversation template was 205, including connection guidance. Used by Claude, Codex, Cursor local/cloud, Gemini, Grok, Kimi, OpenCode, Pi, and Hermes local. | Completed in 2.1: both defaults now 113 words. Repeated procedures removed, connection guidance retained, no replacement skill pointer. |
+| Generic resumed wake contract | `renderPaperclipWakePrompt` added a 172-word execution contract on ordinary resumed turns. OpenClaw requested it on fresh turns too because it has no shared template. | Completed in 2.1: generic contract removed, including legacy opt-ins. Task/event data and conditional runtime contracts retained. |
+| Additional legacy carriers | Hermes local adds a 171-word identity/API/curl wrapper before the shared task template; Hermes gateway supplies its own four-rule execution contract. Pi carries shared defaults in its system extension and suppresses the wake copy when that extension owns policy. | Separate follow-up 2.2; changing the shared constants alone does not remove every wrapper. Preserve transport facts and custom configuration. |
+| Native fixed prompt | The 262-word `paperclip-execution.v5` prompt carries hiring, delegation/dependencies, connection setup, and finalization guidance across native Codex, ACPX, and OpenCode backends. | Keep one short native completion/dependency contract. Relocate uncommon procedures to the relevant tool documentation, improving that documentation where needed before removing instructions. Any change needs prompt revision/digest/session-compatibility verification. |
+| Native full-turn constraints | `nativeTaskConstraints` adds assigned-skill limits, current agent-file paths, document/file delivery, answered-question handling, and accepted completion/final-response sequencing. Codex/OpenCode add another completion reminder. Prepared constraints reach the model envelope through `native-session-runtime`; compact continuations avoid replaying prior task constraints. | Consolidate duplicate completion instructions. Keep current paths, answer scope, and the required result protocol. Move detailed file/document procedure to discoverable tool descriptions where adequately covered. |
+| Task/event-specific framing | Server task Markdown and wake rendering supply work mode, ordered comments, approved revisions, checkout/holds/blockers, recovery/review/watchdog roles, external-chat bookkeeping/delivery, and conversation handoff. | Retain the facts and mode boundaries in the first reduction. Use one authoritative owner for shared mode directives; review specialized wording separately. |
+
+Custom `promptTemplate` and fresh-only `bootstrapPromptTemplate` configuration
+are distinct from shipped defaults and should not be silently rewritten.
+The built-in process adapter invokes a configured command; HTTP passes context
+as JSON. They do not use the shared text template. External adapter plugins and
+hosted configuration variants still require the broader item 6 audit.
+
+An accepted-plan discrepancy needs resolution: task Markdown permits cohesive
+implementation on the current issue, while the wake renderer's planning-mode
+accepted-confirmation branch requires children and prohibits implementation on
+the source issue. Existing tests assert both versions. Production reachability
+after the server changes work mode has not yet been established; do not claim
+this proves a live plan-continuation failure.
+
+Dotta selected follow-up 2.1 first: reduce the common legacy startup/resume
+copies, preserving conditional context. Additional carriers and native fixed
+instructions remain distinct follow-ups 2.2 and 2.3. No shared runtime text was
+changed by the initial inspection.
+
+Coverage identified during inspection includes shared prompt selection/rendering,
+adapter execution tests, native backend/runtime context tests, and server
+task-context/native-input tests. Follow-up 2.1 extended the shared and adapter
+checks; its results are above. Follow-ups 2.2 and 2.3 need their corresponding
+carrier/protocol assertions. Product E2E context-integrity, completion-updates,
+and direct blocker guidance are candidate lifecycle checks; their current scope
+does not establish coding-task quality. The initial inspection itself ran no
+tests or live evals.
## 3. Review every hiring and role template
@@ -107,7 +377,61 @@ Starting points: [onboarding assets](../../server/src/onboarding-assets/),
[hiring skill and references](../../skills/paperclip-create-agent/),
[teams catalog](../../packages/teams-catalog/catalog/).
-Decision: per-template disposition and migration policy pending.
+Dotta approved and merged [PR #14985](https://github.com/paperclipai/paperclip/pull/14985)
+at `862a5758ba0e88a33232c1f1fa645e85c38a3113`, after corrected source
+`57dcee147ed0b2d2e3cc657cd9e50fb16bf9ec25` passed full CI and fresh Greptile 5/5.
+The hiring skill/references, CEO/CoS assets and team catalog are now on master.
+Their live qualification remains separate from unit/CI verification.
+[Prompt diffs and preserved scope](https://github.com/paperclipai/paperclip/blob/57dcee147ed0b2d2e3cc657cd9e50fb16bf9ec25/doc/plans/2026-10-02-hiring-template-prompt-diff.md).
+
+The read-only audit found four onboarding CEO files (1,897 words), a 164-word
+CoS manual, four role examples (coder 652, QA 619, UX 1,325, security 1,724 words),
+and eight team-catalog manuals. Hiring step 6, the 60–150-line role guide and
+review checklist would regenerate the removed operating policies.
+
+- [x] **3.1** Reduce role drafting rules, coder/adapted hire examples and matching
+ catalog coder, preserving metadata, auth, permissions and skill selections.
+- [x] **3.2** Reduce the CEO bundle/copy, including forced delegation, hiring,
+ memory and repeated API recipes.
+- [x] **3.3** Review remaining roles/catalog and CoS copy.
+- [ ] **3.4** Review specialized built-in/plugin contracts separately; retain
+ product-required behavior rather than assuming every rule is redundant.
+
+Custom and existing bundles and governance remain deliberate rollout boundaries.
+Specialized Summarizer, Reflection Coach and Wiki Maintainer prompts remain
+unchanged for separate product-contract review; optional Content Lead was already
+tiny. The generic non-CEO fallback belongs to PR #14948. PR #14985 does not reduce
+every shipped specialized agent.
+
+Its explicit `hiring-templates` suite selects native local Codex and ACPX Claude
+`hire-coder-template-reuse` cells: a real default CEO, explicitly requested
+production hiring skill/coder reference, independently scored saved JSON
+artifacts and session reuse. Outcome and source/read coverage are separate;
+missing or redacted receipts do not prove no regression. The existing first-task
+suite covers actual wizard CoS snapshot selection. The matched union holds the
+reduced manual/shared/operational skill and native completion guidance constant,
+restoring only 21 historical hiring production/derived sources in baseline.
+Frozen candidate `9f5404ad3aacbe76777952759414d34fd381e674` and baseline
+`296a4df85e8bcc97a160fc78c291b17adb828196` passed 705 exact-source credential-free
+prerequisites each (704 TypeScript + 1 Rust; zero providers), with 8,242 identical
+other tracked files and matching fixture/model/auth/permissions configuration.
+Only four candidate-specific single-file CEO selection assertions are filtered
+symmetrically; each variant's bundle/source hashes and canonical catalog are
+independently admitted. Two cells per variant, five expected turns each:
+four cells / 20 turns, 15 minutes each, no automatic retries or broader selection.
+The [candidate](https://github.com/paperclipai/paperclip/actions/runs/37075466208)
+and [baseline](https://github.com/paperclipai/paperclip/actions/runs/37075469463)
+protected campaigns are dispatched. No graded live pairs yet; pending evidence
+cannot establish non-regression.
+[Inspect the partial report](https://github.com/paperclipai/paperclip/blob/e3720f369df070036526dd295a7a68e49488c51a/doc/plans/2026-10-02-hiring-template-live-comparison.md).
+Report-only updates preserve the measured refs and merged hiring PR.
+
+The default-manual PR is replayed on the merged hiring base, preserving custom
+CEO bundle checks, the minimal generic boundary and both eval suites. Its prior
+browser failure remains retained: a deterministic process fixture replayed its
+last plan command on an asynchronous `chat_task_completed` wake and wrote a
+second, text-identical source plan revision. It was not paid/provider execution;
+fresh rebased CI remains required before readiness.
## 4. Fix repository context while retaining Paperclip configuration
@@ -131,6 +455,10 @@ isolation is approved and should remain.
## 5. Let the runtime own bookkeeping
+- [x] **Native completion delivery slice.** Persist and present meaningful final
+ answers, saved document links and blocker details; settle accepted/rejected
+ OpenCode completion feedback correctly. Merged in #15151. This does not finish
+ the wider checkout, waiting, recovery and legacy ownership audit below.
- [ ] Map which runtime owns checkout, status transitions, completion comments,
artifacts, waiting/review states, and recovery; identify manual duplicates.
- [ ] Keep one valid completion path per runtime and preserve meaningful user
@@ -154,7 +482,7 @@ does not apply.
| Legacy Codex / Claude | Local adapters, managed auth and isolated configuration | Initial inspection only |
| Other legacy local adapters | ACPX, OpenCode, Pi, Cursor, Gemini, Grok, Kimi, Hermes | Pending |
| Other adapter transports | Cursor Cloud, Hermes/OpenClaw gateways, process, HTTP, external adapter plugins | Pending |
-| Runner Codex | App-server driver, runnerd bridge, Rust provider, direct/fallback paths | Additive instruction fix implemented; PR validation pending |
+| Runner Codex | App-server driver, runnerd bridge, Rust provider, direct/fallback paths | Additive instruction fix merged in PR #14920 |
| Runner ACPX | Enabled profiles, especially Claude/Grok; declared or pending profiles tracked separately | Claude initial inspection; remaining audit pending |
| Runner OpenCode | Native provider and configuration paths | Pending |
| Hosted/remote providers | Claude Managed and AWS AgentCore; identify their own baseline rather than assuming CLI semantics | Pending |
@@ -172,15 +500,22 @@ does not apply.
## Verification and evals — apply to each item
-- [ ] Map existing coverage before adding cases; use [doc/evals.md](../evals.md).
+- [x] Repair strict retained-run accounting in #15007 and add bounded native
+ completion/final-answer coverage for #14961/#15151. Keep original failures;
+ ACPX host/provider action attribution and hiring source-read coverage remain
+ explicitly uncomparable where no authoritative mapping/receipt exists.
+- [x] Map existing coverage for all implemented changes before adding cases;
+ see the SH-1–SH-3 map below and [doc/evals.md](../evals.md).
Keep Runner protocol evals and Product E2E evals distinct.
-- [ ] Start with narrow deterministic checks for instruction layering, effective
+- [x] Set up narrow deterministic checks for the implemented instruction layering,
+ hire, and shared-prompt changes. Future changes still need their own map for effective
configuration, skill/auth delivery, and session behavior where appropriate.
-- [ ] Use Runner evals for provider/session/tool protocol changes; use Product
- E2E for real hiring, repository context, task lifecycle, and artifact delivery.
-- [ ] Review existing context-integrity, hiring, completion-updates, and blocker
- suites for reusable coverage; record gaps rather than claiming coverage from
- a similarly named case.
+- [x] Reuse existing protocol tests for native Codex request layering and add Product
+ E2E for production-default hiring, skill delivery, task lifecycle, and chat
+ continuity. Repository context and additional artifact cases remain future work.
+- [x] Review existing suites for reusable coverage. Their custom QA manuals did
+ not exercise the tiny default hire; the new suite deliberately omits those
+ bundles and reuses independently graded skill, continuation, and chat journeys.
- [ ] Compare task quality as well as Paperclip protocol compliance when claiming
that fewer instructions improve agent performance. Keep model, effort,
permissions, tools, and fixture comparable.
@@ -189,19 +524,71 @@ does not apply.
- [ ] Run the relevant checks for each change and the repository's required full
verification before a PR-ready handoff. Record unrun checks and their reasons.
+### Coverage for changes implemented so far
+
+The [stock-harness runbook](../../tests/runner-e2e/STOCK-HARNESS.md) defines a
+credential-free prerequisite plus 24 explicit local Product E2E cells across
+eight legacy/native profiles. Each profile runs assigned-skill invocation,
+ordered comment continuation, and chat continuity across restart. Public receipts
+verify the identity-only managed bundle before provider execution; final receipts
+check actual legacy prompts and both budget hard stops. The existing lifecycle
+oracles still own task/chat success. Models, auth, skills, permissions, and
+secret-reference plumbing are inherited from existing profiles.
+
+| Coverage ID | Implemented change | Executable coverage | Live status |
+| --- | --- | --- | --- |
+| SH-1 | Native Codex additive developer instructions, including start/resume/recovery | TypeScript driver, runnerd transport, Runner Lab/live-session, and Rust provider tests in `pnpm test:e2e:runner:stock-harness`; native Codex cells exercise real hires. | Native Codex passes all three matched journeys in both variants; #14920 held constant, so task success is not before/after vendor-base proof. |
+| SH-2 | Eight-word default hire `AGENTS.md` | Public creation/onboarding tests; exact independent public bundle oracle before and after provider execution for every stock-harness cell. | Candidate public tiny-bundle and budget receipts pass in all 24 retained cells. Behavioral delivery is not fully qualified; see F14–F17. |
+| SH-3 | Reduced shared task/chat defaults and removed generic resume contract | Shared renderer and ACPX/Codex/OpenCode/Pi/Hermes/Cursor Cloud regressions; actual legacy invocation prompts checked in the new suite. | Actual legacy prompts measured. Document-delivery regressions and clipped/missing receipts retained; additional carriers remain deferred item 2.2. |
+
+The suite is explicit-only and excluded from `--all`; it does not add paid work
+to ordinary campaigns. Negative calibration covers manual regrowth, missing or
+malformed prompt receipts, old startup/resume procedures, missing connection
+guidance, wrong budgets, and skipped prerequisite assertions. Source revisions,
+attempts, cost, partial failures, cleanup, and sanitized evidence use the existing
+report pipeline. No paid providers were launched during the initial setup.
+Subsequent GitHub measurements are recorded below; no broad coding-quality
+improvement or full live qualification is claimed. Unrepresented harnesses remain
+unqualified; Codex-through-ACP vendor-base preservation is still F7.
+
+Local setup verification: 478 prerequisite tests passed (477 TypeScript plus one
+Rust), 860 Product E2E support tests passed, E2E typecheck passed, and all 24 cells
+were discovered. The 313 unrelated native tests filtered by the gate are not
+passing coverage. Final prerequisite evidence is retained at
+`tests/runner-e2e/results/stock-harness-preflight-2026-10-02T16-15-39.064Z/preflight.json`;
+earlier interrupted, missing-Hermes-discovery, and setup/test-timeout attempts are
+retained as failures. Hermes is checked through its package config because the
+root Vitest project list omits it. Later exact-head prerequisites expanded to
+557 passed checks (556 TypeScript and one Rust), and E2E support to 895 tests.
+Repository typecheck/build passed. The complete local Vitest run retained three
+unrelated timing failures; all three files passed unchanged reruns. At
+`1eb5ba420`, 52 CI gates pass and two skip; Greptile is 5/5 with zero open
+threads. Later documentation heads require fresh checks. See the live report
+for exact source hashes, campaigns, failures and cost limitations.
+
## Findings ledger
Confirmed mechanics below do not by themselves establish an effect on task quality.
| ID | Finding | Work item / disposition |
| --- | --- | --- |
-| F1 | Native Codex sent Paperclip text as `baseInstructions`. Probes on codex-cli 0.153.4 showed replacement; additive `developerInstructions` retained the stock base on start and cold resume. | 1; app-server fix implemented, PR validation pending |
+| F1 | Native Codex sent Paperclip text as `baseInstructions`. Probes on codex-cli 0.153.4 showed replacement; additive `developerInstructions` retained the stock base on start and cold resume. | 1; app-server fix merged in PR #14920 |
| F2 | Default hires and role templates prescribe substantial operating procedures; common prompt and wake layers add further coordination text. | 2–3; mechanics confirmed, performance effect unmeasured |
| F3 | Hiring references require legacy Paperclip skill/comment procedures, while native Runner intentionally omits that operational skill and uses semantic tools. | 2–3, 5; reconcile runtime contracts |
| F4 | Local Claude appends instructions; Runner Claude preserves the Claude Code preset. Runner isolation excludes project/local settings, which can also exclude repository instruction discovery. | 4; selective context fix to design |
| F5 | Some Codex capability settings differ between the direct driver and daemon path; an intermediate configuration does not prove the final provider behavior. | 6; effective-path audit pending |
| F6 | Omitting or nulling `baseInstructions` on an old Codex thread's resume preserves its saved replacement; an empty string produces an empty base. | 1; document the required provider session reset; no automatic migration in this PR |
| F7 | The isolated Codex-through-ACP dependency patch also sets `baseInstructions` on start/resume. It is a separate path from the native app-server backend. | 6; follow-up patch/profile audit pending |
+| F8 | The operational skill says target-bound confirmations default `supersedeOnUserComment` to true; the default manual and server normalizer say false. The server uses false. | 2; correct stale skill/reference guidance in a follow-up |
+| F9 | The default manual required a comment on every task, while the operational skill's verified external-chat shortcut delegates comments and lifecycle bookkeeping to the harness. | 2; unconditional manual rule removed; shared layers still need review |
+| F10 | Removing the default manual left the 661-word legacy task template and its 172-word resumed-wake execution contract. Hermes and Pi have additional policy carriers. | 2.1 complete locally: task/chat defaults 113 words, no generic resume contract; 2.2 wrappers pending |
+| F11 | Task Markdown and the wake renderer prescribe different accepted-plan behavior for planning-mode accepted-confirmation payloads; tests currently expect both. | 2; unify the directive owner; production reachability still to trace |
+| F12 | Native fixed instructions and full-turn constraints repeat completion and uncommon procedures, while reserved finish/block tool descriptions are only one sentence each. | 2; improve tool documentation before removing needed native protocol guidance |
+| F13 | Existing context-integrity/chat fixtures injected a QA manual, so their green results did not qualify the production tiny hire default. | Dedicated stock-harness suite measured real default hires; retained failures prevent blanket qualification. |
+| F14 | Historical classic Claude/OpenCode skill runs save one Paperclip document; reduced runs save none while completing the task. Legacy ACP Claude has the same behavior under a separate guard failure. Pinned skill storage wording is ambiguous. | Measured delivery failures; keep original oracle. Improve legacy skill/API delivery guidance separately, then compare both variants with preserved and storage-specific cases. |
+| F15 | Classic Claude restart chat fails its memory assertion in both variants. | Existing behavior, not attributable to this reduction from these trials. |
+| F16 | All six legacy ACP cells per variant fail the persisted-provider-credential guard. Three historical ACP cells also have clipped public prompt retrieval, and candidate ACP Codex chat lacks a complete invocation receipt. | Security/receipt qualification follow-ups; do not waive guard, expose raw sessions, or infer missing provider instructions from clipped receipts. |
+| F17 | Prerequisites beside the campaign root violate trusted artifact selection. A same-target pilot superseded 13 candidate cells; one historical AWS runner shut down without upload. | Packaging fixed at `1eb5ba420` and pilot passes. Directory-layout-only copies preserve every byte; missing cells alone recovered at unchanged source, completed failures never rerun. |
Append new findings with evidence, affected paths, and the numbered item that
will address them. Record intentional behavior explicitly rather than as a bug.
@@ -210,10 +597,76 @@ will address them. Record intentional behavior explicitly rather than as a bug.
| Date | Decision / outcome | Evidence / follow-up |
| --- | --- | --- |
+| 2026-10-05 | Dotta merged #15151; reconcile the saved roadmap with completed implementation/evidence notes. | Native completion slice complete; general hiring reductions and common legacy prompts also merged. 2.2, remaining fixed native procedures, 3.4 and the broader 4–6 audits stay open. Preserve old failures and bounded qualification limits; no new model run or public report publication in this checklist update. |
| 2026-10-02 | Dotta approved preserving stock instructions, smaller defaults/templates, minimal coordination, runtime bookkeeping, and coverage across harnesses. | Implementation details to work through one item at a time. |
| 2026-10-02 | Paperclip-owned MCP isolation and configuration changes/session resets are acceptable. | Preserve Paperclip auth and assigned skills while fixing repository context. |
| 2026-10-02 | Dotta requested implementation and a PR for item 1. Native app-server paths now use additive developer instructions. | 139 targeted TypeScript tests and 91 Rust provider tests passed; repository typecheck/build passed. Remaining test/review results to record. |
| 2026-10-02 | Verified actual Codex instruction layering using a localhost Responses stub, without paid inference. | codex-cli 0.153.4 sent identical 14,732-character stock base instructions on start and cold resume, with the Paperclip marker retained in developer input. This is protocol evidence, not a task-quality eval. |
+| 2026-10-02 | Dotta requested and confirmed the merge of item 1. | PR #14920 merged at `408f70e69f9c5e49cb4377f4886ac2001bfa67a2`, with all 55 checks passing and Greptile 5/5. |
+| 2026-10-02 | Dotta directed an identity-only default manual with no skill or runtime pointers; the harness already handles coordination. | Reduced the default to eight words. Existing hire and onboarding suites passed all 64 tests. Shared prompts and role templates remain pending. |
+| 2026-10-02 | Dotta requested three explicit shared-prompt follow-ups and selected common legacy startup/resume reduction first. | Follow-ups 2.1–2.3 recorded. 2.1 complete locally: both defaults 113 words; generic resume contract removed. 563 focused tests and shared utility typecheck/build passed. Extra carriers and native instruction reduction remain pending. |
+| 2026-10-02 | Dotta requested executable eval coverage for everything implemented so far and all subsequent changes before continuing. | Added SH-1–SH-3 coverage map, credential-free prerequisite, and 24 production-default-hire cells. 478 prerequisite and 860 support tests passed; E2E typecheck/discovery passed. Live provider results remain `not_run`; item 2.2/2.3 unchanged. |
+| 2026-10-02 | Dotta requested PRs and GitHub-runner before/after qualification while discussing subsequent work separately. | Draft [PR #14948](https://github.com/paperclipai/paperclip/pull/14948); native Codex diagnostic [passed](https://github.com/paperclipai/paperclip/actions/runs/37034213743), 34.745 s provider / 56.660 s cell. Comparison restores only the prior manual/shared prompts and holds #14920 constant; no general coding-quality claim. |
+| 2026-10-02 | Full candidate cold setup failed before provider admission; stopped and retained the attempt. | [Run 37037105491](https://github.com/paperclipai/paperclip/actions/runs/37037105491), target `36e987246`: prerequisite imports lacked the plugin SDK build. Added ordinary dependency setup before credential-free prerequisites and exact-source coverage of connection guidance. Cold pilot and full matched campaigns pending. |
+| 2026-10-02 | Dotta deferred 2.2 additional legacy carriers and approved the first 2.3 native tool-description slice separately. | Keep wrappers open; native finish/block documentation must not be supplied to legacy skill/API completion paths. |
+| 2026-10-02 | Matched default-manual/shared-prompt campaigns measured failures, with #14920 constant. | Candidate `f02d8d0df`: 15/24 pass. Historical `12c5433c6`: 15/24 pass after the one runner-shutdown recovery also timed out. Classic Claude/OpenCode Paperclip document delivery regressed in observed trials; keep PR #14948 draft. [Live report](2026-10-02-stock-harness-live-comparison.md). |
+| 2026-10-02 | Cold prerequisite and packaging faults were repaired without weakening admission or behavioral graders. | Three setup attempts stopped before providers. Current `1eb5ba420` pilot passes 557 prerequisite checks and protected report publication; source/hash/cost evidence retained. Candidate cancellation and historical runner shutdown recovered only for missing cells. |
+| 2026-10-02 | Final bounded recovery completed; no further model reruns. | Both matched cohorts have all 24 results, 15 pass and nine fail. Two classic skill deliveries regress; two OpenCode ordered cases pass only with reduced instructions. Overall parity is not behavioral equivalence. All 48 retained result/receipt projections are hashed and sanitized; original interruptions and partial unknown spend remain recorded. |
+| 2026-10-02 | Dotta approved the measured legacy delivery repair and narrow follow-up qualification. | Early operational skill PUT/receipt/link guidance plus generic issue-document reference; eight-word manual retained. Focused original + explicit Paperclip-storage cases on classic Claude/OpenCode, with only the two skill sources varied. All four pairs completed: Claude original Fail → Pass, Claude explicit Pass → Pass, both OpenCode cases Fail → Fail. Explicit OpenCode handoff worsened beneath the unchanged machine grade (clickable API URL → code-formatted path). [Repair report](2026-10-02-legacy-document-skill-repair.md); no full matrix rerun. Claude chat-memory (F15) and ACP credential/receipt failures (F16) remain separate and unresolved. |
+| 2026-10-02 | Native tool-description comparison completed all six paired cases. | Zero newly failing cases, three unchanged completion passes, three unchanged blocker failures. Claude/OpenCode blocker API matchers pass in both variants; UI matcher wrongly demanded marker-only replies. Codex's exact-action punctuation failure is unchanged. Original failures retained; corrected 10-case browser calibration and separate retained-DOM replay pass all six visible replies. Exact Codex action failures remain. No native fixed-prompt removal measured. |
+| 2026-10-02 | Dotta approved minimal operational skill selection/link correction after retained OpenCode diagnosis. | Candidate `fe9dc1e3c` and baseline `0d7ecfa96d` have two matched Pass → Pass cases, zero new failures/passes and no pending pairs. All four exact-source gates pass 587 checks, all four provider runs and cleanup pass. Candidate original loads Paperclip/reference before delivery, but uses the wrong PAP prefix; baseline original saves publicly later within the same assignment and gives a bare path. Explicit clickable UI links are correct in both. [Complete report](2026-10-02-opencode-skill-routing-link-qualification.md); prior failures retained, no causal or broad quality claim. |
+
+- F18: Native blocker browser assertion required a marker-only reply despite asking for owner/action/reason. Correct marker-plus-explanation checks symmetrically, calibrate contradictory and future-condition replies, retain original verdicts.
+- F19: Original prompt-removal cohorts loaded Paperclip; OpenCode skill truncation omitted the late API recipe. The early repair fixed Claude in one paired trial. In the repaired original OpenCode assignment, Paperclip was first loaded only during disposition recovery after a local-file write. Shared legacy operational-skill delivery/selection needs review before more recipe expansion.
+- F20: Explicit repaired OpenCode reads the early recipe/reference and saves a public document/revision, but hands off a code-formatted path rather than a clickable anchor. Baseline provides a clickable API URL, rejected by the UI-only oracle. Preserve both grades; clarify future clickable UI-link fixture and review the smallest link example separately.
+- F22: Legacy operational skill mounting is already mandatory, but its discovery description omitted ordinary task/heartbeat work and document delivery. The approved narrow fix expands stock metadata selection and adds a real Markdown link example in the existing reference. Original + clarified-explicit OpenCode pairs both pass in both variants, so improvement causality is not established. Candidate loads the operational skill/reference before public delivery; baseline original writes locally first, then saves publicly in the same assignment. Original candidate copies the example PAP prefix into its link while baseline supplies a bare slug path; neither is scored by the original link-free oracle. No full-body injection or native-tool leakage. ACP Claude names-only metadata, custom ACP unsupported delivery, OpenClaw wrappers and Pi HOME differences remain distinct follow-ups.
+- F23: The new original OpenCode candidate copies `/PAP/issues/RUN-1#document-context-integrity-output` from the literal example despite actual prefix RUN. It passes durable-document grading but has an incorrect-prefix handoff. Baseline original also lacks a clickable canonical link. Approved reference-only correction now derives the link from `issue.identifier` and the saved receipt key. Independent provider-free calibration checks two other prefixes, redirected keys and rejects a wrong-company link; 25 focused document/source tests, canonical metadata checks and E2E typecheck pass. The recipe now also handles null/absent identifiers through the supported issue-ID route; fresh review caught the initial nullable edge. 56 focused checks pass. Source review shows the UI corrects wrong prefixes, so the frozen PAP href is noncanonical rather than proven broken. These later corrections are not live-qualified by the preserved runs; no further paid rerun.
+- F21: Skill heading insertion shifted both generated capability inventories. General CI caught stale metadata after the frozen repair campaign’s narrower build admitted providers. Regenerate canonical derived files and require stale-manifest/inventory checks before future provider admission.
For each completed item, add the chosen behavior, changed paths, verification
results, remaining exceptions, and follow-ups here before checking it off.
+
+
+### 2026-10-05 final PR #15218 scope
+
+- [x] Preserve all three experimental cohorts and failed original grades.
+- [x] Reject the unqualified procedure relocation; final production bytes match master a65ca0950834a85bb93bcc4b4042ecacdebfef53.
+- [x] Keep complete native-tool measurement, explicit workflow coverage, selected-provider credentials and budget guards.
+- [x] Full local typecheck/build and 1,252 eval-support + 128 Node tests pass.
+- [x] Final head 2e7cef78eef7cdfe02265e0dcb03e855b8e50bd8: all 47 CI jobs pass; one initial annotation-test timeout retained and one targeted retry passed. Fresh Greptile 5/5, three threads resolved, published body verified, both ready-transition security scans pass, MERGEABLE and no longer draft.
+- [x] PR #15218 merged on 2026-10-06 at 01:03 UTC. The preceding approval hold is historical; the final merged scope is measurement and eval coverage with production unchanged.
+- [ ] Section 2.3 procedure relocation remains unshipped; the trials do not justify it. Runtime follow-up preserved separately and unqualified.
+
+
+### 2026-10-06 roadmap update
+
+- [x] **#15218 merged:** complete native-tool measurement and explicit hiring/delegation eval coverage. The proposed production procedure relocation failed qualification and was excluded. Original failures remain recorded.
+- [x] **#15296 merged:** shrink the runtime and bundled plan-to-tasks skills while retaining their installation keys and accepted-plan wiring. GitHub records the merge at 14:36 UTC. The detailed completed comparison report remains local pending its separate publication consent; merging the implementation does not publish that report.
+- [ ] **Next bounded repair:** a reopened native child must notify its parent after its new completion, even when the first notification has already been consumed. Replaying the same committed completion must not create another wake. Work is on `codex/delegation-handoff`, based on master `0fe47882cfcb12082035113c59ca96091c46ebfc`.
+- [x] **#15372 implemented and deterministically verified:** ordinary native child completion wakes include the durable decision ID; exact watchdog behavior and replay deduplication are preserved. Both ordinary regressions fail on baseline, and all 20 database-backed cases pass with the repair. Current head `a2ae2324ce7692e704fc43e99904b076d6246fee` has full green CI and fresh 5/5 review; it remains draft because the completed live comparison contains a new failure.
+- [ ] **#15372 live qualification failed; keep draft:** Codex PASS → FAIL, Claude FAIL → PASS. One new failure, one new pass, no pending pairs; equal totals do not prove non-regression. Four completed cells contain 17 actual agent runs, no retries, cleanup passed. Candidate Codex's revised child completion wakes coalesced into an active parent, which later ended Blocked using an outdated child-running view; no later parent execution is retained. A later backstop log reports repair but does not prove eventual completion. That cell never reached the independent ZIP oracle. The unstarted candidate Codex queue job was cancelled with no runner/steps before its first actual trial in campaign `37513070706`. Four earlier composer setup failures had zero agent runs and remain preserved. Original grades are unchanged; no causal attribution or reroll.
+- [ ] **Latest child delivery/review remains open:** both Claude parent finals point to an earlier parent ZIP while the original oracle checks the revised child's ZIP. The candidate's passing grade does not qualify delivery/review of that latest artifact. Parent ZIP bytes were not retained, so a different hash alone is not proof of missing functionality. This is separate from the consumed-wake regression. Preserve original grades.
+- [ ] Revisit hiring/dependency instruction reduction only after the bounded behavior is qualified. Premature parent completion, discarded unfinished dependencies and broader latest-child review remain separate open behavior questions.
+- [ ] Audit connection procedures separately, then return to the remaining 2.2 / 3.4 / 4–6 work.
+
+#### #15372 reporting disposition — 2026-10-06
+
+The complete original comparison and diagnosis are saved privately at
+[immutable evidence archive](https://github.com/paperclipai/paperclip-evals/blob/a3fdf327907816c22c4097da8839db4f472d5e9c/experiments/2026-10-native-delegation-handoff/README.md).
+The prepared public body is `/private/tmp/delegation-handoff-pr-body.md`.
+The human explicitly authorized publication and requested fixing the failures.
+The prepared summary was published normally to PR #15372; the earlier automatic
+review hold is resolved for this summary. The original comparison remains unchanged.
+
+#### #15372 active-parent repair — 2026-10-06
+
+- [x] Implement durable delivery of ordinary native child completions to a fresh parent turn when the parent is already running; preserve exact watchdog behavior.
+- [x] Keep a parent non-terminal while a newer native child result remains queued or deferred, with a commit-time recheck. Preserve terminal cancellation and governance authority; do not create a second continuation.
+- [x] Provider-free verification: 67 focused scheduler/native-conformance/authority tests and repository typecheck pass. The scheduler regression holds the parent open, dispatches/replays the child result, then verifies exactly one sequential continuation with the latest summary. Pending, consumed and current-run delivery identities have native finalization coverage.
+- [ ] Freeze and measure the corrected source in the same two original live cases, one attempt each. Do not reroll the original baseline or regrade the failed candidate.
+- [ ] Verify the latest source head in CI/review and inspect final parent artifact delivery before claiming readiness. Keep draft until these gates pass.
+
+- [x] Preserve intermediate campaign `37518652522` as two cancelled, ungraded attempts on `3c1cf68`; provider activity/charges and cleanup are unverified because only invocation policies survived. These are separate from the original 17 actual runs.
+- [x] Audit the concurrency review finding with a real database barrier and distinct agents. Existing implicit locking serializes this tested ordering; make the parent lock explicit before child status writes. Do not claim a newly reproduced live defect.
+- [ ] Finish fresh source checks/review, then qualify the corrected source against the frozen baseline and inspect latest-artifact delivery.
+- [x] Explicit-lock revision: 68 focused tests and full repository typecheck pass. Fresh build, CI/review and live checks remain pending.
diff --git a/doc/plans/2026-10-03-composio-account-sync-user-stories.md b/doc/plans/2026-10-03-composio-account-sync-user-stories.md
new file mode 100644
index 00000000000..2ee272454d8
--- /dev/null
+++ b/doc/plans/2026-10-03-composio-account-sync-user-stories.md
@@ -0,0 +1,93 @@
+# Composio account sync user stories
+
+October 3, 2026 · Acceptance criteria written before implementation; results recorded after the embedded-browser walkthrough
+
+The user starts on Apps with a saved Composio gateway. Composio owns app accounts and authorization; Paperclip shows provider observations and controls access to the saved gateway. Existing access restrictions must survive every discovery and setup action.
+
+The current Connect MCP credential supports account listing by toolkit, not an authenticated list-all inventory API. Automatic discovery therefore checks the supported Composio catalog in bounded background batches, independently of search and pagination. Custom apps absent from that catalog remain outside this coverage. The UI and final test report must describe that limit.
+
+## Expected journeys
+
+| Story | Expected outcome | Independent evidence |
+| --- | --- | --- |
+| As a returning user, I see apps already authorized in Composio without searching or reconnecting them. | Apps begins syncing the saved gateway. Accounts discovered anywhere in the supported catalog move above the paginated catalog, with their app logo and Composio source. | Provider fixture has a pre-existing account outside the first catalog page; no add call, task, new gateway, or grant is created. |
+| As a user, I reuse an existing app authorization when I click Connect. | Select a saved Composio account, continue, and see its existing app account. No second sign-in link. | Provider calls contain list only for the already active app. |
+| As a user, I authorize a missing app directly. | Choose the saved account, open the hosted provider link, complete sign-in, and return to verify. No agent or task picker. | Provider account changes after authorization; completion reads it again. |
+| As a user, I see an app I connected independently. | Automatic sync or Refresh discovers it without finding its catalog page. | Change the disposable provider's account state independently; use the production Apps UI to refresh. |
+| As a user, I see an app disconnected or expired independently. | A complete account check removes the disconnected account or shows Needs sign-in for the expired one. | Provider returns an empty list or EXPIRED account; the old green Connected state disappears. |
+| As a user, I manage Composio app accounts in Composio. | Manage lists the observed accounts and offers Open in Composio. No local rename or remove action that silently changes upstream state. | Open the row menu and management dialog; inspect the external link and confirm zero rename/remove calls. |
+| As a user, I understand whose permissions I am editing. | Imported app menus say Composio permissions and open the saved gateway. A short explanation says access applies across this gateway's apps. | Navigation goes to the gateway's existing permission screen; native connectors retain Permissions. |
+| As a user, I see native and Composio account sources accurately. | Native Connect remains preferred; an already authorized upstream account remains visible. Attribution says Via the quoted gateway name rather than inventing an upstream author. | Seed a native-overlap app upstream; inspect its card, account row, and source link. |
+| As a user, I can recover from a failed check without losing accounts. | Keep prior observations with a visibly unverified status; show a useful retry action. A successful retry restores verified status. | Provider failure followed by success; no account deletion or false disconnected result. |
+| As a user with several Composio gateways, I see accounts grouped by their actual source. | Show each source separately and preserve selection in setup/management. | Distinct provider accounts behind two saved gateways; calls use the selected gateway. |
+| As a user, I remove the local Composio gateway without deleting its upstream apps. | Confirmation states that Composio accounts remain. Saved gateway access and its imported rows disappear locally. | Use a disposable gateway; provider accounts remain and no upstream remove/revoke-app call occurs. |
+| As a user, I can browse and search a large catalog while sync runs. | Installed accounts stay above each catalog page. Sync feedback does not block search, pagination, or cancel. | Search and change pages during sync; inspect persistent accounts and bounded page size. |
+
+## Verification boundaries
+
+Use the embedded browser against the built production UI and real Paperclip server/database. Live checks use the existing Composio test gateway for reads and management navigation. Authorization, expiry, independent disconnection, errors, and local removal use a clearly marked disposable provider fixture so valuable real accounts are preserved.
+
+Fixture results establish Paperclip behavior through the real UI and backend, not real Composio authorization compatibility. Record these separately. A passing unit test or API response alone does not pass a browser journey.
+
+## Results
+
+The implementation and all twelve Paperclip browser journeys passed within the boundaries below. Fresh third-party OAuth consent was simulated through the disposable provider; it is not claimed as a live provider pass. Live reuse and discovery were verified with the saved Composio gateway and independently compared with Composio's own account inventory.
+
+### Live Composio
+
+Tested the built Apps UI at `http://localhost:3104/TES/apps`, using the existing **Composio test gateway**. No real account was removed, renamed, or newly authorized, and no agent permissions were changed.
+
+- Automatic discovery checked all **1,583 catalog toolkit identifiers**, including aliases and native overlaps, with zero failed toolkit checks. Circleback and the independently connected Airtable account appeared above the paginated catalog without searching for them or requesting another sign-in.
+- Opening the old `/TES/apps/connect?source=composio&targetToolkit=circleback_mcp` URL selected the saved gateway. Continue reused the active Circleback account, closed setup, and cleared the setup query. Reload did not reopen the dialog. No new task or gateway was created.
+- Manage Circleback showed the provider account and its default status, the quoted source connection link, and the explanation that Paperclip permissions apply across this gateway. The source link opened the correct existing permission screen. Native Notion retained **Permissions** and **Remove connection**.
+- **Open in Composio** was clicked from Paperclip. Its final destination was the consumer **For You → Connect Apps** screen, rather than Platform developer projects. Selecting Connected showed the same two apps: Airtable and Circleback MCP, both with one active account.
+- A subsequent background check failed at 448 of 1,583 identifiers. Previously observed accounts remained visible as unverified. Refresh recovered, and the next complete scan again checked 1,583 identifiers with zero failures. The failure's provider/transport cause was not established; it is not presented as an app disconnection.
+
+### Disposable provider journeys
+
+Used the production React build, company-scoped tool-access routes, service, and real local PostgreSQL database at `http://localhost:3110/COM/apps`. Only outbound responses for two explicitly fictional fixture gateways were controlled through the service's existing remote-request test seam. This was a separate company with a paused agent and no issues.
+
+| Journey | Browser result and corroboration |
+| --- | --- |
+| Pre-existing apps without search | Circleback accounts behind two gateways, imported Notion, and Zendesk outside the first catalog page appeared automatically. No add request, task, or agent grant was needed. |
+| Existing authorization | Live Circleback reuse passed as described above; setup checked the existing account before deciding whether authorization was needed. |
+| Missing app authorization | Spotify opened the saved-account dropdown with Work, Personal, and Connect a new account. No agent picker appeared. Continue produced the hosted sign-in link. Premature completion showed a useful “finish connecting” error. After independent fixture activation, completion verified the account and displayed its connected row. The fictional hosted link itself was not opened. |
+| Independent connection | Added Spotify and Airtable in provider fixture state, then clicked Refresh. Both appeared without using their native Connect actions. |
+| Independent disconnection and expiry | Removed Personal Circleback and Zendesk upstream; expired Work Circleback. After sync, the removed accounts disappeared, Zendesk returned to Connect, and Circleback showed Needs sign-in rather than a green check. |
+| Provider-owned management | The imported row menu contained only Open in Composio and Composio permissions. Manage was an observation view with Refresh and the provider link. Recorded provider actions contained no rename or remove operation. |
+| Permission ownership | Composio permissions navigated to the actual saved gateway. Its explanation appeared before the human/agent permission controls. No permissions were changed by discovery or setup. |
+| Native overlap and source attribution | The Airtable card retained native Connect while displaying its already connected upstream account. Imported Notion remained visible. Imported rows said Via the quoted gateway name; native rows retained Connected by. |
+| Failed refresh and recovery | Injected HTTP 503, clicked Refresh, and saw the last known accounts with Not verified and retry. Restored the provider, clicked retry, and saw verified Connected again. |
+| Several gateways | Circleback showed two distinct accounts and source links. Management switched between Work and Personal; after Personal's upstream removal it correctly showed no accounts, without displaying Work's account under Personal. |
+| Local gateway removal | Cancel preserved the gateway. Confirming Remove archived Work and revoked its local organization grant; Work's imported rows disappeared, while Personal remained. The fixture's upstream account state was byte-for-byte unchanged. No upstream remove or rename action occurred. |
+| Search and pagination during sync | Searched Spotify while checking; cleared search; moved to page 2 showing 25–48 of 1,548 connectors; searched meeting apps while checking. Installed accounts remained above the catalog and browsing stayed responsive. |
+
+Additional checks: a single-provider Circleback action skipped the provider picker. After Work's removal the saved-account dropdown offered Personal and Connect a new account. Choosing the latter opened normal gateway setup with organization-wide defaults, a Reuse an existing session disclosure, and one Change link. Cancel created no gateway.
+
+The fixture call log recorded **list** and one **add** action, with a maximum batch size of **32**. Database checks found zero fixture issues, no added agent grants, an archived Work gateway, and an active Personal gateway. The fixture's health check was adjusted to prevent the real server from probing the fictional host; this was fixture setup, not a product fix. After recording these results, the disposable company was archived and its fixture server and browser tab were closed. The live Apps page remains available.
+
+### Issues found and corrected during the walkthrough
+
+1. The legacy targeted setup URL opened a new-gateway wizard despite an existing active gateway. It now uses the saved-account chooser, preserving explicit new/resume/reconnect flows.
+2. Successful targeted setup left query parameters that reopened the dialog on reload. Completion and cancel now consume that setup query.
+3. The imported account button had a duplicated “account account” accessible label. The label now uses the account's actual name.
+4. Gateway permission scope appeared below the controls. It now precedes them so users see the scope before editing.
+5. The bare Composio dashboard URL opened Platform developer onboarding. The consumer-management link now uses `https://dashboard.composio.dev/~/org/connect/apps`, verified in the embedded browser without embedding a user-specific organization slug.
+
+### Automated verification
+
+- Focused UI/shared tests: **320 passed** across Browse, AppsConnect, AppDetail, aggregator setup, and catalog mapping.
+- Backend Composio setup/sync tests: **21 passed**, including batch size, concurrent leases, incomplete/error evidence, recovery, company access, and credential changes during a check.
+- Repository-wide `pnpm -r typecheck`: passed.
+- Repository-wide `pnpm build`: passed; the final management-link edit also passed a fresh UI build.
+- `pnpm check:token-gates`: passed after the final UI edit.
+- Repository-wide `pnpm test:run`: failed in the first general-server phase after **14,825 tests passed**, with timeout failures in access-service startup, project-icon startup, direct-adapter execution, and Git streaming, plus a worker-start timeout for server-info. Later workspace/serialized phases did not run because this command stops on failure.
+- Separate rerun of those five files: **32 tests passed** across access-service, project-icon-persistence, heartbeat-direct-adapter-native-isolation, and server-info. The single `workspace-git-snapshot-streaming.test.ts` test still timed out at its 300,000 ms limit. That test and its implementation were not changed by this work. No full-suite pass is claimed; its remaining timeout is recorded rather than hidden or worked around by changing the test.
+
+### Coverage limits
+
+Automatic discovery covers the supported public catalog, not arbitrary custom apps absent from that catalog. It uses the authenticated Connect MCP account-list tool because saved gateway OAuth is not a consumer list-all API key. Observations are isolated by company, human viewer, and credential selection; changed credentials require fresh evidence.
+
+The hosted authorization handoff, premature completion, and post-authorization verification were tested with controlled provider responses. This report does not claim that a new real Spotify OAuth consent flow was completed. No paid runner evaluation, exhaustive mobile/accessibility audit, or new Arcade account synchronization was performed. Existing Arcade setup remains intact.
+
+Paperclip still exposes and governs the saved gateway's outer MCP tool catalog. Imported app rows do not re-publish each underlying service's tools or promise app-level permission isolation inside Composio's gateway.
diff --git a/doc/plans/2026-10-03-connection-instructions-and-memory-evals.md b/doc/plans/2026-10-03-connection-instructions-and-memory-evals.md
new file mode 100644
index 00000000000..0352b79f720
--- /dev/null
+++ b/doc/plans/2026-10-03-connection-instructions-and-memory-evals.md
@@ -0,0 +1,363 @@
+# Connection instructions and a small memory smoke suite
+
+Implementation update (2026-10-05): the generic capability is specified in
+[Connection instructions](../connections/CONNECTION-INSTRUCTIONS.md). The
+Storybooks now use production components. Model evaluations in this original
+design plan remain deferred.
+
+Status: original UX proposal. The production implementation now follows the
+linked capability contract. Live model evaluations remain deferred.
+
+## Decision
+
+Make **Agent instructions** an optional connection capability. A connection can
+provide a short paragraph that tells assigned agents when and how to use it.
+Memory is the first use case. Use the same pattern for other services whose
+purpose needs standing guidance, without requiring users to install a skill.
+
+The checkbox says **Tell agents to use Honcho** (using the provider name). Show
+this section only when the connection explicitly provides a nonempty instruction
+template. Default it on, show the exact paragraph, and offer **Reset to default**
+only after edits. Turning it off preserves the paragraph and shows an amber notice. On the agent, show a read-only copy
+with its source and a link back to the connection.
+
+Compose this into runtime instructions beside the agent's own instructions.
+Do not append persistent text to AGENTS.md: that would create duplicate, stale
+instructions after editing, reconnecting, changing assignments, or disconnecting.
+An optional generated run-local file can be a delivery mechanism for a harness,
+but the canonical agent files remain untouched.
+
+## What exists, and what is still unproven
+
+The five experimental catalog entries are ordinary remote MCP connections behind
+`enableMemoryConnectors`. `doc/connections/memory-tool-inventory.json` records
+authenticated discovery on **2026-09-24**, explicitly not execution of every tool.
+
+| Provider | Captured tools | Smallest useful path in that snapshot |
+| --- | ---: | --- |
+| Mem0 | 11 | `add_memory` → `get_event_status` if asynchronous → `search_memories` / `get_memory` |
+| Honcho | 40 | Resolve workspace/peer/session → `add_messages_to_session` → `search` or `get_session_messages` |
+| Supermemory | 16 | `add_memory` → `search_memory`, scoped to the approved space/tag |
+| Zep | 12 | `add_memory` / `add_memory_to_graph` → `search_graph` |
+| Cognee | 3 | `remember` → `recall`; `forget` for supported cleanup |
+
+These are observed names, not a cross-provider API or a claim that every
+operation works. Capture fresh schemas before writing live fixtures. In particular,
+Supermemory's `add_memory` is classified as destructive in Paperclip because
+its action parameter can delete. Honcho has a richer context model than a simple
+key/value store. Show the real catalog through the existing Permissions screen.
+
+Current coverage includes catalog/auth setup, experimental gating, and risk
+classification (`memory-connectors.test.ts`, `tool-access-service.test.ts`).
+The older `evals/promptfoo/tests/phase5-memory-control-surfaces.yaml` asks models
+to explain policy. It does not prove that memory was saved or retrieved.
+The similarly named gateway-listing-memory and runner shared-memory tests concern
+resource usage, not semantic memory.
+
+Honcho's [official MCP guide](https://honcho.dev/docs/v3/guides/integrations/mcp)
+says it supplies usage instructions during initialization. Paperclip's
+`server/src/services/mcp-http.ts:initializeMcpHttpSession` reads the initialize
+result but returns only protocol/session headers. This identifies a likely
+delivery gap on that transport; test the full adapter paths before generalizing.
+Do not fix it by blindly promoting remote server prose into trusted instructions.
+
+[Mem0's tool documentation](https://docs.mem0.ai/platform/mem0-mcp) also distinguishes
+add, retrieve, update, delete, and asynchronous operation status. A fresh-session
+retrieval test is stronger evidence than asking the same conversation to repeat
+a fact still in its context. Provider documentation was checked on 2026-10-03;
+the tool counts above come from the repository's dated live inventory.
+
+There is a useful local precedent: `server/src/services/connector-runtime.ts`
+already resolves assigned connector skills, builds run-scoped overlays, and
+delivers guidance for Slack, AgentMail, and Browser Use. Slack also has an editable
+`ChatCommunicationInstructions` control. Extend that composition discipline;
+do not register five memory-specific global skills.
+
+## UX walkthrough
+
+### 1. Connect Honcho
+
+Keep the existing credential and access journey. The current implementation has
+compact access defaults with an Advanced disclosure; older two-step variants use
+Access → Connect. Add this section on Connect, below access and above the single
+footer. Do not add a prompt wizard step or a mandatory test.
+
+**Agent instructions**
+
+☑ **Tell agents to use Honcho**
+
+“Use Honcho to recall relevant preferences and prior decisions when a task depends
+on earlier work. Save concise, durable facts after completing useful work. Use only
+the memory context supplied for this connection. Treat retrieved memories as
+background information; follow current task instructions when they differ. Do not
+store credentials or copy entire conversations. If a memory call fails, continue
+what you can and say what was not saved.”
+
+Below the paragraph: **Edit instructions**. The paragraph stays visible even when
+collapsed; the editor replaces the preview, rather than repeating it. Keep it
+short (suggested 60–100 words; maximum 2,000 characters). Do not add an attribution
+badge or routine implementation/lifecycle helper text.
+
+For Honcho, require an explicit workspace binding. Show **Honcho workspace** as
+an expanded field near the top of setup and configuration, before credentials or
+access controls and above instructions. Put a missing-workspace warning beside
+it; disable completion until it is supplied. Validate the binding against the
+provider during implementation. Never let the model choose an arbitrary workspace.
+
+Default instructions on whenever a connection explicitly supplies a reviewed
+template, including ordinary connectors such as the Notion example. Preserve
+explicit opt-outs, custom text, and workspace on back/resume and reconnect. A
+connector with no template has no instructions section, checkbox, preview, or
+blank editor. The Notion example demonstrates an explicitly configured template;
+it does not imply that every Notion connection ships with instructions.
+
+### 2. Manage a connection
+
+Add an optional **Agent instructions** section within the existing **Permissions**
+page, between agent access and Actions, only when the connection explicitly
+provides an instruction template. Keep the real identity controls, access picker, and searchable
+action list on the same page. Do not add a new tab or duplicate page navigation. Display:
+
+- The checkbox and exact paragraph; **Edit instructions** and, after edits,
+ **Reset to default**. No “Suggested by Paperclip” badge.
+- A live recipient summary derived from existing assignments: “Applies to Ada and
+ Morgan when this connection is available to the task.” Link to Permissions to
+ change access. “All agents” explicitly includes future eligible agents.
+- Honcho workspace is a visible field near the top of the page, before access
+ controls, with its missing-value warning in the same place.
+- **Cancel** left and **Save instructions** right. Save errors retain the draft.
+- A plain saved receipt: “Saved.”
+
+Turning guidance off preserves the saved paragraph and tool access, and shows an
+amber notice: “Agents won’t be told when or how to use Honcho.” Disconnecting
+or losing access excludes both the guidance and tools from subsequent runs. A
+missing workspace, unavailable credential, or unsupported adapter gets an explicit
+“Instructions not applied” reason and a repair action; never a success badge.
+If required writes are Off or Ask first, say so and link to Permissions. Saving
+guidance must not change those policies or imply that writing is already allowed.
+
+### 3. Inspect an agent
+
+In the existing agent instructions area, add **From connections** beneath the
+agent's own files. Each row shows provider, short use summary, On/Off/unavailable,
+and its source. Expanding a row shows exactly what will be supplied and the
+effective binding for the viewed task context. **Manage in Honcho** returns to the
+connection editor. It is read-only here so the source of truth is unmistakable.
+
+Distinguish configured guidance from effective guidance: a personal credential
+may be usable only for the responsible user's tasks. Without a task context,
+state this condition rather than promising unconditional application.
+
+Memory remains an ordinary connector capability. Do not introduce a default-memory
+chooser, memory-specific agent preference, or first-class memory settings area.
+Connection instructions compose through the general connector instruction path;
+users manage each connection’s instructions and assignments in its configuration.
+
+## Runtime and storage proposal
+
+Implement only after the UX has been reviewed. Suggested contracts:
+
+1. Add optional, versioned `agentGuidance` metadata to the AppDefinition source
+ and schema: template ID/version, default text, and required context/capabilities. A nonempty
+ template opts the connector into the UI; instructions start enabled. Regenerate
+ the catalog from its authoring source; do not hand-edit generated JSON.
+2. Store company-scoped connection guidance with `enabled`, text, reviewed
+ template version, revision, editor identity, and update time. Store provider
+ context in a typed binding separate from prose; validate access on save and
+ resolution. Keep public API/shared validators/db/UI contracts synchronized.
+3. Reuse the same effective access resolver as tool delivery: company, agent,
+ task, responsible human, grant, connection health, and action policies all
+ matter. Agent assignment alone must not imply access to a personal grant.
+4. Resolve a stable ordered list of instruction blocks per turn. Include source
+ connection and revision, the short paragraph, and structured provider context.
+ Use actual runtime tool aliases and current schemas for any detailed recipes.
+ Do not paste the entire 40-tool Honcho catalog into the paragraph.
+5. Include a guidance digest in session compatibility/input composition. Native
+ and resumed sessions must observe updates on the next turn. If a harness
+ cannot replace old context, start a fresh session or display the limitation;
+ never keep supplying conflicting old and new blocks indefinitely. Active
+ calls remain governed by current gateway authorization on every invocation.
+6. Log edits and assignment changes as normal company activity. Record revision
+ and binding references in local run evidence. No new first-party Telemetry is
+ needed. Preview and run composition must share one resolver so they agree.
+
+An enabled paragraph is user-controlled operating guidance, not authorization to
+bypass budgets, approvals, current user intent, or company boundaries. Templates
+are maintained by Paperclip; provider initialize instructions are external data
+that can inform a reviewed template, not an automatic template update. Pin saved
+versions; show “Suggested instructions updated” with a diff and deliberate apply.
+Never replace custom text during catalog refresh or reconnect.
+
+### Memory context is not an access-control boundary
+
+For the first Honcho slice, bind a dedicated workspace to the connection. Derive
+stable peer IDs from company + agent and session IDs from company + task; retries
+must reuse them. Decide these values in server code, not in editable prose. Show
+the workspace openly near the top of configuration; users should not need to
+invent peer IDs. Treat the task's responsible human as a separate subject when needed,
+not as interchangeable with the agent's peer.
+
+A peer ID, tag, or query filter may partition retrieval without preventing an
+agent holding broad tools from reading another scope. Do not label that “private
+memory.” If private
+agent memory is promised later, enforce scope arguments server-side, disallow
+unscoped/list/bulk operations that bypass the boundary, and test alternate tool
+paths. Until then, use isolated provider credentials/workspaces for confidential
+scopes. Paperclip company access checks still apply to every connection.
+
+## The smallest useful evaluation
+
+Two separate questions: **does the integration work?** and **does the instruction
+make a small model use it appropriately?** Do not ask an LLM judge to score either.
+Assert tool calls, arguments, returned records, and a random fact in the answer.
+
+Start with Honcho and Mem0. Each has a different memory shape, and both are already
+in the catalog. Expand to the other three once those fixtures are useful.
+
+| Case | Setup / task | Pass evidence |
+| --- | --- | --- |
+| Discover (no model) | Authenticate disposable test connection and list tools through the actual run gateway | Required read/write tools visible; record schema hashes and policies |
+| Save → fresh recall | A: “Remember: release codename is ``.” B: fresh task/session, same memory subject: “What is the release codename?” | Confirmed write receipt; B performs retrieval before answering and includes the nonce from the returned record |
+| Implicit recall | Seed a synthetic formatting preference, then ask “Draft my weekly update” without mentioning memory | Guidance-on run retrieves and follows the seeded preference; record guidance-off control separately |
+| Skip irrelevant work | “What is 19 × 7?” with memory available | Correct answer, no memory calls or unnecessary writes |
+| Failed write / denied access | Return write failure; separately deny the grant | No “saved” claim; useful task continues; no fallback to another user's/company's memory |
+| Updated / disabled guidance (no model) | Change text, resume; turn off; unassign; revoke | Correct revision supplied once or absent as applicable; no agent file changes |
+
+The fresh-recall reader receives neither the writer transcript nor its answer,
+nonce, runtime session, scratch files, or task summary. Disable other memory
+providers and fixture workspace-memory carryover. Give reader a fresh execution
+workspace. Only the provider contains the answer; the assertion runner knows the
+nonce. Same model instance/conversation is not sufficient isolation.
+
+Run a deterministic gateway round trip before spending model tokens. For async
+ingestion, poll a documented status/read path with a bounded deadline (proposed
+60 seconds), record “indexing timeout” separately, and never sleep an arbitrary
+amount then declare the model wrong. For Honcho, first prove raw message retrieval;
+inferred conclusions are a separate, slower capability.
+
+Use the existing Product E2E runner for through-Paperclip evidence; follow
+`add-product-e2e-eval` and `paperclip-evals` when implementing. Use a fixture MCP
+server in ordinary CI. Account-bound runs are opt-in; the fixture suite proves
+Paperclip behavior, not provider availability. Existing promptfoo response-text
+tests cannot substitute for the tool loop.
+
+**Model candidates:** start with GPT-5 nano for the baseline, then Gemini 3.1
+Flash-Lite as the independent confirmation, if the configured runner provider
+supports them. They are inexpensive candidates, not models already proven on
+these connectors. Check the [OpenAI model page](https://developers.openai.com/api/docs/models/gpt-5-nano)
+and [Google pricing](https://ai.google.dev/gemini-api/docs/pricing) at execution
+time, including reasoning-token charges and any routing markup. If unavailable,
+select another small tool-capable model from the installed roster and record the
+substitution; do not expand this UX work into a new model adapter.
+
+**Cost envelope:** begin with one small tool-capable API model supported
+by the runner, then one from another provider for confirmation. Select from the
+current installed roster/pricing at execution time, pin exact IDs in the report,
+and use a configurable `MEMORY_EVAL_MODEL` rather than “latest.” Do not treat
+“free” endpoints as reproducible CI. Initial matrix: 2 providers × 1 model × 4
+behavior cases; save/recall uses two isolated sessions per case. One run per cell,
+max 6 tool calls/session, 1,000 output tokens/session, concurrency 1. Proposed
+hard ceiling: **$1 model spend per matrix**, and **$0.10 per cell**; stop before
+dispatch if the reserved worst-case cost exceeds the remaining budget. Count
+input tokens/tool schemas too. No automatic retry of failed model cells.
+
+Provider memory/derivation charges are separate: report them when available and
+otherwise mark them unknown, never $0. Use designated test accounts, synthetic
+facts, and a unique prefix. Cleanup only returned IDs or the known disposable
+session/workspace; do not run account-wide delete tools. If cleanup is unsupported
+or fails, report retained IDs and the required manual cleanup.
+
+A report needs provider, endpoint/catalog hash, model ID, instruction revision,
+effective scope, per-case result, tool transcript/receipt IDs, latency, model
+usage/cost, provider cost availability, and cleanup status. Classify configuration,
+auth, policy, schema drift, ingestion, model behavior, and cleanup failures
+separately. A connected badge or model saying “I remembered” is not evidence.
+
+## Delivery slices and acceptance
+
+1. **This proposal:** interactive Storybook placement, editing/off/error states,
+ agent preview, ordinary-connector examples with and without instructions, mobile/light views,
+ and the connector playbook convention. All mutations are local simulation.
+2. **First runtime slice:** shared guidance contract, persistence, Honcho binding,
+ optional UI within existing configuration, one prompt composer for native + local harnesses, meaningful
+ assignment/revocation/resume tests. Provided templates default on while preserving
+ explicit opt-outs; missing templates add no UI or runtime text.
+3. **Smoke slice:** deterministic gateway checks plus the bounded Honcho/Mem0
+ model matrix above. Keep Experimental until both have fresh-session evidence;
+ the other providers stay unverified until individually exercised.
+
+Review in Storybook: **Design explorations → Connections → Agent instructions**.
+The specimens render the production app shell, setup flow, and connection detail
+page. The instructions block is composed into those pages through optional layout
+slots. Credential handling, persistence, bindings, and delivery receipts are simulated. No credentials
+or real memory providers are contacted. The plan intentionally does not ship a
+new memory service, transcript mirroring, memory browser, or automatic hooks.
+
+## Prototype verification (2026-10-03)
+
+- UI TypeScript check passed after building the shared and plugin SDK type
+ dependencies in this fresh worktree.
+- Full Storybook static build passed. Existing CSS highlight/font-resolution and
+ chunk-size warnings remain; no build errors.
+- All 14 new stories rendered in Chromium without page errors. Browser checks
+ exercised edit/save/agent preview, disabling while retaining text, failed save
+ and retry, and setup draft exit/resume.
+- Inspected desktop and 390-pixel mobile captures; no horizontal overflow.
+- Token gates, palette/character sync checks, and `git diff --check` passed.
+
+In the initial proposal, no production code was changed. Repo-wide server tests/builds and account-bound
+memory/model evals were not run for this design-only change. Run the full PR
+checks before a PR-ready implementation handoff. This local Codex chat has no
+Paperclip issue/run identity, so issue artifact upload and work-product creation
+could not be associated with a destination. The plan and stories are retained in
+the repository; the built review is available through the local Storybook server.
+
+## Revision: use the actual configuration pages (2026-10-04)
+
+The initial specimens invented a header, tabs, and a wider setup form. Replaced
+them with the real `Layout`, `ConnectionSetupFlow`, and `AppDetail`, backed by
+Storybook API fixtures. Credential instructions, requirements links, the compact
+form width, Back/Connect footer, identity controls, agent access, and the searchable
+Actions list now come directly from production components. The new section lives
+under Permissions after agent access. Setup adds only the instruction section
+above the existing footer. No extra workspace input is added to setup.
+
+`Current connect page` and `Current configuration page` render the same production
+pages without the proposed section, for direct comparison. The agent preview is
+a dialog over the connection page; it does not impersonate an implemented agent
+configuration page. The only production changes are optional composition slots;
+normal callers supply no new content and keep their current behavior.
+
+Verification for this revision: UI TypeScript and the full Storybook build pass.
+All 242 tests across `AppDetail.test.tsx`, `AppsConnect.test.tsx`, and
+`ConnectionSetupFlow.architecture.test.ts` pass. Token gates and whitespace
+checks pass. Browser verification covered the actual setup and Permissions pages,
+edit/save/preview, disabling while preserving text, failed save and retry, and
+the 390-pixel mobile setup/editor (no horizontal overflow). Instruction saves
+remain Storybook-only; no runtime memory behavior or provider eval was run.
+
+## Revision: concise provider-owned instructions (2026-10-05)
+
+Apply the same instruction component across setup, settings, reconnect, and agent
+preview. Use “Tell agents to use {provider}”, default on for explicitly supplied
+templates, an amber off state, and “Reset to default” after changes. Remove the
+suggestion badge, storage/lifecycle explanation, and preview disclaimers from
+product UI; prototype limitations stay in Storybook documentation. Honcho’s
+required workspace stays expanded at the top, with validation beside the field.
+Remove the proposed default-memory chooser from both the stories and runtime plan.
+
+The shared setup header no longer shows the generic “Connect now” subtitle.
+Remove the Honcho key-permission paragraph from its catalog authoring source and
+regenerate the definition so all credential forms pick up the same change. The
+shared credential form renders only provider-supplied helper text, without
+substituting the removed generic key-permission paragraph.
+
+Verification: 296 targeted tests pass across connection setup/detail, setup
+architecture, app definitions, and memory connector risk coverage. After removing
+the fallback credential paragraph, all 174 setup/architecture tests pass again.
+Browser checks confirm template-present/on and template-absent/hidden states,
+reset after saving a custom paragraph, off-state warning and preserved text,
+failed save/retry, workspace-required blocking, baseline copy, and the mobile form
+at 390 pixels without horizontal overflow. Final UI typecheck, full Storybook
+build, token gates, and whitespace checks pass. These remain simulated instruction
+and workspace settings; no live provider or model calls were made.
diff --git a/doc/plans/2026-10-03-live-provider-connection-qualification.md b/doc/plans/2026-10-03-live-provider-connection-qualification.md
new file mode 100644
index 00000000000..a027a83d659
--- /dev/null
+++ b/doc/plans/2026-10-03-live-provider-connection-qualification.md
@@ -0,0 +1,211 @@
+# Live provider connection qualification
+
+Date: 2026-10-03
+Status: Runnable implementation delivered; operating contract and initial verification are in [PROVIDER-CONNECTIONS.md](../../tests/runner-e2e/PROVIDER-CONNECTIONS.md). Live qualification is reported per campaign, not implied by this plan.
+Code inspected: `527e3bad2` (`codex/provider-routing-connections`).
+
+## Decision
+
+Extend the existing Playwright Product E2E harness with real connection-creation journeys, an explicit authentication handoff, and support for an existing deployment as the target. Run the subscription journeys in a visible browser on a developer's machine first. The same tests should target local Paperclip and staging.
+
+Playwright owns navigation, assertions, evidence, and the verdict. A person completes login challenges when necessary. A computer-use agent can assist with diagnosis and provider UI changes, but it must not silently change the steps or decide whether the test passed. An assisted success is useful evidence and must be labeled as assisted.
+
+The deliverable is a matrix answering **which configuration worked, against which deployment, with what proof**. A successful login, a saved connection, and a successful agent run are separate checkpoints.
+
+## Existing foundation and gaps
+
+- [`tests/runner-e2e`](../../tests/runner-e2e/README.md) already supplies real browser/server/runner/provider tests, catalog selection, isolated fixtures, independent grading, reports, cost accounting, and provenance. This is the appropriate family, as defined in [`doc/evals.md`](../evals.md).
+- Its [Playwright configuration](../../tests/runner-e2e/playwright.config.ts) currently owns a fresh loopback server and database. Supporting staging requires a target lifecycle abstraction, not just substituting a URL.
+- [`tests/ai-connections-app/app.spec.ts`](../../tests/ai-connections-app/app.spec.ts) includes simulated login sessions and popup destinations. It also retains local terminal-login assertions that predate this branch's browser-login changes. Keep fast simulated tests, update those stale expectations, and label their limited proof clearly.
+- [`tests/hiring-ai-connections/hiring.live.spec.ts`](../../tests/hiring-ai-connections/hiring.live.spec.ts) already checks real runs, connection attribution, and legacy/native execution. It creates initial API-key connections through the API and requires a loopback `local_trusted` instance. Reuse the assertion patterns; it is not a complete connection-onboarding test or a staging harness.
+- The existing Grok subscription qualification stages supplied `GROK_AUTH_JSON`. Its documentation correctly says this does not test interactive browser login.
+
+## Coverage contract
+
+Inventory harnesses separately from providers. Claude is a harness; Bedrock and OpenRouter are connection routes. A Paperclip deployment URL, an authentication host, and an agent execution environment are also separate dimensions.
+
+The initial inventory below comes from [managed connection capabilities](../../packages/shared/src/ai-connections.ts), [routing compatibility](../../packages/shared/src/ai-provider-routing.ts), and the [UI adapter registry](../../ui/src/adapters/registry.ts). It describes implementation eligibility, not proven live coverage.
+
+| Harness | Managed subscription | Direct API key | Advanced routes currently admitted |
+| --- | --- | --- | --- |
+| Claude Code | Yes | Anthropic | OpenRouter, Bedrock, Messages-compatible gateway |
+| Codex | Yes | OpenAI | OpenRouter, Responses-compatible gateway |
+| Grok | Yes; qualify its actual login UX separately | xAI | Not supported by the current routing compatibility table |
+| Gemini | Not in the managed connection capability table | Google | Not in the current routing compatibility table |
+| OpenCode | No managed subscription entry | OpenRouter | OpenRouter, Chat Completions-compatible gateway |
+| Hermes local | No managed subscription entry | Inventory harness-specific behavior | OpenRouter, Chat Completions-compatible gateway |
+| Cursor local, Kimi, Pi | Inventory required | Inventory required | Inventory required |
+
+“Not in the table” is a Paperclip managed-connection limitation, not a claim about everything the upstream CLI can do. Inventory native runner providers and installed first-party adapters as well as legacy UI adapters; any additional local provider must receive a manifest entry before the full campaign can qualify.
+
+Exclude remote OpenClaw and Hermes gateways, Cursor Cloud, managed Claude/AWS AgentCore, process/HTTP adapters, and the generic legacy ACPX integration from this campaign. Their remote systems own provider configuration. **Hermes local remains in scope.** Supported native Claude/Grok runner profiles that internally use ACPX remain in scope; that transport is distinct from the excluded generic legacy integration.
+
+For every supported harness/auth/route combination, enumerate the supported legacy/native runner profiles and target environments. Do not infer that an API-key pass covers subscription, that legacy covers native, or that local covers staging. Protocol routes need a real configured endpoint and credential; a mock gateway is useful for regression tests but does not supply live qualification.
+
+Keep three independent manifest fields:
+
+- Eligibility: supported, unsupported/product gap, needs inventory, or deliberately excluded with a reason.
+- Execution: not run, awaiting user, missing credential, blocked target, running, complete.
+- Qualification: passed or failed, with individual checkpoint results and assistance recorded.
+
+A credential-free catalog check must flag newly added local harnesses or changed capabilities without a reviewed coverage entry. Report required, selected, attempted, and passed counts separately. Unsupported configurations are visible product gaps, never green tests.
+
+## Authentication strategy
+
+Use three lanes, with separate results:
+
+| Lane | Starting state | What it proves |
+| --- | --- | --- |
+| Fresh connection, existing browser sign-in | Saved provider website/Google browser session; no Paperclip connection or runtime credential for this cell | The current Paperclip subscription flow obtains and saves a fresh usable credential |
+| Fresh connection, signed-out browser | Empty provider browser state; no Paperclip connection or runtime credential | The complete first-time experience, including account selection and login |
+| Existing connection | A connection previously created by the live UI journey | Selection, reuse, continuation, and reconnect behavior |
+
+Most developer campaigns use the first lane. The signed-out lane runs explicitly before releases or login changes. The existing-connection lane cannot substitute for either creation lane.
+
+There are three distinct identities/stores: Paperclip board authentication for the selected target, provider website authentication in the browser, and the resulting managed connection credential. Reusing provider website sign-in reduces friction while still exercising a fresh OAuth/device authorization and production credential persistence. Do not import `~/.codex`, `~/.claude`, or an existing token into a fresh-connection test.
+
+Initially, use the developer's existing subscription accounts through a dedicated QA browser profile, separate from their everyday Chrome profile. Keep account aliases and expected identities in private local configuration; do not put personal email addresses into the public catalog. Serialize tests sharing an account or refresh-token chain. Never copy the profile between CI workers.
+
+### Login checkpoint
+
+The flow starts the real production login session, arms popup/new-tab observation before clicking, and tracks the expected provider origin and Paperclip session. It handles ordinary redirects and device-code/code-entry steps using the actual UI. Provider and Google pages can require a person for account choice, passwords, passkeys, MFA, CAPTCHA, or consent.
+
+At such a boundary:
+
+1. Show the relevant window and mark the cell `awaiting_user`, with the provider, target, and expected account alias.
+2. Pause only the affected account's queue. Keep a bounded deadline tied to the real login session's expiry.
+3. Let the person complete the production browser flow. If the provider rejects the automated browser, support handoff to a normal browser using the product's existing device URL or code-return flow. Do not add authentication bypasses.
+4. Resume from observed Paperclip login status and saved-connection state. Clicking “continue” is never sufficient proof of successful authorization.
+5. If the session expires, retain that attempt and use the product's retry action to start a new session. Never replay an old callback code.
+
+Record which step needed assistance and its duration, without recording passwords, codes, callback query strings, or provider session IDs. Check the expected account using available provider/account metadata; where this cannot be machine-verified, explicitly record human identity confirmation rather than claiming an automated identity check.
+
+There is no promise that Google or provider sign-in will remain unattended indefinitely. Expired browser state is an operational login requirement, not a passing test. A bug that loses a completed callback is a product failure, not automatically “needs login.”
+
+## Local and staging target adapters
+
+Introduce two lifecycle modes while sharing the same journey:
+
+- **Managed local:** create and own an isolated Paperclip home, database, server, company, and runtime. Teardown may stop/delete only these owned resources.
+- **Attach existing:** authenticate to a configured local/staging URL and create a dedicated QA company or use an explicitly designated test company. Never reset the deployment, change instance-wide feature settings, install plugins, or stop its server as fixture setup.
+
+The current local `3109` application can be an attach-existing target. Preserve its BOB company and user data. Full first-company onboarding belongs on a fresh managed target or a dedicated disposable staging tenant/instance; a shared staging deployment cannot prove that path merely by creating another agent.
+
+Each private target configuration supplies an exact origin, target mode, expected deployment identity/revision, board-auth account reference, QA company policy, and available execution environment. The staging URL is still to be supplied. Target validation precedes credential resolution. Verify redirects, health, authorization, installed harness versions, required capabilities, and environment availability; do not send credentials to a host introduced by a redirect or unreviewed target configuration.
+
+Record the tested server revision separately from the harness revision, plus runner/CLI version, immutable sandbox image when applicable, model ID, protocol, authentication host, and execution environment. Staging with a missing capability is blocked, not silently tested through a different route. Unknown build provenance prevents a release qualification claim.
+
+## Required browser journey and independent proof
+
+For each admitted cell:
+
+1. Create/select the isolated fixture company and a synthetic workspace through existing public surfaces. Ordinary bootstrap APIs may prepare the fixture; they must not create the connection or agent that the browser journey is supposed to test.
+2. Enter the production new-agent flow, select the harness and Subscription/API Key/Advanced mode, and create the connection through the UI. Advanced cases supply the configured provider/protocol, endpoint or region, and selected credential reference. Verify that permissions default to everyone/all agents within the isolated test company and that advanced controls retain their values.
+3. Verify the saved connection and compatible connection selector after reload. For a fresh-login cell, confirm that a new connection was actually created and that the selected connection is the one bound to the agent.
+4. Choose the model and environment in Configure, run the product's test action, and finish setup. Verify the model list/custom model path and selected values survive reload.
+5. Create a real task through the browser. Ask the agent to read a small synthetic input file, compute a deterministic result, and save a result artifact. Generate the input independently and keep the expected result out of the prompt. Seed the workspace using existing environment fixture facilities, not a private server hook.
+6. Require the real tool receipt, persisted successful run, task completion, correct artifact bytes/hash, and a user-visible result link that opens after reload. “Provider routing works” or any other model-authored success sentence alone cannot pass.
+7. Correlate the run with the selected connection, auth method, harness/runner, route, model, and execution environment using durable production evidence. Reuse the existing run-context assertions where available. Any missing attribution is an evidence gap to implement explicitly, not something to infer from the model's response.
+8. Send one bounded follow-up that uses the saved result and produces a second independently checked output. This proves the saved credential remains usable beyond the setup probe.
+9. Clean up only campaign-owned resources, retain sanitized results, and report cleanup failures separately. Failed cleanup prevents an entirely clean campaign result but does not erase successful functional evidence.
+
+Use a controlled runtime without ambient provider keys or personal CLI homes so a broken selected credential cannot fall back to another account. On staging, explicitly qualify the runtime's credential isolation. Add a negative case with a deliberately invalid selected credential and require an actionable failure with no successful fallback. For a controlled gateway, correlate sanitized request metadata when available; never retain authorization headers.
+
+Also cover the other product entry points: Apps connector row → Connect → connection list → agent selection; existing agent → switch compatible connection; and reconnect after an expired/invalid connection. Apply every supported auth method to both Apps and agent-creation entry points. Fresh company onboarding and destructive recovery cases are separately enumerated; their target requirements must be visible. A representative smoke selection is useful, but is not the full matrix.
+
+## Trustworthy results and safe evidence
+
+Extend the existing Product E2E result/report pipeline with authentication checkpoints, assistance, target identity, and coverage denominator. Preserve the existing failure classification: product, model/provider behavior, grading/evidence, or infrastructure. Operational blocks are separate from these failure causes.
+
+Keep first failures and all attempts. Permit only declared bounded infrastructure retries; do not let an agent change selectors or retry a failed product flow until the campaign looks green. A repaired test starts a new definition/revision measurement.
+
+Example report shape (illustrative, not results):
+
+| Cell | Target | Login | Saved | Tool/artifact | Follow-up | Outcome |
+| --- | --- | --- | --- | --- | --- | --- |
+| Claude subscription/native | Local | Assisted | Pass | Pass | Pass | Pass, assisted |
+| Codex subscription/native | Staging | Needs reauthentication | — | — | — | Awaiting user |
+| Grok custom gateway | Local | — | — | — | — | Unsupported/product gap |
+
+Disable automatic Playwright traces, HARs, screenshots, videos, request-body logging, and DOM dumps for the live authentication flow, including failure handlers. Masked password fields do not protect network traces, tokens, or callback URLs. Exception messages and reporters also need sanitized wrappers; do not serialize raw Playwright call logs containing filled values or navigated URLs. Calibrate redaction with synthetic sentinel credentials before using real accounts.
+
+Keep browser profiles and auth state outside the repository and artifact directories, using OS-protected storage or restrictive local permissions. Persist only selected provider state; never include it in reports, caches, or CI uploads. Resolve one cell's required credentials at a time from a private secret store; API-key fixtures may reference existing local secrets without sourcing the entire secrets file into the server environment.
+
+After authentication, allow only the existing synthetic-task screenshots and structured allowlisted evidence. The [current public evidence policy](../../tests/runner-e2e/SECURITY.md#public-evidence-boundary) explicitly excludes credential and setup pages; this feature must not widen that boundary. Auth diagnosis uses sanitized phase/status metadata, not screenshots of personal accounts. Read-only report regeneration must make no additional provider calls.
+
+## Implementation slices
+
+1. **Manifest and target support.** Add an explicit-only `provider-connections` Product E2E suite; register coverage and profiles in the existing catalog/fixture registry. Add owned-local/attach-existing target lifecycles without changing existing suites' defaults. Include credential-free tests for origin validation, coverage drift, selection, cleanup ownership, and blocked results.
+2. **One complete subscription path.** Implement the authentication checkpoint and Claude subscription journey locally, then Codex. Prove each with a fresh UI-created connection, independent task artifact, reload, and follow-up. Prove both saved-browser-sign-in and signed-out lanes. Fix stale local-login browser assertions alongside this work.
+3. **Same journey on staging.** Supply the staging target and board account; replay the Claude/Codex journeys against its actual login host and runner environment. Record deployment differences rather than building a separate staging script.
+4. **API keys and advanced routes.** Add direct keys, OpenRouter, Bedrock, and each supported protocol gateway. Include wrong-key/no-fallback, mismatched protocol, model discovery, and custom alias cases. Bedrock has a selected region/model and an expiring credential; an expired credential is renewed before the case and never counted as a product pass.
+5. **Complete the inventory.** Add Grok's actual subscription and key paths, Gemini, OpenCode, Hermes local, and supported Cursor/Kimi/Pi/native-provider cases. Resolve unsupported auth paths as explicit product decisions; do not invent a third mode for every harness. Expand entry points and runner/environment variants until every required manifest cell has evidence.
+6. **Operationalize.** Start with a manually launched visible-browser campaign on the developer's machine. Later use dedicated subscription accounts on a trusted QA machine, plus unattended API-key/gateway jobs in the existing protected paid CI workflow. Keep subscription reauthentication an explicit attended operation whenever the provider requires it.
+
+The suite, target configuration, and authentication selectors are now implemented; use the commands in [PROVIDER-CONNECTIONS.md](../../tests/runner-e2e/PROVIDER-CONNECTIONS.md). Discovery, verification, and reports reuse `test:e2e:runner`. The authoritative README/FIXTURES/SECURITY docs and `doc/evals.md` link the operating contract.
+
+Each case declares a turn limit covering the setup probe and follow-up, a provider-run timeout, a separate login deadline, company/agent budget limits, and cleanup policy. Run one subscription case per account at a time. Present selected cells and estimated spend before paid execution; record actual usage and unknown cost separately. Do not call subscription usage “free,” and do not run the full matrix as a side effect of normal unit tests or `--all`.
+
+## Acceptance criteria
+
+- One catalog and journey implementation selects local or staging through configuration.
+- At least one real fresh Claude and Codex subscription connection passes through each target before claiming the initial slice complete; no mocked popup/session or preinstalled credential substitutes for this proof.
+- Human handoff, timeout, expired login, and account mismatch produce distinct, resumable outcomes without false passes.
+- Passing requires the selected connection's persisted binding, real successful run, independently validated tool result/artifact, and a successful subsequent use.
+- Credential-free grader tests reject a plausible success message without a tool result, a wrong artifact, wrong connection attribution, and absent evidence.
+- Missing credentials, unsupported combinations, and unrun cells remain visible in the coverage denominator. Assisted and unattended results remain distinguishable.
+- Existing local/staging user data survives; teardown owns only test resources.
+- Secret sentinel tests prove that failure artifacts and report projections do not disclose login state or credentials.
+- The full inventory is qualified only after all required supported cells have current evidence. Earlier slices are explicitly partial.
+
+## External references
+
+- [Playwright pages and popups](https://playwright.dev/docs/pages): popup/new-page events provide deterministic browser coordination.
+- [Playwright authentication](https://playwright.dev/docs/auth): authenticated browser state can be reused, is sensitive, and expires. Reusing website state does not require bypassing Paperclip's connection flow.
+- [Google OAuth policies](https://developers.google.com/identity/protocols/oauth2/policies): account authorization must use an appropriate browser flow. Google login restrictions and challenges are not something this harness should attempt to bypass.
+
+
+## Verification update · 2026-10-05
+
+Six previously failing local key/gateway journeys now pass: legacy Grok from
+both entry points, legacy Codex/new-agent OpenRouter, legacy OpenCode/Apps
+OpenRouter, and native OpenCode/OpenRouter from both entry points. Gemini
+selected-model startup, current local skill-root guidance, and repair-run
+artifact attribution have been corrected. Its final two browser retests still
+failed the 300-second first-task deadline, so Gemini remains unqualified.
+The affected ACP regression group passes 221 tests and Grok's two affected files
+pass 54 tests. The ACP checks include a real missing-file protocol reproduction,
+canonical local Gemini workspaces, preserved remote paths, and permission-denial
+guards. The existing ACPX patch now returns resource-not-found for genuine
+missing files; it keeps other errors and permissions intact. Workspace
+typecheck/build and token gates pass; the full
+Vitest suite has not produced a passing result after broad timeout failures.
+
+The pinned native Grok installation still requires administrator access.
+Attended subscription completion, staging/Daytona, and qualification against a
+single reviewed committed build remain outstanding. See
+[the qualification runbook](../../tests/runner-e2e/PROVIDER-CONNECTIONS.md) for
+retained attempts, exact evidence boundaries, and replay instructions. This
+update does not mark the overall acceptance criteria complete.
+
+## Gemini investigation update · 2026-10-06
+
+The new-agent/API-key workflow passes with `gemini-3.5-flash-lite`, including the
+independent first artifact and follow-up checks. The Apps diagnostic retest
+delivered its first artifact, then timed out on follow-up with no recognized
+error signal; that cause remains unknown. Earlier deadline failures include provider HTTP 503 overload
+retries; increasing the deadline would not resolve the underlying uncertainty.
+
+A new credential-free installed-CLI smoke distinguishes correct ACP missing-file
+semantics from Gemini CLI 0.58.0's plain-error-object conversion bug. A temporary
+CLI copy with that narrow conversion fixed passes creation, existing-file reads,
+and external-path denial; the user's installed CLI remains unchanged. Explicit
+thinking-effort configuration also needs a supported startup-settings path;
+short comparisons do not show that default `HIGH` thinking caused the deadlines.
+
+The harness now projects terminal errors into closed diagnostic codes before
+managed-instance teardown, retaining no error text or hidden reasoning. Fresh
+managed targets preserve the original stopped onboarding database. Results,
+cleanup, model/source provenance, and remaining qualification boundaries are
+recorded in the private report and the runbook. The full acceptance criteria
+remain open.
diff --git a/doc/plans/2026-10-03-native-completion-consolidation.md b/doc/plans/2026-10-03-native-completion-consolidation.md
new file mode 100644
index 00000000000..0b5d2f42ff7
--- /dev/null
+++ b/doc/plans/2026-10-03-native-completion-consolidation.md
@@ -0,0 +1,59 @@
+# Native completion constraint consolidation
+
+Date: 2026-10-03. Roadmap item: 2.3. Status: implementation and provider-free calibration; live behavior is unqualified.
+
+## Change and comparison axis
+
+The first slice replaces the repeated final-response procedure in native task constraints with a short requirement to obtain an accepted `paperclip_finish` or `paperclip_block` result and follow that tool's reporting instructions. It removes the extra completion sentence in the Codex/runnerd and direct OpenCode backends. The existing finish/block tool descriptions still own rejection, retry, approval, link/action, explicit wait, and final-response behavior.
+
+The production comparison axis is exactly these three files:
+
+- `packages/paperclip-runner/src/backends/runtime-context.ts`
+- `packages/paperclip-runner/src/backends/codex-native-backend.ts`
+- `packages/paperclip-runner/src/backends/opencode-native-backend.ts`
+
+Both variants start from master `2a8a99e4a5f69aa803b3f10b982f583e75a87042`. The baseline retains those three original files. The candidate changes only those three production files. All fixture, grader, admission, test and documentation repairs must be common to both variants. The fixed execution prompt, production AGENTS bundle, completion tool descriptions/schemas, operational skills, hiring, connections and delivery guidance stay identical. The prior #14961 trial measured a different change and cannot qualify this one.
+
+## Provider-free measurement
+
+`src/backends/native-instruction-measurement.test.ts` in the Runner package captures actual `thread/start`, `thread/resume` and `turn/start` parameters from the real runnerd facade with a scripted transport. It captures native Codex, ACPX Claude and OpenCode for input v4 and v5: eighteen receipts per variant. Every receipt records exact UTF-8 bytes, character counts and hashes of the instruction string, fixture tool schemas, turn input and their full projection. It checks finish/block descriptions, document/file rules, approval mode and identical start/resume tools and instructions. The fixture uses the actual production AGENTS file and a fixed projection of the core semantic catalog plus the reserved completion tools.
+
+Run from `packages/paperclip-runner`:
+
+```sh
+PAPERCLIP_NATIVE_INSTRUCTION_REPORT=/absolute/path/measurement.json pnpm exec vitest run src/backends/native-instruction-measurement.test.ts
+```
+
+The receipt declares its source SHA, source file hashes, fixture hash and dirty state. A dirty overlay can aid diagnosis but is rejected for live admission. Temporary workspace paths are normalized to a fixed path for comparison. This is the complete declared Paperclip projection at that boundary, not the production server's full granted catalog or a capture of provider-owned stock prompts. Token counts, billing, provider preprocessing and cognitive consumption remain unknown. The capture distinguishes a resumed full task from the compact user-follow-up continuation envelope. Input v5 sends only new events and contract references for that continuation; its projection must remain identical between variants. Input v4 still wraps the compact message in a task envelope. Scripted resume and continuation capture do not qualify live resume behavior.
+
+## Bounded live comparison
+
+The explicit-only Product E2E suite is `native-instruction-consolidation`. Discovery requires no credentials:
+
+```sh
+pnpm test:e2e:runner -- --list --suite native-instruction-consolidation
+```
+
+Each source variant declares these original tasks on the same local native profiles:
+
+| Profile | Model | Tasks |
+| --- | --- | --- |
+| Codex | `gpt-5.6-sol` | assigned-skill document completion; whole-task blocker |
+| ACPX Claude | `claude-sonnet-5` | assigned-skill document completion; whole-task blocker |
+| OpenCode | `openrouter/deepseek/deepseek-v4-flash-0731` | assigned-skill document completion; whole-task blocker |
+
+Six cells per variant means twelve actual runs for the pair, each with one attempt. Use exact IDs with parallelism one and no automatic retry. Each cell uses the original task deadline and 1,000-cent company and agent hard stops. These budgets bound recorded Paperclip spend; they do not guarantee final provider invoice amounts. Do not run providers until the human authorizes the live scope. Stop to inspect a usable behavior failure; do not reroll it to obtain a pass.
+
+The source gate requires clean committed sources, the declared base ancestry, one complete known source variant, no unrelated paths, the current fixture digest and all eighteen provider-free capture receipts. It rejects missing, duplicated, dirty, stale or paid capture evidence. It verifies the requested immutable source SHA when supplied. A hosted shallow checkout may fetch its exact immutable SHA from the public repository at bounded depths 8, 32 and 128, without provider keys or Git credentials. It verifies exact HEAD after each fetch. The original base-ancestry and changed-path checks must then pass. No immediate-parent substitute is used. The only admitted untracked files are the exact same-run build archive and checksum, after the existing strict hydration verifier checks them.
+
+Admission rebuilds the TypeScript SDK from the current source with a credential-free environment and hashes the complete SDK outputs. Locally it also builds the native runner; hosted execution binds the selected native runner bytes to the verified same-run archive and records that local Rust calibration was not executed there. Preparation and verification preserve the source tree, fixture digest, metadata, build log/output hashes and selected native binary provenance. A mismatched or missing build fails before provider execution.
+
+The human authorized the bounded twelve-run pair on 2026-10-03. This does not authorize retries, broader paid scope, a merge or separate derived-report publication.
+
+The suite uses the original assigned-skill durable-document oracle and strict native completion grading. It retains named call-ID joins, acceptance/termination, final-response order, provider-final persistence, exact blocker owner/action/scope, workspace and issue/agent side effects, default instructions and budget evidence. Unknown or absent evidence cannot pass. No relaxed source-read matcher or provider-call join is introduced.
+
+## Decision and evidence
+
+Freeze both source refs, the common definition hash, models/profiles, permissions, default instructions, input construction, deadlines, budgets and compiled source identity before admission. Preserve every attempt, original grade, failure and usage receipt. Compare all six exact pairs and retained content; report new failures, new passes, unchanged failures, unchanged passes and uncomparable pairs separately. A passing total does not conceal a lost document, incomplete blocker report, extra work or a missing final response.
+
+The reduction remains unqualified until the paired live evidence exists. Passing deterministic checks proves transport/catalog and control-plane behavior under the tested scripted inputs. A single live pair per cell gives bounded evidence, not general equivalence, causation, cost/speed trends, general coding quality, or live continuation coverage. Approval feedback and yielded continuation need their own retained cases before making broader claims. If any behavior worsens, hold this slice and inspect the original evidence before changing source or expanding paid scope.
diff --git a/doc/plans/2026-10-04-native-completion-answer-fix.md b/doc/plans/2026-10-04-native-completion-answer-fix.md
new file mode 100644
index 00000000000..20fd84c6ede
--- /dev/null
+++ b/doc/plans/2026-10-04-native-completion-answer-fix.md
@@ -0,0 +1,29 @@
+# Native completion final-answer correction
+
+The completion constraint reduction remains held until the corrected source has live evidence for final-answer quality. Keep the original candidate, historical source and all original grades immutable.
+
+The correction keeps the shortened completion procedure while explicitly requiring a blocker explanation, owner and unblock action in the final reply. The existing document guidance now requires a canonical clickable document link. `write_document` returns a company/task-scoped `documentHref` in its idempotent receipt, derived in the document transaction from the saved key and actual task identity. No completion tool schema/description, fixed prompt, skill, permission or budget policy changes. The accepted completion feedback repeats canonical links only for this run's still-current saved document revisions, reconstructed from company/task-scoped database state rather than supplied URLs. Blocker feedback asks for the cause, owner and unblock action instead of describing completed work. Internal Markdown links retain their query and document/comment anchor when cached issue details resolve. These receipt, feedback and UI repairs add four production paths beyond the original three-file instruction reduction.
+
+Only the manual instruction comparison uses the v3 final-answer observation. The existing `native-completion` suite retains its v2 verdict checks and does not acquire the browser-navigation requirement. A calibration demonstrates the same retained input can pass v2 and fail v3; original report files are never rewritten. The harness definition digest changes truthfully for future invocations. Its additional checks read only the actual run-attributed persisted provider final. A blocker label and action do not substitute for an explicit missing-access explanation. Document links must identify the exact task and one revisioned document at the instance origin; wrong origin, task, document, query, credentials or absent evidence fail. Exact call-ID joins, acceptance/termination, ordering, side-effect and budget checks remain enforced.
+
+After saving the strict native snapshot, each completion cell clicks the rendered final-reply link in the browser. It must open the canonical saved document and show the original content marker in exactly one visible classic document card or document-specific side-panel tab. The navigation check follows the actual configured UI instead of requiring a classic-only element. Retain the navigation receipt and screenshot independently; a valid-looking Markdown URL alone does not qualify navigation.
+
+Calibrate with correct paraphrases and plausible wrong answers, including the action-only omission. Replay the retained observations only as labeled additional diagnostics; never overwrite or regrade the original results. Provider-free measurement v2 captures eighteen shared runnerd RPC projections plus six direct OpenCode HTTP projections across v4/v5 start, resume and continuation. The latter exercises the concrete OpenCode backend using a local fake server. Both boundaries measure Paperclip-supplied payloads, not provider stock prompts or model cognition. No synthetic receipt qualifies live model behavior.
+
+The human's paid-run authorization and subsequent request to fix the omission support one bounded corrective confirmation: the six exact `native-instruction-consolidation` candidate cells, one attempt each, no automatic retries, native Codex `gpt-5.6-sol`, ACPX Claude `claude-sonnet-5`, and OpenCode `openrouter/deepseek/deepseek-v4-flash-0731`, original local deadlines, and 1,000-cent company/agent hard stops. Each production correction must have a new immutable source/definition admission before another bounded confirmation. Preserve stopped campaigns, failed cells and canceled-before-provider cells separately. Never reroll an unchanged frozen failure. No new baseline provider run, broader campaign or merge is part of this correction. Stop and inspect a usable behavior failure.
+
+Report exact source, definition/grader hashes, six outcomes, retained visible replies and document targets, actual run count, cleanup and billing coverage. Passing a single trial does not prove general equivalence, cause, live resume behavior, coding quality, speed or cost trends.
+
+The receipt-only correction at `be604fcbf81ff238ee38774ff6e644bf0d84eb2d` failed its first Claude document cell; five remaining jobs were canceled before paid execution. The next correction at `3a7349ddc60142283c394121882288f2db07b215` passed both Claude and both Codex cases, but OpenCode again omitted the document link; its blocker job was canceled with the paid step skipped. Preserve both genuine failures and all canceled jobs. Browser navigation was not reached in either missing-link failure.
+
+OpenCode's inner driver admitted the finishing report locally without invoking the controller feedback handler. Its proxy also discarded the controller response envelope, including the success flag. The correction forwards the exact terminal call ID, thread, turn, tool and structured result through the existing controller request channel. It waits for the controller before committing the inner result, preserves accepted response text and concrete rejection reasons, and rejects malformed acceptance or a turn that ended during feedback. Dynamic-tool unwrapping stays unchanged. A provider-free test crosses the real runnerd, proxy and fake OpenCode boundary: the first completion is rejected, the provider corrects it in the same turn, the second receives the exact final-response feedback, and only one semantic result is proposed.
+
+This correction changes four additional OpenCode-only production paths. The shared instruction, server receipt/feedback and UI bytes remain identical to 3a7349d. Admit the new source and measure all scripted boundaries again. Confirm only the two affected OpenCode live cases on the new immutable source, one attempt each with the original model, deadlines and budget stops. Keep the four passing Claude/Codex observations explicitly attributed to 3a7349d, backed by the exact provider-path delta and final-head CI. Do not relabel them as live runs on the new head. No new baseline or unchanged-source paid retry is included.
+
+The e171282 confirmation campaign 37257534042 was stopped during build after fresh review identified a controller/inner-session acceptance race. No paid step started and no provider was executed. Provider-free regression reproduces accepted feedback losing its result when idle/error arrives in flight. Completion settlement now holds terminal mapping, explicit interruption and close until the bound decision and tool result finish, and refuses a concurrent terminal submission before invoking the controller. Raw SSE frames remain retained at receipt; normalized terminal settlement follows the finishing decision. Confirm the same two OpenCode cases only on the newly admitted immutable source; preserve e171282's completed failing review and zero-provider campaign.
+
+Fresh c3e0cb303 review identified a real serial-input dependency: an interrupt waits for completion while its controller response queues behind the interrupt. No paid campaign was admitted on this source. The proxy now handles only bound response frames outside the serial command queue; commands retain their order and bootstrap failure gates. EOF rejects existing controller waiters and prevents new unanswered requests, then drains the command queue and closes. A real production-bundled proxy, verified local native launcher and fake OpenCode MCP/SSE server reproduce the deadlock before the fix and verify accepted feedback reaches the provider, interruption completes, exactly one result is proposed and EOF exits. A second EOF-without-feedback case proposes no result. This is zero-provider proxy coverage; the real runnerd boundary remains separately covered. Fixture setup and macOS launcher failures are retained, not relabeled as behavioral failures.
+
+The exact 267aeb3 source passed fresh 5/5 review, but confirmation campaign 37259746983 stopped before provider execution. Its document job entered the harness step, then failed source ancestry hydration before result creation: the fixed eight-commit fetch did not contain the required 2a8a99 base. The remaining blocker cell was canceled. The source was not behaviorally evaluated, and no graded result or cell artifact exists; retain the original failed job log and separate zero-provider receipt.
+
+Hosted hydration now fetches only the immutable public source at bounded depths 8, 32 and 128. It verifies exact HEAD after every fetch and still requires real base ancestry. A missing or unrelated ancestor, changed HEAD, local checkout or non-shallow checkout does not receive a substitute proof. A real twelve-commit shallow-clone regression fails before the change and passes afterward. Production, fixture prompts, model/default/budget policy and behavioral grading bytes stay unchanged from 267aeb3. Admit the new setup source and confirm the same two OpenCode cases once; no provider run or original failure is retried.
diff --git a/doc/plans/2026-10-05-assistant-connection-entry.md b/doc/plans/2026-10-05-assistant-connection-entry.md
new file mode 100644
index 00000000000..120a0c6356d
--- /dev/null
+++ b/doc/plans/2026-10-05-assistant-connection-entry.md
@@ -0,0 +1,21 @@
+# Assistant connection entry and Butter walkthrough
+
+Start inside the user’s Paperclip organization. Connections must explain how to
+connect an outside assistant to this instance as the current person, with no
+agent selection.
+
+1. Add Assistant Connection (MCP) to the existing Connectors catalog.
+2. Keep setup inside the app shell. Show the organization, experimental enable
+ path, canonical server URL, and exact client setup/authentication instructions.
+3. Explain that the assistant’s sign-in action opens browser consent. Show only
+ real authorized connections, scoped to the current person and organization.
+4. Cover disabled, enabled, failure, connection refresh, and revocation states
+ with focused tests and production-page stories. Preserve OAuth enforcement.
+5. Deploy the revised preview only to Butter staging. Walk from its dashboard
+ through Connections, OpenCode configuration, browser consent, and useful work.
+6. Capture the actual screens and rebuild the portable grid/keyboard gallery.
+ Clearly label any incomplete step; never substitute a mock result for live proof.
+
+Acceptance: a user can discover the feature, understand which identity connects,
+reach consent using the displayed instructions, and return to inspect/revoke the
+connection. Enabling the experiment or opening setup alone grants no access.
diff --git a/doc/plans/2026-10-05-assistant-invitations.md b/doc/plans/2026-10-05-assistant-invitations.md
new file mode 100644
index 00000000000..3ffeb2bc21d
--- /dev/null
+++ b/doc/plans/2026-10-05-assistant-invitations.md
@@ -0,0 +1,131 @@
+# Invite an assistant to Paperclip with one message
+
+Date: 2026-10-05
+
+## Outcome
+
+From Butter → Connections → Assistant Connection (MCP), copy a message or URL,
+paste it into an assistant, approve the identified client in Paperclip, and use
+the organization's tools as the consenting human. Sharing an invitation grants
+no access. Keep the existing experimental setting and simplified consent UI.
+
+## Delivery
+
+1. Shared, version-aware setup instructions, public HTML/Markdown setup page,
+ invitation metadata, primary Copy invitation / secondary Copy link actions,
+ and manual setup disclosure. Organization hints never confer authority.
+2. Browser OAuth: CIMD alongside DCR, guarded bounded metadata retrieval,
+ issuer identification, accurate resource scopes, existing PKCE and opaque
+ revocable tokens.
+3. Device OAuth: separate hashed pending codes, ten-minute expiry, five-second
+ polling, shared throttling, atomic redemption, existing consent/grants/audit.
+ Add CLI device login and a credential-protecting stdio bridge with serialized
+ refresh and exact resource binding. No client-credentials or agent identity.
+4. Tenant Cloud routing for setup/device endpoints, preserving host and identity
+ boundaries. The central broker retains its existing advertised grants.
+5. Stories, protocol/security tests, cold-start paid Product E2E cases (Mini,
+ Haiku, then Sonnet), actual client checks, required repository checks, PRs,
+ Butter deployment, and a real screenshot walkthrough including OpenCode.
+
+## Acceptance
+
+- Cold start: no Paperclip tools/configuration initially; the invitation starts
+ setup and consent; verify the resulting account/company before work.
+- Existing configuration, unavailable host setup, denied/expired consent,
+ later-conversation reconnect, and required client restart are represented.
+- Verify company/role isolation, disabled feature, CIMD SSRF and redirect
+ rejection, audience binding, code replay, concurrent polling and refresh,
+ token expiry/revocation, and absence of secrets from copied text and evidence.
+- Browser connectors use host settings where required; do not promise automatic
+ installation from chat. Device support uses a compatible client/CLI bridge.
+- Retain eval failures, costs, model IDs, revisions, and independent state
+ assertions. Verify real clients separately from model API evals.
+
+## Progress
+
+- Implementation started from PR #14933's isolated worktree at 07f638c1b.
+- Existing browser OAuth, scoped grants, canonical endpoint, and Connections
+ entry point are present. No new invitation authority or agent identity needed.
+- Implemented invitation-first setup, public HTML/Markdown instructions, CIMD,
+ issuer responses, device authorization/consent, protected CLI credentials and
+ the stdio bridge. Added production-component Storybook device states.
+- Added five cold-start cases to the explicit Product E2E public-mcp suite,
+ including independent grant/configuration checks and calibrated negative cases.
+- Typecheck, production build and UI token gates passed. Focused authentication,
+ metadata and invitation UI checks: 65 passed. CLI credential checks: 7 passed.
+ Eval catalog/model/grader checks: 118 passed. Full-suite verification is in
+ progress; a large-file Git streaming test timed out outside this change.
+- Mini passed all five invitation cases. Haiku and Sonnet qualification remains
+ in progress; retain failed infrastructure attempts and paid billing evidence.
+- Cloud routing PR: https://github.com/paperclipai/paperclip-cloud/pull/672.
+ Cloud typecheck, 2,242 tests and fake-provider smoke passed; rebased focused
+ gateway checks passed 218 tests. Staging routing deployment has been requested.
+- Remaining: real client qualification, final paid results, PR checks/review,
+ Butter application deployment and the complete screenshot gallery. Butter's
+ persistent human grant has not been approved; do not claim a live Butter MCP
+ read or delegation before that consent occurs.
+
+### Review and real-client findings (October 5)
+
+- Actual Codex 0.153.4 CIMD login exposed its native ephemeral loopback callback requirement. Added RFC 8252 port-only matching for verified native metadata; host/path/query remain exact and token redemption binds the exact authorized callback.
+- Applied source quotas and stale-client cleanup to CIMD registration in the same transaction as admitted requests. Rejected authorization requests do not retain clients.
+- Replaced PID-file refresh locks with crash-released SQLite OS locks; replacement credentials are saved before the previous grant is revoked. A failed cleanup is reported without discarding the working replacement.
+- Added device-code correction without leaving the consent flow.
+- Initial paid invitation matrix: 15/15 passes across Mini, Haiku, and Sonnet; one earlier database startup failure remains recorded. Final source-pinned qualification follows review fixes. Actual OpenCode reused the existing disposable organization's grant and retrieved its saved report in a new conversation.
+
+### Qualification and staging evidence
+
+- Commit `633a4a2a2` passed every GitHub CI gate and received a 5/5 review.
+ Cloud `06c283a0` likewise passed its checks/review and was deployed to staging.
+- Source-pinned campaign `local-2026-10-06T02-15-50-324Z`: 14/15 passed.
+ All Haiku and Sonnet cases passed. Mini’s unsupported-host response correctly
+ refused setup; the text checker rejected its curly apostrophe. Preserve the
+ failed attempt, normalize presentation punctuation, and run fresh qualification.
+- A real Claude web connector discovered Butter and selected CIMD. Its metadata
+ also advertises JWT-bearer; the previous strict enum rejected the entire
+ document. Select only implemented grants and prove unsupported token grants
+ remain rejected. Codex 0.153.4 and Claude Code 2.1.245 already reached local
+ consent through CIMD. Their new grants await human approval.
+- Butter serves public setup Markdown without cookies and returns protocol
+ validation (not a tenant-session error) for anonymous device initiation.
+ Existing local OpenCode retrieved a stored report in a later conversation.
+ The new Butter OpenCode 1.18.17 session starts with no MCP configuration.
+- Clipboard transfer is verified: making the embedded browser visible resolved
+ its background clipboard mismatch. The exact copied invitation was pasted into
+ the fresh OpenCode conversation. Added an explicit clipboard-fixture Storybook
+ interaction; the real browser proof remains separate.
+- Final narrow checks: 63 authentication/metadata tests and 120 eval calibration
+ tests passed; server/UI/eval typechecks and token gates passed.
+- Local full-suite limitations remain recorded: the large Git streaming test
+ times out on this Mac; parallel CLI/route runs hit database hook timeouts.
+ The earlier long run also loaded old modules during ongoing source edits;
+ all 62 affected MCP checks passed in a fresh process. CI passed these groups.
+- Live Butter delegation/result retrieval and newly authorized Codex, Claude
+ Code, device CLI and browser-connector calls remain unverified until consent.
+ The screenshots distinguish those boundaries from local reuse and fixtures.
+
+### Final matrix and live authorization handoff
+
+- Source-pinned campaign `local-2026-10-06T02-41-14-462Z` at `2992ef271`
+ passed 15/15: five cases each on GPT-5.4 Mini, Claude Haiku and Sonnet.
+ All CI gates and the 5/5 review passed on that source.
+- The actual Butter OpenCode cold start configured MCP and reached consent.
+ Its assistant shell then timed out before approval; a detached retry remained
+ subject to the client's own callback deadline. Added shared setup guidance
+ for immediate URL handoff, persistent authorization commands, expired-link
+ recovery and a manual-terminal fallback. Rerun cold start on all three models
+ for this instruction change; retain the preceding matrix as separate evidence.
+- The screenshot gallery starts at Butter's dashboard and records configuration,
+ pending consent and this timeout finding. New persistent grants still await
+ human confirmation; do not describe the real Butter journey as complete.
+
+- Follow-up campaign `local-2026-10-06T02-58-30-041Z` at `cda8178af`
+ passed 3/3 cold starts. Review then found HTML lacked the new Markdown advice.
+ A shared constant now feeds Markdown, public HTML and manual setup. Verified
+ the generated Markdown remains byte-identical to the paid-evaluated version
+ with and without an organization hint. Shared build, server/UI typechecks,
+ token gates and 63 auth/metadata checks pass after this presentation fix.
+- Butter deployment of `2992ef271` succeeded. Actual Claude web CIMD now reaches
+ consent and shows Claude's identifying domain. Its grant still awaits consent.
+ Anonymous setup returns no organization name; account setup and MCP tool
+ initialization reject unauthenticated requests with 401.
diff --git a/doc/plans/2026-10-05-managed-aggregator-account-user-stories.md b/doc/plans/2026-10-05-managed-aggregator-account-user-stories.md
new file mode 100644
index 00000000000..8fa2392010d
--- /dev/null
+++ b/doc/plans/2026-10-05-managed-aggregator-account-user-stories.md
@@ -0,0 +1,86 @@
+# Managed aggregator accounts — acceptance stories
+
+Date: 2026-10-05
+
+## Expected behavior
+
+1. **Discover existing accounts.** After saving an Arcade or Executor gateway, opening Apps discovers the accounts visible through that gateway. No individual app reconnection, task, extra executable connection, or access grant is required.
+2. **Group accounts.** Notion appears once with its native account, a Composio account, two Arcade accounts, and an Executor account. Identical labels remain distinct by provider, gateway, and upstream account identity. Native Connect/Add account remains the onboarding action.
+3. **Reconcile upstream changes.** Add or disconnect an upstream account, then use Refresh in only that gateway’s menu. A successful scan updates its accounts; other gateways’ observations remain intact.
+4. **Manage upstream.** Imported account menus contain only Open in the provider. Links are HTTPS and contain no credentials. Executor workspace/self-hosted paths remain intact. Upstream deletion and per-app authorization stay upstream; Paperclip policies apply to the executable parent gateway.
+5. **Optional Arcade sync.** A gateway using a project key and Arcade user ID reuses those credentials. Otherwise Set up account sync asks for an optional project key and user ID. Its vault credential is used for discovery only; gateway tool invocation still uses its existing credentials.
+6. **Honest discovery states.** Unsupported inventory, expired sign-in, partial pages, and stale observations never become successful empty inventories or green checks. Failed scans retain previous accounts and invite refresh/setup.
+7. **Isolation and rotation.** Account observations are scoped to company, saved gateway, viewing human, and credential version. Rotating a credential or changing the session endpoint hides prior observations until a successful scan. Account discovery cannot grant access.
+8. **Navigate five chips.** Paperclip defaults to native discovery with all installed apps above it. Composio/Arcade scope discovery while retaining all connected account lines on grouped cards. Native cards appear under a provider only if that provider has observed accounts for the app, not merely because its catalog supports the app. Installed shows only installed apps; All includes every source. Executor's chip is temporarily hidden; its gateway and observed accounts remain available. A Paperclip search expands to All and clearing returns to Paperclip; explicit filters stay scoped. Pagination affects discovery only.
+9. **Unknown integrations and small screens.** Unknown Executor integrations receive a separate card without guessed branding. Empty results remain actionable. Chips wrap and account rows remain readable at mobile widths.
+10. **Inspect a saved gateway.** Composio setup opens its Permissions page. Opening that page starts one refresh, displays progress, and shows detected apps with their logos in a bounded, keyboard-scrollable list. Refresh Composio checks only this saved gateway. Partial failures retain observations as unverified. Account discovery does not change human/agent permissions. The redundant OAuth scope guidance and “Reconnect to update permissions” button are removed; actual authorization-repair controls remain available.
+
+## Reproduction
+
+Run this checkout’s Storybook on port 6200 and the disposable acceptance server:
+
+```sh
+node cli/node_modules/tsx/dist/cli.mjs tests/aggregator-accounts/test-drive.ts
+```
+
+Open `http://localhost:6200/iframe.html?id=apps-managed-accounts--full-stack-test-drive&viewMode=story`.
+
+This mounts the production Apps page against production tool-access routes and a disposable PostgreSQL database. Only external provider responses are simulated. The upstream controls change fixture inventory; use the gateway menu to refresh and observe the result. Existing app data and other local services are untouched.
+
+The catalog-only stories remain at `Apps/Catalog source selection` and demonstrate the five current chips, pagination, native onboarding precedence, and grouped accounts.
+
+## Evidence and limitations
+
+Verified in the embedded browser on 2026-10-05 against the production Apps component, production routes, and disposable PostgreSQL. External Composio, Arcade, and Executor responses were simulated.
+
+| Story | Result and evidence |
+| --- | --- |
+| Existing accounts | Passed: saved gateways imported existing accounts without app reconnection. Gateway onboarding tests confirm Arcade returns to Apps without an agent task. |
+| Grouping | Passed: one Notion card showed a native account, a Composio account, two accounts from each of two Arcade gateways, and an Executor account. Repeated “Work” labels remained separate. |
+| Upstream changes | Passed: adding and disconnecting simulated Arcade accounts followed by its gateway’s Refresh updated only that gateway’s account rows. Other providers and the native account remained. |
+| Upstream management | Passed: imported kebabs contained only Open in the provider. Executor’s link retained its workspace path. Browser verification inspected destinations; it did not complete external provider sign-in. |
+| Optional Arcade sync | Passed: the browser saved a synthetic discovery key through the real manager-only endpoint and imported the second gateway’s accounts. Database tests also prove existing API-key/user-header reuse and discovery-only vault use. |
+| Failure states | Passed: expired authorization and an incomplete page retained last-known accounts without green checks. Unsupported Executor inventory showed unavailable, retained stale accounts, and recovered after refresh. |
+| Isolation and rotation | Passed: service tests cover viewing-user/gateway/company isolation, member/agent configuration denial, endpoint changes, and an actual vault credential rotation followed by discovery using the new value. UI/API-client tests prove user switches do not reuse another user’s account cache or pending HTTP response. Manager account responses also use private, no-store HTTP caching. |
+| Navigation | Passed: all six chips, Paperclip-to-All search expansion, explicit source scope, clear search, installed pinning, pagination, and empty states. The catalog Storybook interaction also completed without console errors. |
+| Unknown apps and mobile | Passed: an unknown Executor integration retained a separate card and unverified status. At 390px the production page’s content width was 382px, with wrapped chips and readable account rows. The viewport override was reset afterwards. |
+
+The initial fixture run ended on the full-stack story. Its upstream controls are explicitly labeled simulated. That run did not exercise native OAuth or live provider dashboards; working Arcade/Executor credentials were unavailable.
+
+### Permissions-page follow-up: real Paperclip test drive
+
+The actual CLI `test-drive` server is running from this checkout at
+`http://localhost:3105`, with an isolated PostgreSQL database and the agent key
+from `~/.secrets`. The user subsequently connected a real Composio gateway.
+The embedded browser verified its Permissions page at
+`/AGG/apps/f878eeb0-b1b9-4081-b779-ffecf3b41e7a/permissions`:
+
+- Detected Airtable and Circleback from the live saved Composio session.
+- Manual Refresh Composio displayed “Refreshing…” and catalog-check progress,
+ then completed with both apps visible.
+- Navigating away and returning automatically started a refresh without a click.
+- The redundant sign-in guidance and update-permissions button are absent.
+- The catalog exposes Paperclip, Composio, Arcade, Installed, and All.
+- 317 focused AppDetail, AppsConnect, and Browse tests pass, including setup
+ navigation, first-load refresh, progress/completion, upstream reconciliation,
+ retained observations after failure, unsupported discovery, and manager-only
+ visibility. UI typecheck, UI production build, and token gates pass.
+
+This walkthrough did not repeat OAuth sign-in or change upstream accounts. The
+post-setup redirect is covered by connection-flow tests. The real gateway had two
+observed apps, so overflow with a long real account inventory was not exercised.
+The list has a bounded height and keyboard-focusable vertical scroll container.
+Refresh and settled-page screenshots are saved as `composio-apps-refreshing.png`
+and `composio-permissions-connected-apps.png` in this task's visualization folder.
+
+### Automated checks
+
+- 261 focused UI/provider/API-client tests passed: Browse, AppsConnect, inventory adapters, and HTTP request isolation.
+- 8 database/service/authorization tests passed, with no skips in the final run. These reused the disposable browser-test database because the host had exhausted its 32 PostgreSQL shared-memory slots. The optional `PAPERCLIP_AGGREGATOR_TEST_DATABASE_URL` test override accepts only a local, disposable database.
+- 9 shared catalog tests passed.
+- Final `pnpm -r typecheck`, `pnpm build`, token gates, and `git diff --check` passed.
+- `pnpm test:run` was attempted but did not complete successfully. It encountered a timeout in `workspace-git-snapshot-streaming.test.ts`, failures in `heartbeat-run-event-sequencing.test.ts`, and numerous PostgreSQL startup skips; the run ended with exit 130. A separate remote-MCP compatibility run also could not start PostgreSQL. These repository-wide checks are not reported as green.
+
+Local verification logs: `/tmp/paperclip-aggregator-focused-final.log`, `/tmp/paperclip-aggregator-db-final.log`, `/tmp/paperclip-full-typecheck-final.log`, `/tmp/paperclip-full-build-final.log`, `/tmp/paperclip-token-gates-final.log`, and `/tmp/paperclip-full-test.log`.
+
+Desktop and mobile screenshots are saved in the task’s visualization workspace as `managed-aggregator-accounts.png` and `managed-aggregator-accounts-mobile.png`. This is fixture-backed acceptance evidence, not live provider certification or a production release sign-off.
diff --git a/doc/plans/2026-10-05-native-procedure-comparison.json b/doc/plans/2026-10-05-native-procedure-comparison.json
new file mode 100644
index 00000000000..c78f6b90037
--- /dev/null
+++ b/doc/plans/2026-10-05-native-procedure-comparison.json
@@ -0,0 +1,5433 @@
+{
+ "schema": "paperclip.native-procedure-public-comparison.v1",
+ "disposition": "hold_draft_no_regression_gate_failed",
+ "originalGradesPreserved": true,
+ "sources": {
+ "originalBaseline": "64cd2194a1d058356679b653c181f16404aefc80",
+ "originalCandidate": "eb01d073c35134bf0d373947b55a79f9e443f8ee",
+ "correctedBaseline": "aecfa3b6a5cab110a9b926e93705311bbcf4db47",
+ "correctedCandidate": "ffe847fabaebbf24bc93924a4b6c8922d46a1fb6",
+ "integratedCandidate": "ee096aa23fc88a001e7666215bcd338b5863f377",
+ "integratedProviderFreeBaseline": "ce31f5efd0d416205c3994c55dd02b645f8b8423"
+ },
+ "controls": {
+ "trustedWorkflowSha": "a386a599983519eb1d399f8b770bfccdb2a74762",
+ "commonFixtureFilesChecked": 256,
+ "sourceDelta": [
+ "packages/paperclip-runner/generated/capability/semantic-tool-contracts.json",
+ "packages/paperclip-runner/generated/semantic-action-catalog.json",
+ "packages/paperclip-runner/protocol/fixtures/evals/native-execution-seeded.json",
+ "packages/paperclip-runner/protocol/manifest.json",
+ "packages/paperclip-runner/src/catalog/semantic-action-catalog.ts",
+ "packages/paperclip-runner/src/contracts/runtime-context.ts",
+ "packages/paperclip-runner/src/protocol-actions/create-task.ts",
+ "packages/paperclip-runner/src/protocol-actions/hire-agent.ts",
+ "packages/paperclip-runner/src/protocol-actions/set-dependencies.ts",
+ "server/src/services/native-runtime/native-session-resume.ts",
+ "server/src/services/native-runtime/paperclip-runner-tool-authority.test.ts",
+ "server/src/services/native-runtime/paperclip-runner-tool-authority.ts"
+ ],
+ "cellsPerVariant": 6,
+ "maximumAttemptsPerCell": 1,
+ "companyHardStopCents": 1000,
+ "leadHardStopCents": 1000,
+ "workerIndividualHardStop": "not asserted; company hard stop applies",
+ "cellDeadlineMs": 720000,
+ "maximumStoryRunRecordsPerCell": 12
+ },
+ "commonFixtureHashesCanonicalJsonSha256": "2c1113b8995e5d004960905668d935ab77d463fa27ab979c824e3402210d1f27",
+ "original": {
+ "totals": {
+ "baseline": {
+ "pass": 4,
+ "fail": 2,
+ "retainedStartedRuns": 25
+ },
+ "candidate": {
+ "pass": 2,
+ "fail": 4,
+ "retainedStartedRuns": 15
+ }
+ },
+ "pairs": [
+ {
+ "executionId": "everyday-workflows.runner-acpx-claude.local.delegate-feedback",
+ "baseline": "passed",
+ "candidate": "failed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-acpx-claude.local.hire-reuse",
+ "baseline": "passed",
+ "candidate": "failed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-codex.local.delegate-feedback",
+ "baseline": "passed",
+ "candidate": "failed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-codex.local.hire-reuse",
+ "baseline": "passed",
+ "candidate": "passed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-opencode.local.delegate-feedback",
+ "baseline": "failed",
+ "candidate": "passed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-opencode.local.hire-reuse",
+ "baseline": "failed",
+ "candidate": "failed"
+ }
+ ],
+ "cells": [
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.delegate-feedback",
+ "source": {
+ "sha": "64cd2194a1d058356679b653c181f16404aefc80",
+ "ref": "refs/heads/codex/native-procedure-baseline",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325870695"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "claude-sonnet-5",
+ "cleanup": "passed",
+ "startedRunCount": 4,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "b08ea732990fd75bea0f17df7ca06a87fc5ebe4a59c3113e810b777b7087d6a9",
+ "evidenceHashes": {
+ "evidence-manifest.json": "e37c96ffe166426f4c99e398142b1072d53421992cde8c7aada6303145fcdff3",
+ "html-report/data/5d2572f36528e8fddbc2153c632730c4f013b79a.json": "b08ea732990fd75bea0f17df7ca06a87fc5ebe4a59c3113e810b777b7087d6a9",
+ "playwright-output/runner-everyday-workflows--fdae5-the-browser-and-public-APIs/attachments/runner-e2e-result-eb06dc1fa3ae54172129187047897c5f1b2adb19.json": "b08ea732990fd75bea0f17df7ca06a87fc5ebe4a59c3113e810b777b7087d6a9",
+ "result.json": "b08ea732990fd75bea0f17df7ca06a87fc5ebe4a59c3113e810b777b7087d6a9",
+ "snapshots/api-state.json": "fa464c86756c6d01517cf486965a0266e9ec874fae8248ae547c58d39c6c7cea",
+ "snapshots/browser-diagnostics.json": "0bdbe36772ce52f8a4140cdf061596614d347229901be18b5cc17325cd0ea781",
+ "snapshots/chat-final-run-ledger.json": "1b4925e0c32d5369ddd23317f0a72d4060c99fc5f411d129c3db3b32a6a829dd",
+ "snapshots/everyday-workflow.json": "85a6509a51869f944d52b34d26a42ac48e83c455770140a55f0db58ba6aa1f0b",
+ "snapshots/fixtures.json": "140546a07e4fa11c45fea99741682eb5dc0d7905a2d20df22a45c4449aa07684"
+ }
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.hire-reuse",
+ "source": {
+ "sha": "64cd2194a1d058356679b653c181f16404aefc80",
+ "ref": "refs/heads/codex/native-procedure-baseline",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325870695"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "claude-sonnet-5",
+ "cleanup": "passed",
+ "startedRunCount": 6,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "85935339f572d46cf3dfa351bad4376bb537bafe1ada9a7d798b75dbb099941a",
+ "evidenceHashes": {
+ "evidence-manifest.json": "5c935a3744afc62c64fd29a664c33026aef235a92ec0500c9912d3507052e697",
+ "html-report/data/8bbe2058a3abe580b4ccb871d532ba41350da7aa.json": "85935339f572d46cf3dfa351bad4376bb537bafe1ada9a7d798b75dbb099941a",
+ "playwright-output/runner-everyday-workflows--9a7d2-the-browser-and-public-APIs/attachments/runner-e2e-result-89ae8a684c0bb5d6bb61e001e54f638ef8240960.json": "85935339f572d46cf3dfa351bad4376bb537bafe1ada9a7d798b75dbb099941a",
+ "result.json": "85935339f572d46cf3dfa351bad4376bb537bafe1ada9a7d798b75dbb099941a",
+ "snapshots/api-state.json": "7073c56ae937235b6d25f830d8da2dc1c1740f9295b737d361c31bc5c21b2302",
+ "snapshots/browser-diagnostics.json": "695c94cb21dc497359abc12568fe2270509df2327368590067b4eeeceb8f6784",
+ "snapshots/chat-final-run-ledger.json": "1437a3268c85532e7c64dec8c8b09ebb8c9b94a8213ea13e1795214df04888c7",
+ "snapshots/everyday-workflow.json": "acedad4621258df94eeb405fb43a180d17a449b4edc3ba4a1ace5b97ded79b63",
+ "snapshots/fixtures.json": "32736c391b9c292c81d7d7aeb8b3ab678784d68ed169727430ed9a429f97d5a2"
+ }
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-codex.local.delegate-feedback",
+ "source": {
+ "sha": "64cd2194a1d058356679b653c181f16404aefc80",
+ "ref": "refs/heads/codex/native-procedure-baseline",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325870695"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "gpt-5.6-sol",
+ "cleanup": "passed",
+ "startedRunCount": 5,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "2b601d5736f3756ffb890a50821a655a49490a113922e15c199fef1fe0954e39",
+ "evidenceHashes": {
+ "evidence-manifest.json": "eb30cdd784087c1a34c4ecbaa7a43f051eddd95d3805fc89ab1054af70a044c2",
+ "html-report/data/cdbcafe148f5698ecd0df0cdf30809758fd418e8.json": "2b601d5736f3756ffb890a50821a655a49490a113922e15c199fef1fe0954e39",
+ "playwright-output/runner-everyday-workflows--a6fcb-the-browser-and-public-APIs/attachments/runner-e2e-result-b59bcc2342e97bbc85432cee261db26c76f3c80a.json": "2b601d5736f3756ffb890a50821a655a49490a113922e15c199fef1fe0954e39",
+ "result.json": "2b601d5736f3756ffb890a50821a655a49490a113922e15c199fef1fe0954e39",
+ "snapshots/api-state.json": "0b6a89bc7cdff9fa19c241eff210031468d7d500d9dd427526a888d740e8454a",
+ "snapshots/browser-diagnostics.json": "c520523de99f806d8cbe9fad497639ef813839b7dce1bbfaddaa7a1b77f66995",
+ "snapshots/chat-final-run-ledger.json": "ebae3fb5b1c5a87451af70817f9a6a35087b7606aed4c15437d453500675a3c6",
+ "snapshots/everyday-workflow.json": "691a281397c434341784cbbeabdf53d7ffbbe34cf6fccf05e05b365fffc2d2db",
+ "snapshots/fixtures.json": "93b762a930101110ad1953551cb5ba0094ccb609626f9ae2767d5d8c8d610424"
+ }
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-codex.local.hire-reuse",
+ "source": {
+ "sha": "64cd2194a1d058356679b653c181f16404aefc80",
+ "ref": "refs/heads/codex/native-procedure-baseline",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325870695"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "gpt-5.6-sol",
+ "cleanup": "passed",
+ "startedRunCount": 6,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "200c06ab5dadf615bac0ec66b9a9ce851c75832ddaad5c854ed7fbbac16f90a7",
+ "evidenceHashes": {
+ "evidence-manifest.json": "5ff552d77ebbe35f2a123fcfe60f55008fd221b9c890ef92733b427e52634e28",
+ "html-report/data/cba00c1f6256ff612b9b89e78005f1a7460ae138.json": "200c06ab5dadf615bac0ec66b9a9ce851c75832ddaad5c854ed7fbbac16f90a7",
+ "playwright-output/runner-everyday-workflows--d934c-the-browser-and-public-APIs/attachments/runner-e2e-result-04508984e2fc501021db8f215efa4abf738af42d.json": "200c06ab5dadf615bac0ec66b9a9ce851c75832ddaad5c854ed7fbbac16f90a7",
+ "result.json": "200c06ab5dadf615bac0ec66b9a9ce851c75832ddaad5c854ed7fbbac16f90a7",
+ "snapshots/api-state.json": "e802749b93f083dbd37eae5a6cb4d63726bfa880fdad7a0cb9033a9e5132e5d1",
+ "snapshots/browser-diagnostics.json": "f9fd5484cc80f9fce274ba98be946d6f2826c20cf454ac5f0f09d5f29f4d4c9d",
+ "snapshots/chat-final-run-ledger.json": "44af7eed470338dcc0ad99eda29b65f4493e5ab48456e3196be70671550edf3e",
+ "snapshots/everyday-workflow.json": "36a50e25841b6a3827d7dc0c227fee06a07a5dfdfc6cdcef45e87006e2c49aec",
+ "snapshots/fixtures.json": "8e01cdc83c06cd80f9a7aa45844bd165c8152b40c551578f702dcd1facfe49fd"
+ }
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-opencode.local.delegate-feedback",
+ "source": {
+ "sha": "64cd2194a1d058356679b653c181f16404aefc80",
+ "ref": "refs/heads/codex/native-procedure-baseline",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325870695"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "candidate_failure",
+ "configuredModel": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "startedRunCount": 4,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": false
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ },
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ],
+ "resultSha256": "d9e4207efd71b1fde7b626100905f486ea758ccf149b1f8708d6f47e1b314f96",
+ "evidenceHashes": {
+ "evidence-manifest.json": "f12b13167c11896a77e2313295f8a4740a82d38e11179a92fdf9694af41a0014",
+ "html-report/data/1de72a5e503228c98ef17641b6a7e8e5520dd6d9.json": "d9e4207efd71b1fde7b626100905f486ea758ccf149b1f8708d6f47e1b314f96",
+ "playwright-output/runner-everyday-workflows--616ad-the-browser-and-public-APIs/attachments/runner-e2e-result-cbaa721581d55eb04872c27fef1564ad1093b5db.json": "d9e4207efd71b1fde7b626100905f486ea758ccf149b1f8708d6f47e1b314f96",
+ "result.json": "d9e4207efd71b1fde7b626100905f486ea758ccf149b1f8708d6f47e1b314f96",
+ "snapshots/api-state.json": "a88d15d5d1ea5cb4864f0ca86a9104207f90cb57424a0642c98bc63cd90ac5d5",
+ "snapshots/browser-diagnostics.json": "2ae30c24e8081099a72f8cb3fa5e86a633e525956cee65c09f36e6353c42efc1",
+ "snapshots/chat-final-run-ledger.json": "3674c59de912197327ccb8ba1d659f120b1cdc51b1f88b1bc3859485c31f1422",
+ "snapshots/everyday-workflow.json": "43730e83f96c51dda1cb39a7ab0509955af7bfcc18dd939a84cc1cef3c739d87",
+ "snapshots/fixtures.json": "9b2ef4cebf077c3ed74e55dc4faf5e5b547ba7be990214757cd479368c71717e"
+ }
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-opencode.local.hire-reuse",
+ "source": {
+ "sha": "64cd2194a1d058356679b653c181f16404aefc80",
+ "ref": "refs/heads/codex/native-procedure-baseline",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325870695"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "permanent_infrastructure",
+ "configuredModel": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "startedRunCount": 0,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [],
+ "resultSha256": "f8ef0e87c24ecacb8dd18ebc158771a74b5cbb8c0b673edd00c80e60a1932832",
+ "evidenceHashes": {
+ "evidence-manifest.json": "33b1383486d18fcb0a01b7e3488704fcfa760114958554469016725f79212508",
+ "html-report/data/26ec75604543a922ef760e2cfb41ed3f340a019b.json": "f8ef0e87c24ecacb8dd18ebc158771a74b5cbb8c0b673edd00c80e60a1932832",
+ "playwright-output/runner-everyday-workflows--90607-the-browser-and-public-APIs/attachments/runner-e2e-result-b9a31955fc83e0239705bc49c9a7cb13939d91ed.json": "f8ef0e87c24ecacb8dd18ebc158771a74b5cbb8c0b673edd00c80e60a1932832",
+ "result.json": "f8ef0e87c24ecacb8dd18ebc158771a74b5cbb8c0b673edd00c80e60a1932832",
+ "snapshots/browser-diagnostics.json": "94d2792cae9e2a1628779f7349538e0ce00418a6e448c54fcbba978b55a1b8ed"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.delegate-feedback",
+ "source": {
+ "sha": "eb01d073c35134bf0d373947b55a79f9e443f8ee",
+ "ref": "refs/heads/codex/native-procedure-guidance",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325777217"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "transient_infrastructure",
+ "configuredModel": "claude-sonnet-5",
+ "cleanup": "passed",
+ "startedRunCount": 1,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ],
+ "resultSha256": "887c612dedbc4319e8ddf443d238b9ea6ded27e701748982a5b6f24ffeead10e",
+ "evidenceHashes": {
+ "evidence-manifest.json": "b1f020afba6828a685735014a221db1ef141b9958f4e42b075dfa14f2a574d5f",
+ "html-report/data/1c84a0af56116198fe02730dc6e07c03e7708a91.json": "887c612dedbc4319e8ddf443d238b9ea6ded27e701748982a5b6f24ffeead10e",
+ "playwright-output/runner-everyday-workflows--fdae5-the-browser-and-public-APIs/attachments/runner-e2e-result-3c37bc94f4716823d58a0e836c85db647f971bc7.json": "887c612dedbc4319e8ddf443d238b9ea6ded27e701748982a5b6f24ffeead10e",
+ "result.json": "887c612dedbc4319e8ddf443d238b9ea6ded27e701748982a5b6f24ffeead10e",
+ "snapshots/api-state.json": "a09940179b96e90991043e5305e3820c0e23b227b7d77ec93edb6c9a42e664a0",
+ "snapshots/browser-diagnostics.json": "44550ff6356f15e46b961ed53c4c5130c16b59360a55c2b7ffd57eda5bcf1987",
+ "snapshots/chat-final-run-ledger.json": "5650a472f29e83dde20802f25d913d403fd5ef590d4dedabf6da3fd0aeb9c3a1",
+ "snapshots/everyday-workflow.json": "495455927af91cd9686bf7441aaf078b895bdf5dbf4b0f392bcd0da930a5862b",
+ "snapshots/fixtures.json": "a566dedac5d1b16487d0e4d064905797a2e65a19a0c068c5f3aece0130c88f39"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.hire-reuse",
+ "source": {
+ "sha": "eb01d073c35134bf0d373947b55a79f9e443f8ee",
+ "ref": "refs/heads/codex/native-procedure-guidance",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325777217"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "candidate_failure",
+ "configuredModel": "claude-sonnet-5",
+ "cleanup": "passed",
+ "startedRunCount": 2,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ],
+ "resultSha256": "33995933e0ba31d829c5e52a5a5169aa1bf5bd3531a33e2762c5e2f021b65db3",
+ "evidenceHashes": {
+ "evidence-manifest.json": "c253edc0ea3e1a215a04bdddc07b420b90ed75ae9581b299a93653939ac48149",
+ "html-report/data/34410e200327d4861b2fa8863ac1446eb3daaf4e.json": "33995933e0ba31d829c5e52a5a5169aa1bf5bd3531a33e2762c5e2f021b65db3",
+ "playwright-output/runner-everyday-workflows--9a7d2-the-browser-and-public-APIs/attachments/runner-e2e-result-a19b320e711940bd3128319ae068af3a6e41fa43.json": "33995933e0ba31d829c5e52a5a5169aa1bf5bd3531a33e2762c5e2f021b65db3",
+ "result.json": "33995933e0ba31d829c5e52a5a5169aa1bf5bd3531a33e2762c5e2f021b65db3",
+ "snapshots/api-state.json": "150a6ecc15a5a64abfd8742289301eca792b406cf51dfc95df22cd66531d09bb",
+ "snapshots/browser-diagnostics.json": "37fe5436927fd28b49859eca1751a2ff4b6f8683ec96274273724dd03b2a9f30",
+ "snapshots/chat-final-run-ledger.json": "5397a9497d49879c09dab2c9b0a27d108792a8f36c6643593f848a259868829e",
+ "snapshots/everyday-workflow.json": "f0dbaaa800c3c3808e62370a69bb6b8dca1d43bd51b187617a2242a12e18a2d3",
+ "snapshots/fixtures.json": "91da96a65a7196b1a2b3e3d359e164063e6c5ef95096641a8789f2944fff825e"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-codex.local.delegate-feedback",
+ "source": {
+ "sha": "eb01d073c35134bf0d373947b55a79f9e443f8ee",
+ "ref": "refs/heads/codex/native-procedure-guidance",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325777217"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "candidate_failure",
+ "configuredModel": "gpt-5.6-sol",
+ "cleanup": "passed",
+ "startedRunCount": 3,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ],
+ "resultSha256": "833df00d30db77e3aad32e091ed73e8161ad38ff23d98eff7f0bc4f2cc8fa8f0",
+ "evidenceHashes": {
+ "evidence-manifest.json": "446cae83c521fe16af543ddac6b4816b8aa11fb24aa9462442b57fc8a16ad9fa",
+ "html-report/data/1adabfb6931e1bbba0e3717037ae9a4cfa8cd37e.json": "833df00d30db77e3aad32e091ed73e8161ad38ff23d98eff7f0bc4f2cc8fa8f0",
+ "playwright-output/runner-everyday-workflows--a6fcb-the-browser-and-public-APIs/attachments/runner-e2e-result-8d7203080e1991ce5b786549e01e4580160cfcee.json": "833df00d30db77e3aad32e091ed73e8161ad38ff23d98eff7f0bc4f2cc8fa8f0",
+ "result.json": "833df00d30db77e3aad32e091ed73e8161ad38ff23d98eff7f0bc4f2cc8fa8f0",
+ "snapshots/api-state.json": "8d02b400e815af4adc73f9295a013841b5b24744ab17aace60b85240a08ecbd3",
+ "snapshots/browser-diagnostics.json": "c5ad3d5ac16cb2d57635abf7dffb7ee9db66b3ed9af02fa93e53fd015b3da435",
+ "snapshots/chat-final-run-ledger.json": "855e8c256db5cfc1bfd28a79325e7b14d205a1a7096d0fe2d95b16b3d6b3bddc",
+ "snapshots/everyday-workflow.json": "a86aafa04eba8193a6acd8ed927568b7fd82d2ffc69894e43c67361de3e60d33",
+ "snapshots/fixtures.json": "87a46bfe1470d96dbba3c61a02f82c389e7fa765c0631ae3af148e9bd9ea5bf7"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-codex.local.hire-reuse",
+ "source": {
+ "sha": "eb01d073c35134bf0d373947b55a79f9e443f8ee",
+ "ref": "refs/heads/codex/native-procedure-guidance",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325777217"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "gpt-5.6-sol",
+ "cleanup": "passed",
+ "startedRunCount": 6,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "94c594173473b2b40e6f8635d97f7e70e71e856cf99a84400fcdf3185782b81a",
+ "evidenceHashes": {
+ "evidence-manifest.json": "63babab4e851eedd8dc00474d0815c507d60343e121e770ce0f05c4aefa740dd",
+ "html-report/data/f84e6632cdf019513a84a0b08672da740648a5e7.json": "94c594173473b2b40e6f8635d97f7e70e71e856cf99a84400fcdf3185782b81a",
+ "playwright-output/runner-everyday-workflows--d934c-the-browser-and-public-APIs/attachments/runner-e2e-result-f768e9d7e6ca953c7c34ef967667dbac637d037e.json": "94c594173473b2b40e6f8635d97f7e70e71e856cf99a84400fcdf3185782b81a",
+ "result.json": "94c594173473b2b40e6f8635d97f7e70e71e856cf99a84400fcdf3185782b81a",
+ "snapshots/api-state.json": "d6b685e3fedec4993160abbb9436dfbf3f819c82f78b2acf912d9fea24150fdb",
+ "snapshots/browser-diagnostics.json": "21d2288d0a3b6db142c294c1a11657309147493d5295ed4f00a74c76eef34660",
+ "snapshots/chat-final-run-ledger.json": "667c2d841eb10e43176fe54e9344619bdebe15c7404d85f921be009e5a028984",
+ "snapshots/everyday-workflow.json": "5e5375d89bad4c311b4eecb0551c12d3aaad05337ab32b0dd3807c2b76fd3997",
+ "snapshots/fixtures.json": "9cc5dfc3ae89c49634c051c5f33be0ea1a8acc4932d2877225eac25021b1bdf8"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-opencode.local.delegate-feedback",
+ "source": {
+ "sha": "eb01d073c35134bf0d373947b55a79f9e443f8ee",
+ "ref": "refs/heads/codex/native-procedure-guidance",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325777217"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "startedRunCount": 3,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "41f0ad5604813feb32fa37fb6f57a4f413ef1a57dbeba2619449cfbc8a50871f",
+ "evidenceHashes": {
+ "evidence-manifest.json": "c3f408e84ab9a36f7abe3a58dd3b7df514f4c5f48ceed3efcf42caa36fec39c7",
+ "html-report/data/a829fecb87471d91b31c772c54d90f475156f3e8.json": "41f0ad5604813feb32fa37fb6f57a4f413ef1a57dbeba2619449cfbc8a50871f",
+ "playwright-output/runner-everyday-workflows--616ad-the-browser-and-public-APIs/attachments/runner-e2e-result-f10cd915174a4203d526eb0a386078715e179a96.json": "41f0ad5604813feb32fa37fb6f57a4f413ef1a57dbeba2619449cfbc8a50871f",
+ "result.json": "41f0ad5604813feb32fa37fb6f57a4f413ef1a57dbeba2619449cfbc8a50871f",
+ "snapshots/api-state.json": "9ef26183b198e896e7aa009caae51a43485c8eec8882e6b87fc0bb01eb86d38e",
+ "snapshots/browser-diagnostics.json": "4cd36a195c3a38b669c2c2be7c3724fceabf43229b27178664dee30755e97cdb",
+ "snapshots/chat-final-run-ledger.json": "10634af18a8d28e77c905e5688ea7289bd846a26d2dd9ab1b2a123830aff476a",
+ "snapshots/everyday-workflow.json": "21b9add74a177fb9433bcfeec3c41fabded5449713da1a1eeff188f973a54808",
+ "snapshots/fixtures.json": "1a3dedfabfc9e1114b14eedaf4725d8a3b4f81d5945cfea1bd61e34f49fdfcf1"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-opencode.local.hire-reuse",
+ "source": {
+ "sha": "eb01d073c35134bf0d373947b55a79f9e443f8ee",
+ "ref": "refs/heads/codex/native-procedure-guidance",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37325777217"
+ },
+ "suiteDefinitionHash": "c0b25d634e19cb18f647058f357a83cb5a14845b6fada1764cf21258d00abf54",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "permanent_infrastructure",
+ "configuredModel": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "startedRunCount": 0,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [],
+ "resultSha256": "73d68db5221120745f90c411d265faa13f3b99bd4e22735e4ceab320ec2f8c6a",
+ "evidenceHashes": {
+ "evidence-manifest.json": "2607859e543f14494e344ceca6896cda6ccb7810c1fcc8c62d89009add2652bd",
+ "html-report/data/f2c1f121afe0207d99ecf59a23882f023b2296e0.json": "73d68db5221120745f90c411d265faa13f3b99bd4e22735e4ceab320ec2f8c6a",
+ "playwright-output/runner-everyday-workflows--90607-the-browser-and-public-APIs/attachments/runner-e2e-result-ae68640cfa3c5759281518d751c2991e889aaa73.json": "73d68db5221120745f90c411d265faa13f3b99bd4e22735e4ceab320ec2f8c6a",
+ "result.json": "73d68db5221120745f90c411d265faa13f3b99bd4e22735e4ceab320ec2f8c6a",
+ "snapshots/browser-diagnostics.json": "94d2792cae9e2a1628779f7349538e0ce00418a6e448c54fcbba978b55a1b8ed"
+ }
+ }
+ ],
+ "evidenceHashEntryCount": 100
+ },
+ "corrected": {
+ "totals": {
+ "baseline": {
+ "pass": 5,
+ "fail": 1,
+ "retainedStartedRuns": 27
+ },
+ "candidate": {
+ "pass": 3,
+ "fail": 3,
+ "retainedStartedRuns": 33
+ }
+ },
+ "pairs": [
+ {
+ "executionId": "everyday-workflows.runner-acpx-claude.local.delegate-feedback",
+ "baseline": "passed",
+ "candidate": "passed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-acpx-claude.local.hire-reuse",
+ "baseline": "passed",
+ "candidate": "passed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-codex.local.delegate-feedback",
+ "baseline": "passed",
+ "candidate": "failed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-codex.local.hire-reuse",
+ "baseline": "passed",
+ "candidate": "passed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-opencode.local.delegate-feedback",
+ "baseline": "failed",
+ "candidate": "failed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-opencode.local.hire-reuse",
+ "baseline": "passed",
+ "candidate": "failed"
+ }
+ ],
+ "cells": [
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.delegate-feedback",
+ "source": {
+ "sha": "aecfa3b6a5cab110a9b926e93705311bbcf4db47",
+ "ref": "refs/heads/codex/native-procedure-baseline-v2",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37331642168"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "claude-sonnet-5",
+ "cleanup": "passed",
+ "startedRunCount": 4,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "689e5154888c5ea3697b7577587c2aa8630dddb2100cb1b7786bc995c13c8097",
+ "evidenceHashes": {
+ "evidence-manifest.json": "07f77f464ba2e896decfb2db87db62b4c19ac37303f4b9e0cb3b89afcf707af6",
+ "html-report/data/580f383fcce38922446d0dd2f23a50283699a0b1.json": "689e5154888c5ea3697b7577587c2aa8630dddb2100cb1b7786bc995c13c8097",
+ "playwright-output/runner-everyday-workflows--fdae5-the-browser-and-public-APIs/attachments/runner-e2e-result-1a68e97dada87da3688de2deb3e9c9f12df25ad9.json": "689e5154888c5ea3697b7577587c2aa8630dddb2100cb1b7786bc995c13c8097",
+ "result.json": "689e5154888c5ea3697b7577587c2aa8630dddb2100cb1b7786bc995c13c8097",
+ "snapshots/api-state.json": "984d171f9e501c3b700e7c60e0abbed70f4abe3012dcfb33ad35ad0fa823c486",
+ "snapshots/browser-diagnostics.json": "26865f180e7e1f9d174b83fabcf13ed8912731f7533e257ad85bb01fb84d9d1e",
+ "snapshots/chat-final-run-ledger.json": "0740de3c3c6f91c79b7fe8b88ee75176d24d5fd07e12597f26d5504c682e1ee4",
+ "snapshots/everyday-workflow.json": "d8ee30954306a973cf4e1c412e648b87429961b1ba485e5fe76735d22e8b9b9e",
+ "snapshots/fixtures.json": "34b5db8164c2149e57b3bad0c249c7c738b114ccf11897533c85644d22700159"
+ }
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.hire-reuse",
+ "source": {
+ "sha": "aecfa3b6a5cab110a9b926e93705311bbcf4db47",
+ "ref": "refs/heads/codex/native-procedure-baseline-v2",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37331642168"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "claude-sonnet-5",
+ "cleanup": "passed",
+ "startedRunCount": 6,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "08ad50bd253f9551f531bd4ce0a15ee200bd4c544a171a6540b8f39bd526f3cd",
+ "evidenceHashes": {
+ "evidence-manifest.json": "ad4ae5c149d9a288f09510a9f40d751a0e16056a15c0e3e5fc22673f4fe89b5a",
+ "html-report/data/f1b2ae22fca1509f0c62f23f8d6df4ac70ed88ea.json": "08ad50bd253f9551f531bd4ce0a15ee200bd4c544a171a6540b8f39bd526f3cd",
+ "playwright-output/runner-everyday-workflows--9a7d2-the-browser-and-public-APIs/attachments/runner-e2e-result-345f227fa1bde20467d1efcdba85e9a90b9d2e06.json": "08ad50bd253f9551f531bd4ce0a15ee200bd4c544a171a6540b8f39bd526f3cd",
+ "result.json": "08ad50bd253f9551f531bd4ce0a15ee200bd4c544a171a6540b8f39bd526f3cd",
+ "snapshots/api-state.json": "748fcd21ef5cd800eec08adc76f8713475adb3c54605eec179001c79272347a8",
+ "snapshots/browser-diagnostics.json": "9cac545625ca2970a8b3dba8c8d3ab50473dfba21fd057d7d4d6fe59724f0a8e",
+ "snapshots/chat-final-run-ledger.json": "b8e78dbd52dff17b77f1dfcf18bf469a691e9bf30cff3dcc91e6d3d761334502",
+ "snapshots/everyday-workflow.json": "10552e78b7e70a050e43003419a37f5c215665e890cc928e188806c30e464589",
+ "snapshots/fixtures.json": "667ce63d133703653093d3217dd537ac50d5ada0bd3c6d0e15e4cc3607305314"
+ }
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-codex.local.delegate-feedback",
+ "source": {
+ "sha": "aecfa3b6a5cab110a9b926e93705311bbcf4db47",
+ "ref": "refs/heads/codex/native-procedure-baseline-v2",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37331642168"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "gpt-5.6-sol",
+ "cleanup": "passed",
+ "startedRunCount": 4,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "d0535b600235580ada1b0227b84ae5f621e1a3932a7a94e3285bfebfe7dd716a",
+ "evidenceHashes": {
+ "evidence-manifest.json": "8317f0026d88709a1fcd716b9373786bee39b9f61902a3c1cc48c4ff64b1b59e",
+ "html-report/data/0192f8929945cb662a6241d65fdd9e43994b876e.json": "d0535b600235580ada1b0227b84ae5f621e1a3932a7a94e3285bfebfe7dd716a",
+ "playwright-output/runner-everyday-workflows--a6fcb-the-browser-and-public-APIs/attachments/runner-e2e-result-be735800e00ca4152df495a405c0f0024010d799.json": "d0535b600235580ada1b0227b84ae5f621e1a3932a7a94e3285bfebfe7dd716a",
+ "result.json": "d0535b600235580ada1b0227b84ae5f621e1a3932a7a94e3285bfebfe7dd716a",
+ "snapshots/api-state.json": "4239640e901c755f81484e852b092a4ee99caf7421ca4ed364b418a59f6def51",
+ "snapshots/browser-diagnostics.json": "5b90904dacfbd32aecbe9cbe8ad59962c09242ee61ddfcb5feac326030b2e2d4",
+ "snapshots/chat-final-run-ledger.json": "8bb0946ed361a28a841c7d209ca18619436d087ec7f88fa7e1c1b1f326e35aae",
+ "snapshots/everyday-workflow.json": "668dfef6034aed2079cb9e8023fef8198074dbd08ebe3521b6c70b77de783ca6",
+ "snapshots/fixtures.json": "59d95bfccd4f60d1ff990483fba59210d0a8eaf63a8f0197c328e8e6c7bfb654"
+ }
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-codex.local.hire-reuse",
+ "source": {
+ "sha": "aecfa3b6a5cab110a9b926e93705311bbcf4db47",
+ "ref": "refs/heads/codex/native-procedure-baseline-v2",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37331642168"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "gpt-5.6-sol",
+ "cleanup": "passed",
+ "startedRunCount": 6,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "a23a9e92d7ff47999ee6483f5a927f41c725c0cce69d91c150cf4e9ab2cbe5eb",
+ "evidenceHashes": {
+ "evidence-manifest.json": "0a8bef60505c30179b11c36c764ba991e3e2a56be3b61a6fa7c3848786a5ebe9",
+ "html-report/data/71d82d27caa117b7d6102f8fe8ff41d42c222c7f.json": "a23a9e92d7ff47999ee6483f5a927f41c725c0cce69d91c150cf4e9ab2cbe5eb",
+ "playwright-output/runner-everyday-workflows--d934c-the-browser-and-public-APIs/attachments/runner-e2e-result-0c090b31617607484975dfd0adaed62b9f8ea755.json": "a23a9e92d7ff47999ee6483f5a927f41c725c0cce69d91c150cf4e9ab2cbe5eb",
+ "result.json": "a23a9e92d7ff47999ee6483f5a927f41c725c0cce69d91c150cf4e9ab2cbe5eb",
+ "snapshots/api-state.json": "9df20d0d9a4a319a87271c66eb38ea57dbc649464574c10e7cf62734378a29a6",
+ "snapshots/browser-diagnostics.json": "467a514913b0d01e876353bf5a76813fc7fb717dd8cbc567ee13eb17fbca8f72",
+ "snapshots/chat-final-run-ledger.json": "215358fb7caa14e656a15464b693940b9c202b0aefee817fe5375eb7912b0df2",
+ "snapshots/everyday-workflow.json": "b70f39ea8147669a795deffe59ce6fcc024f9d39a0e7a9ef8a809f8a8636f4e8",
+ "snapshots/fixtures.json": "7d104f51b41eee886b810b583b90a242652aba9e0596d9dddab5e2b4d764da42"
+ }
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-opencode.local.delegate-feedback",
+ "source": {
+ "sha": "aecfa3b6a5cab110a9b926e93705311bbcf4db47",
+ "ref": "refs/heads/codex/native-procedure-baseline-v2",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37331642168"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "candidate_failure",
+ "configuredModel": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "startedRunCount": 3,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": false
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ },
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ],
+ "resultSha256": "a51a5345df8812be3f754d3f0e5df30a1f826150a6c7778f0dc0726d642d7f4b",
+ "evidenceHashes": {
+ "evidence-manifest.json": "71573393fe99cd451ce4fdc90010c72572b769b2b0bbdfa11bc3f28bd8655d2a",
+ "html-report/data/0c3bfda38c3dc2d51f9f55d711970b533bf283fa.json": "a51a5345df8812be3f754d3f0e5df30a1f826150a6c7778f0dc0726d642d7f4b",
+ "playwright-output/runner-everyday-workflows--616ad-the-browser-and-public-APIs/attachments/runner-e2e-result-b4cc93b23776a0ae821207b52c43a3f464f99977.json": "a51a5345df8812be3f754d3f0e5df30a1f826150a6c7778f0dc0726d642d7f4b",
+ "result.json": "a51a5345df8812be3f754d3f0e5df30a1f826150a6c7778f0dc0726d642d7f4b",
+ "snapshots/api-state.json": "bab60c326f4ad0971748cf30f2de276eb7f69c985a38733d923c78b3fec659aa",
+ "snapshots/browser-diagnostics.json": "d164e04291112ffe4efc8d248d61608e944d7b1ae6d3fb14c10c5a655eb06790",
+ "snapshots/chat-final-run-ledger.json": "de0b3b353dd606474591946c3bdb42aac2084a0de01ec83b5faae0004c250003",
+ "snapshots/everyday-workflow.json": "6505cc96cb7ff2f371c73eeef2318e105fb8b8aaa14f7b3252ef8a432f048345",
+ "snapshots/fixtures.json": "46fdccbefe0f5b14de8d26798e04bf042c1b9ea9f5155cde523d292fa32c4e85"
+ }
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-opencode.local.hire-reuse",
+ "source": {
+ "sha": "aecfa3b6a5cab110a9b926e93705311bbcf4db47",
+ "ref": "refs/heads/codex/native-procedure-baseline-v2",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37331642168"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "startedRunCount": 4,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "741f7e0deee7f7b7b8c8498e998100ad86e3670340a116bba7e3d7f19b139ff4",
+ "evidenceHashes": {
+ "evidence-manifest.json": "70ca2a5525ce594a58d9e88ceae252e03918fe9c5af5f478bd345e7623085aff",
+ "html-report/data/b4ef23d5b811da0b4c40ac32d7109b15b2ed3eea.json": "741f7e0deee7f7b7b8c8498e998100ad86e3670340a116bba7e3d7f19b139ff4",
+ "playwright-output/runner-everyday-workflows--90607-the-browser-and-public-APIs/attachments/runner-e2e-result-a3041877169260aa9a9b8c577933a9aaffdc90d6.json": "741f7e0deee7f7b7b8c8498e998100ad86e3670340a116bba7e3d7f19b139ff4",
+ "result.json": "741f7e0deee7f7b7b8c8498e998100ad86e3670340a116bba7e3d7f19b139ff4",
+ "snapshots/api-state.json": "50a969cb558df7ca61bad975ace655421f6afc9e894a344834b79a8e760ce5e4",
+ "snapshots/browser-diagnostics.json": "f5d63620b23461a6ea972734fe519a3e1e08cd6d4301e4520255b552d20862a8",
+ "snapshots/chat-final-run-ledger.json": "2688ded68ad348d62bfe745b4a26c55f1108a6c8c2bcc35e5cb0fcd421130e4b",
+ "snapshots/everyday-workflow.json": "ca3bf543901083b817c9e08e336a54a28a61d7ca4af5a03fbed5579ce372adce",
+ "snapshots/fixtures.json": "b04cca5e54ad156e911331ae8e2d6af3b8a3e31feedbd3ecab464414ca7d9a75"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.delegate-feedback",
+ "source": {
+ "sha": "ffe847fabaebbf24bc93924a4b6c8922d46a1fb6",
+ "ref": "refs/heads/codex/native-procedure-candidate-v2-recovery",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37334061104"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "claude-sonnet-5",
+ "cleanup": "passed",
+ "startedRunCount": 4,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "1d0a1e688b1f003491c27497edeeff963a5459ed99acfd32ada06fb9decd93b1",
+ "evidenceHashes": {
+ "evidence-manifest.json": "977cf3c0ac2c93190b71f6bb766ce44107e78f1d9b726db79d7e4c7e1efe7ed0",
+ "html-report/data/8e6146fc86993655e3a364a37eff7cf125570318.json": "1d0a1e688b1f003491c27497edeeff963a5459ed99acfd32ada06fb9decd93b1",
+ "playwright-output/runner-everyday-workflows--fdae5-the-browser-and-public-APIs/attachments/runner-e2e-result-c75e8d1cd375ccf9308dc1626ec8d9959eae7c13.json": "1d0a1e688b1f003491c27497edeeff963a5459ed99acfd32ada06fb9decd93b1",
+ "result.json": "1d0a1e688b1f003491c27497edeeff963a5459ed99acfd32ada06fb9decd93b1",
+ "snapshots/api-state.json": "e5ce82339b356c8125b32949371049d6b1ba85305ecff321e2b30ee022029b18",
+ "snapshots/browser-diagnostics.json": "72af20421dd49d3362dc6b5688cd96d960bf41b34ed58dd8833fea2ca9d58386",
+ "snapshots/chat-final-run-ledger.json": "b3d15cabdbe0819da45f08621fba6df2e29f6d2655ea3f6a51a55daed14b15ef",
+ "snapshots/everyday-workflow.json": "d2074d8f9c302d383ea3e25b81a5d844173725b70ba7b1fecca3bfa8f75687e6",
+ "snapshots/fixtures.json": "7ad274c380095f860f5bf95a31dd2e9bd772b64c7230f30288aa171560c43f11"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.hire-reuse",
+ "source": {
+ "sha": "ffe847fabaebbf24bc93924a4b6c8922d46a1fb6",
+ "ref": "refs/heads/codex/native-procedure-candidate-v2",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37331580879"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "claude-sonnet-5",
+ "cleanup": "passed",
+ "startedRunCount": 6,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "6f4ef2c3760227fc504de1030e30788afe54168b91db72f5088c5eb634295a47",
+ "evidenceHashes": {
+ "evidence-manifest.json": "7c04512304d32ac249741243f3081f87a6c9d3530b29f2fc31af2619ae79ba1a",
+ "html-report/data/e789dbe6a578c12c42b3ab46cc3c657158c41129.json": "6f4ef2c3760227fc504de1030e30788afe54168b91db72f5088c5eb634295a47",
+ "playwright-output/runner-everyday-workflows--9a7d2-the-browser-and-public-APIs/attachments/runner-e2e-result-02e9625499f3a6da62e679ca785ff0a376465eef.json": "6f4ef2c3760227fc504de1030e30788afe54168b91db72f5088c5eb634295a47",
+ "result.json": "6f4ef2c3760227fc504de1030e30788afe54168b91db72f5088c5eb634295a47",
+ "snapshots/api-state.json": "83a3295d9563dcbbaccbdcf5278a277af41cd4a24b723af1c28f5f6795e895d7",
+ "snapshots/browser-diagnostics.json": "85188804dee7b70a86a96808b1625e54b421663f3a47f8662845c44e8f675bea",
+ "snapshots/chat-final-run-ledger.json": "042fb89f01a7b790147efc55d0879c8fc39090518cf6bf9c3ed4a3772acf6ac6",
+ "snapshots/everyday-workflow.json": "063028cb1f58cf86b2c13ac2ae17a5d54f0780c5f1883a489f00904ce2e3696c",
+ "snapshots/fixtures.json": "366e91cf2365f156fa370ac1fb816f920ebceba5d6978b5fd6e773c2717a0601"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-codex.local.delegate-feedback",
+ "source": {
+ "sha": "ffe847fabaebbf24bc93924a4b6c8922d46a1fb6",
+ "ref": "refs/heads/codex/native-procedure-candidate-v2-recovery",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37334061104"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "candidate_failure",
+ "configuredModel": "gpt-5.6-sol",
+ "cleanup": "passed",
+ "startedRunCount": 4,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ],
+ "resultSha256": "2b4c8af68619aca7ffc2ac40f2569b1595ba21bdabf2481c6073b7186d220adf",
+ "evidenceHashes": {
+ "evidence-manifest.json": "008abe42e978f9224955e623d237b53a0dfaefafec767635aef09dbf20874c77",
+ "html-report/data/247c57b22f37607373563c94a9554ba3c8f6a4f0.json": "2b4c8af68619aca7ffc2ac40f2569b1595ba21bdabf2481c6073b7186d220adf",
+ "playwright-output/runner-everyday-workflows--a6fcb-the-browser-and-public-APIs/attachments/runner-e2e-result-146fc7aa673f1bd55ea9e51ad19afdbd163cc99b.json": "2b4c8af68619aca7ffc2ac40f2569b1595ba21bdabf2481c6073b7186d220adf",
+ "result.json": "2b4c8af68619aca7ffc2ac40f2569b1595ba21bdabf2481c6073b7186d220adf",
+ "snapshots/api-state.json": "d4d98e4fa703535b9d7a02eab49f3ac69e32836c1a556285327e0c51a88ea6db",
+ "snapshots/browser-diagnostics.json": "791cb4bc513bbbfbd7342f09d827520a8aed93bb14b1749e911dba31be0f0a94",
+ "snapshots/chat-final-run-ledger.json": "3c97659721c812cc3ab632f532982c8d1889133cad37ca324aece54eb0d78152",
+ "snapshots/everyday-workflow.json": "5e9907a320ace5ddbdc695a846ea711bd887aaddc793e56c9e20af9a6ec386b4",
+ "snapshots/fixtures.json": "96d4acbe3a2da0c05d8f5d41447302e805f76e6bf66996d8d8ab26f6db99c4e5"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-codex.local.hire-reuse",
+ "source": {
+ "sha": "ffe847fabaebbf24bc93924a4b6c8922d46a1fb6",
+ "ref": "refs/heads/codex/native-procedure-candidate-v2",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37331580879"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "configuredModel": "gpt-5.6-sol",
+ "cleanup": "passed",
+ "startedRunCount": 6,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ],
+ "resultSha256": "266e8d35f8d4ef3a570ea6940c64b6a9892eb6ab1d14324625da2337b4e7b99c",
+ "evidenceHashes": {
+ "evidence-manifest.json": "4b60c8a396e229b271fb377c44148e7b922286093824c48ca86782ed19490c0b",
+ "html-report/data/7c7b49ba9c9fcdcbde63035d3af25ba0bdade045.json": "266e8d35f8d4ef3a570ea6940c64b6a9892eb6ab1d14324625da2337b4e7b99c",
+ "playwright-output/runner-everyday-workflows--d934c-the-browser-and-public-APIs/attachments/runner-e2e-result-2d7949d3b25761e104f66bbe3f3f56425e20a3ab.json": "266e8d35f8d4ef3a570ea6940c64b6a9892eb6ab1d14324625da2337b4e7b99c",
+ "result.json": "266e8d35f8d4ef3a570ea6940c64b6a9892eb6ab1d14324625da2337b4e7b99c",
+ "snapshots/api-state.json": "87cc674d10f53be4beecaf60e8c50813e76a2c774bf5c1e9173733be23979615",
+ "snapshots/browser-diagnostics.json": "139fedd6a92bed9ff5ae218d8b012da508b97cf4494eaa102472b59a230d952d",
+ "snapshots/chat-final-run-ledger.json": "692d37db951fe5b2852a1748f72392cb14977d07cfee009961535e8170830712",
+ "snapshots/everyday-workflow.json": "68fbc3745b7aa60145479bd4cbd8646e3faac56b96bd501c438491d04b881964",
+ "snapshots/fixtures.json": "396dcdb89dd9656c748c5a5a1e34cf774bcb2e178124bd46e8d051dba963fd10"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-opencode.local.delegate-feedback",
+ "source": {
+ "sha": "ffe847fabaebbf24bc93924a4b6c8922d46a1fb6",
+ "ref": "refs/heads/codex/native-procedure-candidate-v2",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37331580879"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "candidate_failure",
+ "configuredModel": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "startedRunCount": 4,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": false
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ },
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ],
+ "resultSha256": "17c1145948d1f444211d9b319f36d7e9562bb4c99e804024cfbe0bf6f780354b",
+ "evidenceHashes": {
+ "evidence-manifest.json": "4911bab65a4f2e24573870946b894d3f5ca4030819ae023881644f7c35e443fc",
+ "html-report/data/ef9ff8e5b5a82f998ba0c465bdce4ec2c19294d2.json": "17c1145948d1f444211d9b319f36d7e9562bb4c99e804024cfbe0bf6f780354b",
+ "playwright-output/runner-everyday-workflows--616ad-the-browser-and-public-APIs/attachments/runner-e2e-result-1f3520dbb09fae78c011e89c25533003bd91a93a.json": "17c1145948d1f444211d9b319f36d7e9562bb4c99e804024cfbe0bf6f780354b",
+ "result.json": "17c1145948d1f444211d9b319f36d7e9562bb4c99e804024cfbe0bf6f780354b",
+ "snapshots/api-state.json": "7b0631c60b459355779aa75d83554df845192bd19ee748c5ef8acda3a15a97ff",
+ "snapshots/browser-diagnostics.json": "cf9da33e8f81b874be572e7bce6103fc71bb0add1ecc9a48d1805379bdb1430d",
+ "snapshots/chat-final-run-ledger.json": "3f87d37dd18a1311f34d75ab3e07f1e7cf674d3b1180ca219e241ae8decea5dc",
+ "snapshots/everyday-workflow.json": "e67b30bbf111cd16281f2b6bed2a99343a62924493149b461716dce96c578efb",
+ "snapshots/fixtures.json": "f1b5d61b9cb04ca16642614b53a5f676a527466d31c835ecdd417ea9bda60aed"
+ }
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-opencode.local.hire-reuse",
+ "source": {
+ "sha": "ffe847fabaebbf24bc93924a4b6c8922d46a1fb6",
+ "ref": "refs/heads/codex/native-procedure-candidate-v2",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37331580879"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "candidate_failure",
+ "configuredModel": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "startedRunCount": 9,
+ "resultLedgerRunSetEqual": true,
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ],
+ "resultSha256": "b001ce9d1741adc087dab22643a3f65e5dabc88bcbde432dcebe9c1f793f6a8e",
+ "evidenceHashes": {
+ "evidence-manifest.json": "1426f8127ca46828ef5320c3bf5ab2134d60172361bb1c43a2b415fe61c766ff",
+ "html-report/data/9777bc5b0460c2689ba53533aad6b65d6879e30b.json": "b001ce9d1741adc087dab22643a3f65e5dabc88bcbde432dcebe9c1f793f6a8e",
+ "playwright-output/runner-everyday-workflows--90607-the-browser-and-public-APIs/attachments/runner-e2e-result-e406f7ff0925c2cfeaed8101a63cb789dac7ec22.json": "b001ce9d1741adc087dab22643a3f65e5dabc88bcbde432dcebe9c1f793f6a8e",
+ "result.json": "b001ce9d1741adc087dab22643a3f65e5dabc88bcbde432dcebe9c1f793f6a8e",
+ "snapshots/api-state.json": "fa9852b1155d3f3753bfe711e30e8fff6847cf30d82f58089db6592365719c59",
+ "snapshots/browser-diagnostics.json": "0ae03cb7af8cb2e405f6a1d78f3fb86fe9193de6bc07c5b7a69f44f4956c664d",
+ "snapshots/chat-final-run-ledger.json": "ad8bed7e06561967f88ea2b0beb12728257db8b579f3547df55729225fbb2889",
+ "snapshots/everyday-workflow.json": "b5b0b3e3f07eaa9be98b1c335585fa1ba80bdda1acab3f95b81e512b376f375f",
+ "snapshots/fixtures.json": "1b310f2e030acbf3997ffd87f648f0106e7a06e475671c16a8164f7b1400cb4c"
+ }
+ }
+ ],
+ "evidenceHashEntryCount": 108
+ },
+ "correctedPairCounts": {
+ "newFailures": 2,
+ "newPasses": 0,
+ "unchangedPasses": 3,
+ "unchangedFailures": 1,
+ "pending": 0
+ },
+ "sourceModelSuiteAttemptLeadBudgetCleanupAndRunSetAssertions": true,
+ "interruptions": {
+ "campaign": 37331580879,
+ "source": "ffe847fabaebbf24bc93924a4b6c8922d46a1fb6",
+ "recoveryPolicy": "One bounded replacement cell each on identical source, distinct workflow target; preserve original interruption, unknown run/cost totals, and both attempt identities. Do not repeat successful baselines.",
+ "recoveryTrustedWorkflowSha": "a65ca0950834a85bb93bcc4b4042ecacdebfef53",
+ "workflowByteIdenticalToOriginal": true,
+ "workflowFileSha256": "eb570267e66043c1196338bb386b07ab8e8e8306ba04b6223f13b73b04fdc8f4",
+ "recoveryCampaign": 37334061104,
+ "cells": [
+ {
+ "profile": "claude",
+ "jobId": 111838521502,
+ "logSha256": "ad84bbdc76f9a48a16886f676335ec5fe9ba2190c47f912f34619d010c36bc1a",
+ "originalWorkflowConclusion": "failure",
+ "behavioralGrade": null,
+ "finalLedger": null,
+ "cleanupReceipt": null,
+ "actualRunCount": null,
+ "actualCharges": null,
+ "observedPartialRunRecordCount": 4
+ },
+ {
+ "profile": "codex",
+ "jobId": 111838521694,
+ "logSha256": "3f7b36ae28d0cb254a6199f548ce6c347e91a39dcc456eb7e8078290211008ea",
+ "originalWorkflowConclusion": "failure",
+ "behavioralGrade": null,
+ "finalLedger": null,
+ "cleanupReceipt": null,
+ "actualRunCount": null,
+ "actualCharges": null,
+ "observedPartialRunRecordCount": 4
+ }
+ ]
+ },
+ "accounting": {
+ "originalRetainedStartedRuns": 40,
+ "correctedCompletedOrRecoveredRetainedStartedRuns": 60,
+ "allRetainedStartedRuns": 100,
+ "additionalInterruptedActualRuns": null,
+ "actualCharges": null,
+ "completeTotalRunCount": false,
+ "infrastructureRecoveryCellCount": 2,
+ "limit": "Completed/recovered cell ledgers match their result run sets. Two earlier interrupted candidate jobs lack final result/ledger/cleanup receipts; their actual runs/charges are additional and incompletely known. No claim of total known cost or first-attempt success."
+ },
+ "measurement": {
+ "corrected-baseline": {
+ "schema": "paperclip.native-procedure-measurement.v2",
+ "sourceSha": "aecfa3b6a5cab110a9b926e93705311bbcf4db47",
+ "sourceDirty": false,
+ "measuredInputsDirty": false,
+ "sourceHashes": {
+ "server/src/onboarding-assets/default/AGENTS.md": "c6318bf7e425cc0dd7acd4ff2905dab5c46ffddedef979afdf06720c82f6e95a",
+ "packages/paperclip-runner/src/contracts/runtime-context.ts": "a17e30a69f3cb38fba00c37e1a06753d723651a004e6050c9e77ae202a61264b",
+ "packages/paperclip-runner/src/protocol-actions/hire-agent.ts": "3b786405fa48e6ba9cf63789c03bbbb370fc2962a4a5c8bd80ccca57759bf912",
+ "packages/paperclip-runner/src/protocol-actions/create-task.ts": "4efe71c1693dd65d8087b2fdbaf5831b397130d036afb837ece20d4791631805",
+ "packages/paperclip-runner/src/protocol-actions/set-dependencies.ts": "53c65776ce4984f177d261c1e53957a97e1a236ce58e731119cb8ee26f141da2",
+ "packages/paperclip-runner/src/catalog/semantic-action-catalog.ts": "170a1e97f6402d87041b944fc45a7b3a41cf5d07dc158b3cc494ac38208dbd6d",
+ "packages/paperclip-runner/generated/semantic-action-catalog.json": "6b398dbf14c2cb239333321387e3978b0ef21b2c1c6a12882105d077eb0214a0",
+ "packages/paperclip-runner/generated/capability/semantic-tool-contracts.json": "c31cb3b21aa81c46847e6827865bc17d100a2f135822b7580bec7fc1893454a2",
+ "packages/paperclip-runner/protocol/fixtures/evals/native-execution-seeded.json": "b4e488f922dd328a3967b2560951c2377f4c1411fb2c4c9eef7a44195a8f7514",
+ "packages/paperclip-runner/protocol/manifest.json": "9cebc584dce7b42ed6800bef9b3e1c83880a67798a7bdceb9d9482b246f66a18",
+ "packages/paperclip-runner/src/backends/codex-native-backend.ts": "affecc515a623e0dfeb338f553ea53ebb7d18baa3d13e4395d17b21000dbee93",
+ "packages/paperclip-runner/src/drivers/opencode/mcp-bridge.ts": "ec1cd94c17be22d0556d4586fa6407b28e2309ed7c2437d95a32beeb0755cc4f",
+ "server/src/services/native-runtime/paperclip-runner-tool-authority.ts": "d2360cdaa63902cbf0c6a6109da452ba7e0b2a5aaa76ee5cab9c63b4bf12e584",
+ "server/src/services/native-runtime/native-session-resume.ts": "5b27465e1a328412770fc27c4bc637e88b62022adc6a67709bb74187eadc465b",
+ "server/src/__tests__/native-procedure-measurement.test.ts": "4e5725c0d86442c0214d96e6ab489547b919d45f8f237d9ec14d02437965268d"
+ },
+ "boundary": "scripted runnerd RPC with production standard-mode authority, API tools enabled, local workspace, no assigned external apps",
+ "byteAccounting": "utf8Bytes counts the unmodified JSON serialization of each extracted component/projection; normalizedComparison substitutes only the fixture workspace path. Neither is the entire transport request.",
+ "providerCalls": 0,
+ "tokenCount": null,
+ "upstreamLoadingOrTruncation": "unverified",
+ "vendorStockPrompt": "unavailable",
+ "receipts": [
+ {
+ "provider": "codex",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "f89d1d862203db2f03023c0144139925f6784c0fbeae1ac0c2957962c4d60cc4",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293",
+ "normalizedComparison": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "a336ca46d52cada364ad79d6072332acf4c3920a5f1f6d595ab5c8e1b2be6117",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48949,
+ "characters": 48939,
+ "sha256": "696a27c9d8dd92d5c22a94eca82f214786f7fb12a7a00712685990450d14fc6f",
+ "normalizedComparison": {
+ "utf8Bytes": 48781,
+ "characters": 48771,
+ "sha256": "1678ae17dcdfedd17de242b5fce9a27d287bfd9c4203611678043a99342a7754"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "codex",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "f89d1d862203db2f03023c0144139925f6784c0fbeae1ac0c2957962c4d60cc4",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293",
+ "normalizedComparison": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "a336ca46d52cada364ad79d6072332acf4c3920a5f1f6d595ab5c8e1b2be6117",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48949,
+ "characters": 48939,
+ "sha256": "696a27c9d8dd92d5c22a94eca82f214786f7fb12a7a00712685990450d14fc6f",
+ "normalizedComparison": {
+ "utf8Bytes": 48781,
+ "characters": 48771,
+ "sha256": "1678ae17dcdfedd17de242b5fce9a27d287bfd9c4203611678043a99342a7754"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "codex",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "f89d1d862203db2f03023c0144139925f6784c0fbeae1ac0c2957962c4d60cc4",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293",
+ "normalizedComparison": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 47087,
+ "characters": 47077,
+ "sha256": "bb7057ad43526b62652d752d504b41b9113254ebae72d461859ea12080905ca2",
+ "normalizedComparison": {
+ "utf8Bytes": 47003,
+ "characters": 46993,
+ "sha256": "9888af76927545d1e986c9f810975e6a1c4c3e395d0b25550e74d7f75146397c"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "f89d1d862203db2f03023c0144139925f6784c0fbeae1ac0c2957962c4d60cc4",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293",
+ "normalizedComparison": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "a336ca46d52cada364ad79d6072332acf4c3920a5f1f6d595ab5c8e1b2be6117",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48949,
+ "characters": 48939,
+ "sha256": "696a27c9d8dd92d5c22a94eca82f214786f7fb12a7a00712685990450d14fc6f",
+ "normalizedComparison": {
+ "utf8Bytes": 48781,
+ "characters": 48771,
+ "sha256": "1678ae17dcdfedd17de242b5fce9a27d287bfd9c4203611678043a99342a7754"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "f89d1d862203db2f03023c0144139925f6784c0fbeae1ac0c2957962c4d60cc4",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293",
+ "normalizedComparison": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "a336ca46d52cada364ad79d6072332acf4c3920a5f1f6d595ab5c8e1b2be6117",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48949,
+ "characters": 48939,
+ "sha256": "696a27c9d8dd92d5c22a94eca82f214786f7fb12a7a00712685990450d14fc6f",
+ "normalizedComparison": {
+ "utf8Bytes": 48781,
+ "characters": 48771,
+ "sha256": "1678ae17dcdfedd17de242b5fce9a27d287bfd9c4203611678043a99342a7754"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "f89d1d862203db2f03023c0144139925f6784c0fbeae1ac0c2957962c4d60cc4",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293",
+ "normalizedComparison": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 47087,
+ "characters": 47077,
+ "sha256": "bb7057ad43526b62652d752d504b41b9113254ebae72d461859ea12080905ca2",
+ "normalizedComparison": {
+ "utf8Bytes": 47003,
+ "characters": 46993,
+ "sha256": "9888af76927545d1e986c9f810975e6a1c4c3e395d0b25550e74d7f75146397c"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "f89d1d862203db2f03023c0144139925f6784c0fbeae1ac0c2957962c4d60cc4",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293",
+ "normalizedComparison": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "a336ca46d52cada364ad79d6072332acf4c3920a5f1f6d595ab5c8e1b2be6117",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48949,
+ "characters": 48939,
+ "sha256": "696a27c9d8dd92d5c22a94eca82f214786f7fb12a7a00712685990450d14fc6f",
+ "normalizedComparison": {
+ "utf8Bytes": 48781,
+ "characters": 48771,
+ "sha256": "1678ae17dcdfedd17de242b5fce9a27d287bfd9c4203611678043a99342a7754"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "f89d1d862203db2f03023c0144139925f6784c0fbeae1ac0c2957962c4d60cc4",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293",
+ "normalizedComparison": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "a336ca46d52cada364ad79d6072332acf4c3920a5f1f6d595ab5c8e1b2be6117",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48949,
+ "characters": 48939,
+ "sha256": "696a27c9d8dd92d5c22a94eca82f214786f7fb12a7a00712685990450d14fc6f",
+ "normalizedComparison": {
+ "utf8Bytes": 48781,
+ "characters": 48771,
+ "sha256": "1678ae17dcdfedd17de242b5fce9a27d287bfd9c4203611678043a99342a7754"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "f89d1d862203db2f03023c0144139925f6784c0fbeae1ac0c2957962c4d60cc4",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293",
+ "normalizedComparison": {
+ "utf8Bytes": 44944,
+ "characters": 44934,
+ "sha256": "c8f98376b8e7e5c7f92bce1c0d36ca2fb82fe0e2bd398a6b2750a9a25043f293"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 47087,
+ "characters": 47077,
+ "sha256": "bb7057ad43526b62652d752d504b41b9113254ebae72d461859ea12080905ca2",
+ "normalizedComparison": {
+ "utf8Bytes": 47003,
+ "characters": 46993,
+ "sha256": "9888af76927545d1e986c9f810975e6a1c4c3e395d0b25550e74d7f75146397c"
+ }
+ },
+ "deliveredToolCount": 39
+ }
+ ],
+ "mcpReceipt": {
+ "boundary": "authenticated loopback MCP tools/list; no OpenCode/provider process",
+ "serverAnnotationsForwarded": false,
+ "tools": {
+ "utf8Bytes": 44249,
+ "characters": 44239,
+ "sha256": "07d02ed46f9055af77756edc004dd3b30ec796afbbabe21623709f810d7ba1d1",
+ "normalizedComparison": {
+ "utf8Bytes": 44249,
+ "characters": 44239,
+ "sha256": "07d02ed46f9055af77756edc004dd3b30ec796afbbabe21623709f810d7ba1d1"
+ }
+ },
+ "count": 39
+ },
+ "originalReceiptSha256": "2158cc185b2d7c5dd6082737836a7d1c5d3e20bf4539a897e41ed4e99080aadd"
+ },
+ "corrected-candidate": {
+ "schema": "paperclip.native-procedure-measurement.v2",
+ "sourceSha": "ffe847fabaebbf24bc93924a4b6c8922d46a1fb6",
+ "sourceDirty": true,
+ "measuredInputsDirty": false,
+ "sourceHashes": {
+ "server/src/onboarding-assets/default/AGENTS.md": "c6318bf7e425cc0dd7acd4ff2905dab5c46ffddedef979afdf06720c82f6e95a",
+ "packages/paperclip-runner/src/contracts/runtime-context.ts": "3d2ee39cf7cc2210104e155213f04cec82981f76cd7c38384cdc11fa3ce4b013",
+ "packages/paperclip-runner/src/protocol-actions/hire-agent.ts": "ed8d270e2f3a8357bde5f2b180616d09f45218cd90bad22609d2e2e3d02d0319",
+ "packages/paperclip-runner/src/protocol-actions/create-task.ts": "8557d4030c97aaf99e8ef45dc608e4e0117c764eb459b221ce6739499d79b8aa",
+ "packages/paperclip-runner/src/protocol-actions/set-dependencies.ts": "89819f6741dc14009f2daf54717f5e23d583c6f5685c30459fe8a0d672a2720b",
+ "packages/paperclip-runner/src/catalog/semantic-action-catalog.ts": "786b597ab2199f3d943e499911fb58cfd014e78ff60923b9f44b9e2d80d73d4d",
+ "packages/paperclip-runner/generated/semantic-action-catalog.json": "795c5c8b98b1d7d60a2097760ffcb5a72ffa27713ca75b086ec741bbb0260f3a",
+ "packages/paperclip-runner/generated/capability/semantic-tool-contracts.json": "383ca779a4a4e98b9cf739ccfbfd072e470b57d8a340dbf3e86c7d502285f5ba",
+ "packages/paperclip-runner/protocol/fixtures/evals/native-execution-seeded.json": "044d8532b9a51d5ad254618a32f2d9d39227b70110d916e1a05b8072f4ee4e22",
+ "packages/paperclip-runner/protocol/manifest.json": "420055c0f98b46f57096ac32bdfb6a0d53ae40ac2c3345dc1fea7cfdab2addb0",
+ "packages/paperclip-runner/src/backends/codex-native-backend.ts": "affecc515a623e0dfeb338f553ea53ebb7d18baa3d13e4395d17b21000dbee93",
+ "packages/paperclip-runner/src/drivers/opencode/mcp-bridge.ts": "ec1cd94c17be22d0556d4586fa6407b28e2309ed7c2437d95a32beeb0755cc4f",
+ "server/src/services/native-runtime/paperclip-runner-tool-authority.ts": "ae5cd9c6d076cf44471b42c583f69eea9776aaad41ccbc8319d416aa88f78b44",
+ "server/src/services/native-runtime/native-session-resume.ts": "d9d4d7fde805c150e8278fd26f36d5e27d77c49690a0371f20e83b542f9cb2db",
+ "server/src/__tests__/native-procedure-measurement.test.ts": "4e5725c0d86442c0214d96e6ab489547b919d45f8f237d9ec14d02437965268d"
+ },
+ "boundary": "scripted runnerd RPC with production standard-mode authority, API tools enabled, local workspace, no assigned external apps",
+ "byteAccounting": "utf8Bytes counts the unmodified JSON serialization of each extracted component/projection; normalizedComparison substitutes only the fixture workspace path. Neither is the entire transport request.",
+ "providerCalls": 0,
+ "tokenCount": null,
+ "upstreamLoadingOrTruncation": "unverified",
+ "vendorStockPrompt": "unavailable",
+ "receipts": [
+ {
+ "provider": "codex",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "a415c39912f9b7c8a15b24dc27702229e2458adcef143511d77d67bd125d854b",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c",
+ "normalizedComparison": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "28e674540ba45792d6a31a1acef0a5b99fe8aa60c66df2d4aeda12dbe7bba3b5",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48489,
+ "characters": 48479,
+ "sha256": "911dace61347be9b8515ffd249ca84bfb67df487c5a1a2cecebe6c5b822f34ce",
+ "normalizedComparison": {
+ "utf8Bytes": 48321,
+ "characters": 48311,
+ "sha256": "31bc2475becb447e0f2722ad61a32938693258cca07c3b1e3f7162b8be0d8319"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "codex",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "a415c39912f9b7c8a15b24dc27702229e2458adcef143511d77d67bd125d854b",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c",
+ "normalizedComparison": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "28e674540ba45792d6a31a1acef0a5b99fe8aa60c66df2d4aeda12dbe7bba3b5",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48489,
+ "characters": 48479,
+ "sha256": "911dace61347be9b8515ffd249ca84bfb67df487c5a1a2cecebe6c5b822f34ce",
+ "normalizedComparison": {
+ "utf8Bytes": 48321,
+ "characters": 48311,
+ "sha256": "31bc2475becb447e0f2722ad61a32938693258cca07c3b1e3f7162b8be0d8319"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "codex",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "a415c39912f9b7c8a15b24dc27702229e2458adcef143511d77d67bd125d854b",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c",
+ "normalizedComparison": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 46627,
+ "characters": 46617,
+ "sha256": "8e8e003648345a706d3eb28b3e0762e8accf51291101eed78be98b0e876cd445",
+ "normalizedComparison": {
+ "utf8Bytes": 46543,
+ "characters": 46533,
+ "sha256": "20b7f03d24078f192aa8935c269f63e06b50dc2a7176f417d64ca8c1ace92591"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "a415c39912f9b7c8a15b24dc27702229e2458adcef143511d77d67bd125d854b",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c",
+ "normalizedComparison": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "28e674540ba45792d6a31a1acef0a5b99fe8aa60c66df2d4aeda12dbe7bba3b5",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48489,
+ "characters": 48479,
+ "sha256": "911dace61347be9b8515ffd249ca84bfb67df487c5a1a2cecebe6c5b822f34ce",
+ "normalizedComparison": {
+ "utf8Bytes": 48321,
+ "characters": 48311,
+ "sha256": "31bc2475becb447e0f2722ad61a32938693258cca07c3b1e3f7162b8be0d8319"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "a415c39912f9b7c8a15b24dc27702229e2458adcef143511d77d67bd125d854b",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c",
+ "normalizedComparison": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "28e674540ba45792d6a31a1acef0a5b99fe8aa60c66df2d4aeda12dbe7bba3b5",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48489,
+ "characters": 48479,
+ "sha256": "911dace61347be9b8515ffd249ca84bfb67df487c5a1a2cecebe6c5b822f34ce",
+ "normalizedComparison": {
+ "utf8Bytes": 48321,
+ "characters": 48311,
+ "sha256": "31bc2475becb447e0f2722ad61a32938693258cca07c3b1e3f7162b8be0d8319"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "a415c39912f9b7c8a15b24dc27702229e2458adcef143511d77d67bd125d854b",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c",
+ "normalizedComparison": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 46627,
+ "characters": 46617,
+ "sha256": "8e8e003648345a706d3eb28b3e0762e8accf51291101eed78be98b0e876cd445",
+ "normalizedComparison": {
+ "utf8Bytes": 46543,
+ "characters": 46533,
+ "sha256": "20b7f03d24078f192aa8935c269f63e06b50dc2a7176f417d64ca8c1ace92591"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "a415c39912f9b7c8a15b24dc27702229e2458adcef143511d77d67bd125d854b",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c",
+ "normalizedComparison": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "28e674540ba45792d6a31a1acef0a5b99fe8aa60c66df2d4aeda12dbe7bba3b5",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48489,
+ "characters": 48479,
+ "sha256": "911dace61347be9b8515ffd249ca84bfb67df487c5a1a2cecebe6c5b822f34ce",
+ "normalizedComparison": {
+ "utf8Bytes": 48321,
+ "characters": 48311,
+ "sha256": "31bc2475becb447e0f2722ad61a32938693258cca07c3b1e3f7162b8be0d8319"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "a415c39912f9b7c8a15b24dc27702229e2458adcef143511d77d67bd125d854b",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c",
+ "normalizedComparison": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "28e674540ba45792d6a31a1acef0a5b99fe8aa60c66df2d4aeda12dbe7bba3b5",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48489,
+ "characters": 48479,
+ "sha256": "911dace61347be9b8515ffd249ca84bfb67df487c5a1a2cecebe6c5b822f34ce",
+ "normalizedComparison": {
+ "utf8Bytes": 48321,
+ "characters": 48311,
+ "sha256": "31bc2475becb447e0f2722ad61a32938693258cca07c3b1e3f7162b8be0d8319"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "a415c39912f9b7c8a15b24dc27702229e2458adcef143511d77d67bd125d854b",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c",
+ "normalizedComparison": {
+ "utf8Bytes": 45037,
+ "characters": 45027,
+ "sha256": "6830d63d19141fa7efcc7b53f0f6f7e044352d006c3e146ddc0073d502646e5c"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 46627,
+ "characters": 46617,
+ "sha256": "8e8e003648345a706d3eb28b3e0762e8accf51291101eed78be98b0e876cd445",
+ "normalizedComparison": {
+ "utf8Bytes": 46543,
+ "characters": 46533,
+ "sha256": "20b7f03d24078f192aa8935c269f63e06b50dc2a7176f417d64ca8c1ace92591"
+ }
+ },
+ "deliveredToolCount": 39
+ }
+ ],
+ "mcpReceipt": {
+ "boundary": "authenticated loopback MCP tools/list; no OpenCode/provider process",
+ "serverAnnotationsForwarded": false,
+ "tools": {
+ "utf8Bytes": 44342,
+ "characters": 44332,
+ "sha256": "4241b7d6404f286c693d8760fb41d9dfdf22170271bdf49a0674cc6717fe689b",
+ "normalizedComparison": {
+ "utf8Bytes": 44342,
+ "characters": 44332,
+ "sha256": "4241b7d6404f286c693d8760fb41d9dfdf22170271bdf49a0674cc6717fe689b"
+ }
+ },
+ "count": 39
+ },
+ "originalReceiptSha256": "8486d4c2897ceca5124500899e83eb9754230e80b992c971e586354253ec547e"
+ },
+ "integrated-baseline": {
+ "schema": "paperclip.native-procedure-measurement.v2",
+ "sourceSha": "ce31f5efd0d416205c3994c55dd02b645f8b8423",
+ "sourceDirty": false,
+ "measuredInputsDirty": false,
+ "sourceHashes": {
+ "server/src/onboarding-assets/default/AGENTS.md": "c6318bf7e425cc0dd7acd4ff2905dab5c46ffddedef979afdf06720c82f6e95a",
+ "packages/paperclip-runner/src/contracts/runtime-context.ts": "a17e30a69f3cb38fba00c37e1a06753d723651a004e6050c9e77ae202a61264b",
+ "packages/paperclip-runner/src/protocol-actions/hire-agent.ts": "3b786405fa48e6ba9cf63789c03bbbb370fc2962a4a5c8bd80ccca57759bf912",
+ "packages/paperclip-runner/src/protocol-actions/create-task.ts": "4efe71c1693dd65d8087b2fdbaf5831b397130d036afb837ece20d4791631805",
+ "packages/paperclip-runner/src/protocol-actions/set-dependencies.ts": "53c65776ce4984f177d261c1e53957a97e1a236ce58e731119cb8ee26f141da2",
+ "packages/paperclip-runner/src/catalog/semantic-action-catalog.ts": "b8f723ef39f31218d143e284ce6d379d3ba252d4f3086ce05c20db9daf56f848",
+ "packages/paperclip-runner/generated/semantic-action-catalog.json": "d287caff473a61800135866148f3a2a38ea46cf532343a390dfbf2557f6adc08",
+ "packages/paperclip-runner/generated/capability/semantic-tool-contracts.json": "3d490614baafe423d77d1ad6d46504d47c79373b33ed639614a5f67e9d9bde93",
+ "packages/paperclip-runner/protocol/fixtures/evals/native-execution-seeded.json": "a53e3d8eae39899111ff1a0110135a9cfafdd12f7843cf6872a3de8fae915a76",
+ "packages/paperclip-runner/protocol/manifest.json": "9cd783f47dd2b950a89404421a3e76446249693e61c934a91d6f4e529ec18f9b",
+ "packages/paperclip-runner/src/backends/codex-native-backend.ts": "affecc515a623e0dfeb338f553ea53ebb7d18baa3d13e4395d17b21000dbee93",
+ "packages/paperclip-runner/src/drivers/opencode/mcp-bridge.ts": "ec1cd94c17be22d0556d4586fa6407b28e2309ed7c2437d95a32beeb0755cc4f",
+ "server/src/services/native-runtime/paperclip-runner-tool-authority.ts": "d2360cdaa63902cbf0c6a6109da452ba7e0b2a5aaa76ee5cab9c63b4bf12e584",
+ "server/src/services/native-runtime/native-session-resume.ts": "5b27465e1a328412770fc27c4bc637e88b62022adc6a67709bb74187eadc465b",
+ "server/src/__tests__/native-procedure-measurement.test.ts": "4e5725c0d86442c0214d96e6ab489547b919d45f8f237d9ec14d02437965268d"
+ },
+ "boundary": "scripted runnerd RPC with production standard-mode authority, API tools enabled, local workspace, no assigned external apps",
+ "byteAccounting": "utf8Bytes counts the unmodified JSON serialization of each extracted component/projection; normalizedComparison substitutes only the fixture workspace path. Neither is the entire transport request.",
+ "providerCalls": 0,
+ "tokenCount": null,
+ "upstreamLoadingOrTruncation": "unverified",
+ "vendorStockPrompt": "unavailable",
+ "receipts": [
+ {
+ "provider": "codex",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "fd2c444ee5d225b4ec24fc46cb66b4c1e11e1f86745b50a297ce94da152b0be5",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd",
+ "normalizedComparison": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "3c83a00a3403aa8b20b47ecb9320b1006e0e823116e7947743c4adc6b3ec5803",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 49368,
+ "characters": 49358,
+ "sha256": "b89d8d78a06fb98b17022a1f36644c2b309fc8bbab9bf82ddc9a547d77cfa479",
+ "normalizedComparison": {
+ "utf8Bytes": 49200,
+ "characters": 49190,
+ "sha256": "721d0f637736336c3c8a470b6c80bf40208b09526076c565a98cab364324b63f"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "codex",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "fd2c444ee5d225b4ec24fc46cb66b4c1e11e1f86745b50a297ce94da152b0be5",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd",
+ "normalizedComparison": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "3c83a00a3403aa8b20b47ecb9320b1006e0e823116e7947743c4adc6b3ec5803",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 49368,
+ "characters": 49358,
+ "sha256": "b89d8d78a06fb98b17022a1f36644c2b309fc8bbab9bf82ddc9a547d77cfa479",
+ "normalizedComparison": {
+ "utf8Bytes": 49200,
+ "characters": 49190,
+ "sha256": "721d0f637736336c3c8a470b6c80bf40208b09526076c565a98cab364324b63f"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "codex",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "fd2c444ee5d225b4ec24fc46cb66b4c1e11e1f86745b50a297ce94da152b0be5",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd",
+ "normalizedComparison": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 47506,
+ "characters": 47496,
+ "sha256": "73d1774b566e6aaeca24a60a05410362609c7547c94413809bbb2cefe687477f",
+ "normalizedComparison": {
+ "utf8Bytes": 47422,
+ "characters": 47412,
+ "sha256": "bdb47770fd8f092e6f34ecb85768ed24f1a8613962ea3461252c60911dba5ed6"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "fd2c444ee5d225b4ec24fc46cb66b4c1e11e1f86745b50a297ce94da152b0be5",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd",
+ "normalizedComparison": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "3c83a00a3403aa8b20b47ecb9320b1006e0e823116e7947743c4adc6b3ec5803",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 49368,
+ "characters": 49358,
+ "sha256": "b89d8d78a06fb98b17022a1f36644c2b309fc8bbab9bf82ddc9a547d77cfa479",
+ "normalizedComparison": {
+ "utf8Bytes": 49200,
+ "characters": 49190,
+ "sha256": "721d0f637736336c3c8a470b6c80bf40208b09526076c565a98cab364324b63f"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "fd2c444ee5d225b4ec24fc46cb66b4c1e11e1f86745b50a297ce94da152b0be5",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd",
+ "normalizedComparison": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "3c83a00a3403aa8b20b47ecb9320b1006e0e823116e7947743c4adc6b3ec5803",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 49368,
+ "characters": 49358,
+ "sha256": "b89d8d78a06fb98b17022a1f36644c2b309fc8bbab9bf82ddc9a547d77cfa479",
+ "normalizedComparison": {
+ "utf8Bytes": 49200,
+ "characters": 49190,
+ "sha256": "721d0f637736336c3c8a470b6c80bf40208b09526076c565a98cab364324b63f"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "fd2c444ee5d225b4ec24fc46cb66b4c1e11e1f86745b50a297ce94da152b0be5",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd",
+ "normalizedComparison": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 47506,
+ "characters": 47496,
+ "sha256": "73d1774b566e6aaeca24a60a05410362609c7547c94413809bbb2cefe687477f",
+ "normalizedComparison": {
+ "utf8Bytes": 47422,
+ "characters": 47412,
+ "sha256": "bdb47770fd8f092e6f34ecb85768ed24f1a8613962ea3461252c60911dba5ed6"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "fd2c444ee5d225b4ec24fc46cb66b4c1e11e1f86745b50a297ce94da152b0be5",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd",
+ "normalizedComparison": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "3c83a00a3403aa8b20b47ecb9320b1006e0e823116e7947743c4adc6b3ec5803",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 49368,
+ "characters": 49358,
+ "sha256": "b89d8d78a06fb98b17022a1f36644c2b309fc8bbab9bf82ddc9a547d77cfa479",
+ "normalizedComparison": {
+ "utf8Bytes": 49200,
+ "characters": 49190,
+ "sha256": "721d0f637736336c3c8a470b6c80bf40208b09526076c565a98cab364324b63f"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "fd2c444ee5d225b4ec24fc46cb66b4c1e11e1f86745b50a297ce94da152b0be5",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd",
+ "normalizedComparison": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "3c83a00a3403aa8b20b47ecb9320b1006e0e823116e7947743c4adc6b3ec5803",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 49368,
+ "characters": 49358,
+ "sha256": "b89d8d78a06fb98b17022a1f36644c2b309fc8bbab9bf82ddc9a547d77cfa479",
+ "normalizedComparison": {
+ "utf8Bytes": 49200,
+ "characters": 49190,
+ "sha256": "721d0f637736336c3c8a470b6c80bf40208b09526076c565a98cab364324b63f"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1893,
+ "characters": 1893,
+ "sha256": "fd2c444ee5d225b4ec24fc46cb66b4c1e11e1f86745b50a297ce94da152b0be5",
+ "normalizedComparison": {
+ "utf8Bytes": 1809,
+ "characters": 1809,
+ "sha256": "d3618f4e545ed8279a6d71e0f0e214bb713786d91df9a57a2359c8ee076df80a"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd",
+ "normalizedComparison": {
+ "utf8Bytes": 45363,
+ "characters": 45353,
+ "sha256": "ab3c8469ca02e07bd99d0a475ac7c10d8bff5b12da3a788896f4f79c675248cd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 47506,
+ "characters": 47496,
+ "sha256": "73d1774b566e6aaeca24a60a05410362609c7547c94413809bbb2cefe687477f",
+ "normalizedComparison": {
+ "utf8Bytes": 47422,
+ "characters": 47412,
+ "sha256": "bdb47770fd8f092e6f34ecb85768ed24f1a8613962ea3461252c60911dba5ed6"
+ }
+ },
+ "deliveredToolCount": 39
+ }
+ ],
+ "mcpReceipt": {
+ "boundary": "authenticated loopback MCP tools/list; no OpenCode/provider process",
+ "serverAnnotationsForwarded": false,
+ "tools": {
+ "utf8Bytes": 44668,
+ "characters": 44658,
+ "sha256": "9c6e59816c0a49d675a4afd18f6d05a9d3315da5af803519373bf19fd81ea8dd",
+ "normalizedComparison": {
+ "utf8Bytes": 44668,
+ "characters": 44658,
+ "sha256": "9c6e59816c0a49d675a4afd18f6d05a9d3315da5af803519373bf19fd81ea8dd"
+ }
+ },
+ "count": 39
+ },
+ "originalReceiptSha256": "356693e0c75a86b7e53b397822399b0f4a09652b3d88be280b7a4569fd40efb6"
+ },
+ "integrated-candidate": {
+ "schema": "paperclip.native-procedure-measurement.v2",
+ "sourceSha": "ee096aa23fc88a001e7666215bcd338b5863f377",
+ "sourceDirty": true,
+ "measuredInputsDirty": false,
+ "sourceHashes": {
+ "server/src/onboarding-assets/default/AGENTS.md": "c6318bf7e425cc0dd7acd4ff2905dab5c46ffddedef979afdf06720c82f6e95a",
+ "packages/paperclip-runner/src/contracts/runtime-context.ts": "3d2ee39cf7cc2210104e155213f04cec82981f76cd7c38384cdc11fa3ce4b013",
+ "packages/paperclip-runner/src/protocol-actions/hire-agent.ts": "ed8d270e2f3a8357bde5f2b180616d09f45218cd90bad22609d2e2e3d02d0319",
+ "packages/paperclip-runner/src/protocol-actions/create-task.ts": "8557d4030c97aaf99e8ef45dc608e4e0117c764eb459b221ce6739499d79b8aa",
+ "packages/paperclip-runner/src/protocol-actions/set-dependencies.ts": "89819f6741dc14009f2daf54717f5e23d583c6f5685c30459fe8a0d672a2720b",
+ "packages/paperclip-runner/src/catalog/semantic-action-catalog.ts": "315674491b8e2656b5d9ad77ed41cafd9647f356ed4c46f0dc2de08eb82b646d",
+ "packages/paperclip-runner/generated/semantic-action-catalog.json": "7238896278a78e307b7eeae1b02d86d785694d10cfdf8dbb4402f1f756e9ebf5",
+ "packages/paperclip-runner/generated/capability/semantic-tool-contracts.json": "4a641cd79e9a75b8247f4e756b6ef0711a76348816b17eb267d284832ed59d37",
+ "packages/paperclip-runner/protocol/fixtures/evals/native-execution-seeded.json": "1ef1b62506d7c044d68dd9ed8033bd7901f8dba47aea70188c85878d448f6a0a",
+ "packages/paperclip-runner/protocol/manifest.json": "4c6e1bd289db4be0d669fe79439d7adf3c1a56fc1c762e663299bcd431557597",
+ "packages/paperclip-runner/src/backends/codex-native-backend.ts": "affecc515a623e0dfeb338f553ea53ebb7d18baa3d13e4395d17b21000dbee93",
+ "packages/paperclip-runner/src/drivers/opencode/mcp-bridge.ts": "ec1cd94c17be22d0556d4586fa6407b28e2309ed7c2437d95a32beeb0755cc4f",
+ "server/src/services/native-runtime/paperclip-runner-tool-authority.ts": "ae5cd9c6d076cf44471b42c583f69eea9776aaad41ccbc8319d416aa88f78b44",
+ "server/src/services/native-runtime/native-session-resume.ts": "d9d4d7fde805c150e8278fd26f36d5e27d77c49690a0371f20e83b542f9cb2db",
+ "server/src/__tests__/native-procedure-measurement.test.ts": "4e5725c0d86442c0214d96e6ab489547b919d45f8f237d9ec14d02437965268d"
+ },
+ "boundary": "scripted runnerd RPC with production standard-mode authority, API tools enabled, local workspace, no assigned external apps",
+ "byteAccounting": "utf8Bytes counts the unmodified JSON serialization of each extracted component/projection; normalizedComparison substitutes only the fixture workspace path. Neither is the entire transport request.",
+ "providerCalls": 0,
+ "tokenCount": null,
+ "upstreamLoadingOrTruncation": "unverified",
+ "vendorStockPrompt": "unavailable",
+ "receipts": [
+ {
+ "provider": "codex",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "32cebc711830c7db05593c29c6ff59b7e643a0bf0d9434ae51b779bdf3ee18ec",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd",
+ "normalizedComparison": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "20af9131c3b9db8aef690c86b254aab8595f0abac36bb4e2253dd3ab59a6cb25",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48908,
+ "characters": 48898,
+ "sha256": "5137d332b7cde806c4276c725dbdb3cb558061517f5fb38f9e9140427f3fe69a",
+ "normalizedComparison": {
+ "utf8Bytes": 48740,
+ "characters": 48730,
+ "sha256": "120a6211bc0b3a5e141e33e8ac21ee22948940f7698d75f60b6713829ebaac22"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "codex",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "32cebc711830c7db05593c29c6ff59b7e643a0bf0d9434ae51b779bdf3ee18ec",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd",
+ "normalizedComparison": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "20af9131c3b9db8aef690c86b254aab8595f0abac36bb4e2253dd3ab59a6cb25",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48908,
+ "characters": 48898,
+ "sha256": "5137d332b7cde806c4276c725dbdb3cb558061517f5fb38f9e9140427f3fe69a",
+ "normalizedComparison": {
+ "utf8Bytes": 48740,
+ "characters": 48730,
+ "sha256": "120a6211bc0b3a5e141e33e8ac21ee22948940f7698d75f60b6713829ebaac22"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "codex",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "32cebc711830c7db05593c29c6ff59b7e643a0bf0d9434ae51b779bdf3ee18ec",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd",
+ "normalizedComparison": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 47046,
+ "characters": 47036,
+ "sha256": "5defafb88865b1d19aa776323faab1081d84e92c9e832d6f4f5980e3c3d70a06",
+ "normalizedComparison": {
+ "utf8Bytes": 46962,
+ "characters": 46952,
+ "sha256": "5729e7faaff14fa6de4211022fb8f43fab471dfd2d9eec2c8c950ee56bd55976"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "32cebc711830c7db05593c29c6ff59b7e643a0bf0d9434ae51b779bdf3ee18ec",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd",
+ "normalizedComparison": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "20af9131c3b9db8aef690c86b254aab8595f0abac36bb4e2253dd3ab59a6cb25",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48908,
+ "characters": 48898,
+ "sha256": "5137d332b7cde806c4276c725dbdb3cb558061517f5fb38f9e9140427f3fe69a",
+ "normalizedComparison": {
+ "utf8Bytes": 48740,
+ "characters": 48730,
+ "sha256": "120a6211bc0b3a5e141e33e8ac21ee22948940f7698d75f60b6713829ebaac22"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "32cebc711830c7db05593c29c6ff59b7e643a0bf0d9434ae51b779bdf3ee18ec",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd",
+ "normalizedComparison": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "20af9131c3b9db8aef690c86b254aab8595f0abac36bb4e2253dd3ab59a6cb25",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48908,
+ "characters": 48898,
+ "sha256": "5137d332b7cde806c4276c725dbdb3cb558061517f5fb38f9e9140427f3fe69a",
+ "normalizedComparison": {
+ "utf8Bytes": 48740,
+ "characters": 48730,
+ "sha256": "120a6211bc0b3a5e141e33e8ac21ee22948940f7698d75f60b6713829ebaac22"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "acpx",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "32cebc711830c7db05593c29c6ff59b7e643a0bf0d9434ae51b779bdf3ee18ec",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd",
+ "normalizedComparison": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 47046,
+ "characters": 47036,
+ "sha256": "5defafb88865b1d19aa776323faab1081d84e92c9e832d6f4f5980e3c3d70a06",
+ "normalizedComparison": {
+ "utf8Bytes": 46962,
+ "characters": 46952,
+ "sha256": "5729e7faaff14fa6de4211022fb8f43fab471dfd2d9eec2c8c950ee56bd55976"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "start",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "32cebc711830c7db05593c29c6ff59b7e643a0bf0d9434ae51b779bdf3ee18ec",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd",
+ "normalizedComparison": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "20af9131c3b9db8aef690c86b254aab8595f0abac36bb4e2253dd3ab59a6cb25",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48908,
+ "characters": 48898,
+ "sha256": "5137d332b7cde806c4276c725dbdb3cb558061517f5fb38f9e9140427f3fe69a",
+ "normalizedComparison": {
+ "utf8Bytes": 48740,
+ "characters": 48730,
+ "sha256": "120a6211bc0b3a5e141e33e8ac21ee22948940f7698d75f60b6713829ebaac22"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "resume",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "32cebc711830c7db05593c29c6ff59b7e643a0bf0d9434ae51b779bdf3ee18ec",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd",
+ "normalizedComparison": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 2077,
+ "characters": 2077,
+ "sha256": "20af9131c3b9db8aef690c86b254aab8595f0abac36bb4e2253dd3ab59a6cb25",
+ "normalizedComparison": {
+ "utf8Bytes": 1993,
+ "characters": 1993,
+ "sha256": "f4a263fa69d0ca3a5ed13095b76da6b5d588540f8777708ee9e08104d066f2ff"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 48908,
+ "characters": 48898,
+ "sha256": "5137d332b7cde806c4276c725dbdb3cb558061517f5fb38f9e9140427f3fe69a",
+ "normalizedComparison": {
+ "utf8Bytes": 48740,
+ "characters": 48730,
+ "sha256": "120a6211bc0b3a5e141e33e8ac21ee22948940f7698d75f60b6713829ebaac22"
+ }
+ },
+ "deliveredToolCount": 39
+ },
+ {
+ "provider": "opencode",
+ "phase": "continuation",
+ "instructions": {
+ "utf8Bytes": 1340,
+ "characters": 1340,
+ "sha256": "32cebc711830c7db05593c29c6ff59b7e643a0bf0d9434ae51b779bdf3ee18ec",
+ "normalizedComparison": {
+ "utf8Bytes": 1256,
+ "characters": 1256,
+ "sha256": "1a623b330bb5ae167dacc32a5ea5d714c716ec1ef7f7e3be78a7bc8033fd42be"
+ }
+ },
+ "tools": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd",
+ "normalizedComparison": {
+ "utf8Bytes": 45456,
+ "characters": 45446,
+ "sha256": "8f93bd4543a64025b161fe52a98f32491e023379b3216be0ced70cd4a72be5fd"
+ }
+ },
+ "input": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0",
+ "normalizedComparison": {
+ "utf8Bytes": 215,
+ "characters": 215,
+ "sha256": "a85a9583b37a072e1707791482d5aa2a5e2cc1e4649b26e009a7abcc488643f0"
+ }
+ },
+ "fullProjection": {
+ "utf8Bytes": 47046,
+ "characters": 47036,
+ "sha256": "5defafb88865b1d19aa776323faab1081d84e92c9e832d6f4f5980e3c3d70a06",
+ "normalizedComparison": {
+ "utf8Bytes": 46962,
+ "characters": 46952,
+ "sha256": "5729e7faaff14fa6de4211022fb8f43fab471dfd2d9eec2c8c950ee56bd55976"
+ }
+ },
+ "deliveredToolCount": 39
+ }
+ ],
+ "mcpReceipt": {
+ "boundary": "authenticated loopback MCP tools/list; no OpenCode/provider process",
+ "serverAnnotationsForwarded": false,
+ "tools": {
+ "utf8Bytes": 44761,
+ "characters": 44751,
+ "sha256": "ddcc592d0acc330d6fe5783473b7e35a698ef6d4030b0311dee563b9d60aeda2",
+ "normalizedComparison": {
+ "utf8Bytes": 44761,
+ "characters": 44751,
+ "sha256": "ddcc592d0acc330d6fe5783473b7e35a698ef6d4030b0311dee563b9d60aeda2"
+ }
+ },
+ "count": 39
+ },
+ "originalReceiptSha256": "63348f5a79226c2b24991812f9331c671c3559812852ef69d7d1826ee309a8cb"
+ }
+ },
+ "integration": {
+ "integratedHead": "ee096aa23fc88a001e7666215bcd338b5863f377",
+ "paidCandidate": "ffe847fabaebbf24bc93924a4b6c8922d46a1fb6",
+ "master": "a65ca0950834a85bb93bcc4b4042ecacdebfef53",
+ "paidSourcesUnchanged": true,
+ "resolution": "Regenerated three conflicted contract files from combined source; retained master project discovery and finalization changes.",
+ "liveOnIntegratedHead": false,
+ "integratedBaseline": "ce31f5efd0d416205c3994c55dd02b645f8b8423",
+ "intendedSourceDeltaIdentical": true,
+ "commonFixtureFilesChecked": 256,
+ "sourceDelta": [
+ "packages/paperclip-runner/generated/capability/semantic-tool-contracts.json",
+ "packages/paperclip-runner/generated/semantic-action-catalog.json",
+ "packages/paperclip-runner/protocol/fixtures/evals/native-execution-seeded.json",
+ "packages/paperclip-runner/protocol/manifest.json",
+ "packages/paperclip-runner/src/catalog/semantic-action-catalog.ts",
+ "packages/paperclip-runner/src/contracts/runtime-context.ts",
+ "packages/paperclip-runner/src/protocol-actions/create-task.ts",
+ "packages/paperclip-runner/src/protocol-actions/hire-agent.ts",
+ "packages/paperclip-runner/src/protocol-actions/set-dependencies.ts",
+ "server/src/services/native-runtime/native-session-resume.ts",
+ "server/src/services/native-runtime/paperclip-runner-tool-authority.test.ts",
+ "server/src/services/native-runtime/paperclip-runner-tool-authority.ts"
+ ]
+ },
+ "limitations": [
+ "Single trials do not establish causation, general equivalence, coding quality, speed or cost trends.",
+ "All graded results retain their original measured sources. No paid result measured the integrated PR head.",
+ "Original setup used a company cap but left the lead budget at zero. Corrected setup applied both company and lead caps.",
+ "Unknown total activity and missing final result/ledger/cleanup for two interrupted jobs remain missing, not silently passed.",
+ "Configured model identity is not independent proof of provider-side execution identity.",
+ "ACPX provider-execution IDs are not proven mapped to host-call IDs. Never join by name, order or count.",
+ "Measurement is an extracted delivery projection; vendor private prompts, tokenization, loading and truncation remain unverified.",
+ "Numeric billing subtotals and raw sessions are excluded from this public summary; no complete billing or savings claim is made."
+ ]
+}
diff --git a/doc/plans/2026-10-05-native-procedure-guidance.md b/doc/plans/2026-10-05-native-procedure-guidance.md
new file mode 100644
index 00000000000..f531b238ce7
--- /dev/null
+++ b/doc/plans/2026-10-05-native-procedure-guidance.md
@@ -0,0 +1,382 @@
+# Native hiring and dependency guidance
+
+Status: **ship measurement and eval coverage only. Do not ship the procedure
+relocation or the unqualified runtime repairs.**
+
+The final PR keeps production agent behavior byte-identical to master
+`a65ca0950834a85bb93bcc4b4042ecacdebfef53`. Its changes are limited to the
+measurement test, explicit eval selection, correct hiring credential selection,
+company/lead budget stops, test-runner configuration, and retained reports.
+No production prompt, tool description, tool schema, session catalog, dependency
+mutation or status-transition code changes are included in the final diff.
+
+The experiment did not pass the no-regression gate. The first corrected
+comparison had baseline 5 PASS / 1 FAIL and candidate 3 PASS / 3 FAIL: two new
+failures, no new passes, three unchanged passes and one unchanged failure.
+The attempted repair also had two new failures among five comparable pairs.
+Moving text out of the fixed prompt did not justify shipping worse outcomes.
+Single trials do not establish that the changed instructions caused a failure.
+
+The original candidate reduced the complete standing projection by 460 bytes,
+about 0.9%. Restoring important instructions reduced the saving to 125 bytes,
+about 0.25%. A later, unqualified dependency guard made the projection 127 bytes
+larger than baseline. None of those changes is included in the final production
+tree. The final measurement records the unchanged full catalog. Bytes are not
+tokens, billing, or proof of upstream loading or truncation.
+
+The [original sanitized comparison](2026-10-05-native-procedure-comparison.json)
+and [readiness comparison v4](2026-10-05-native-procedure-readiness-v4.json)
+retain exact sources, original grades and evidence hashes. Their old source
+revisions remain historical experiments; they do not describe production changes
+in this measurement-only PR. No completed behavioral failure was rerolled to
+obtain a pass. Earlier infrastructure recovery and missing evidence remain
+explicit below. This follows the merged completion slice in #15151.
+
+## Final scope and verification
+
+The server measurement test instantiates the actual standard-mode tool authority
+with all advertised tools and input schemas. It captures scripted native start,
+resume and continuation payloads across Codex, ACPX Claude and OpenCode and the
+OpenCode MCP declaration list. These are provider-free measurements.
+
+The two original Everyday Workflows stories remain explicit-only and keep their
+independent artifact and ordering oracles. OpenCode is added only to the local
+hiring/reuse and delegation/feedback cells. These stories use one attempt per
+cell and actual company and lead-agent budget stops. Managed hiring selects
+the credential provider from the chosen profile, including OpenRouter. Existing
+Node test files run under Node's test runner instead of being misclassified as
+empty Vitest suites.
+
+The final production identity check compares `packages/` and production
+`server/` files against the fixed master context. A fresh CI and review must
+qualify the final tree. The full local database suite is unavailable while this
+host's PostgreSQL shared-memory slots are exhausted; hosted CI provides those
+database checks. No new paid campaign is needed to compare unchanged production
+bytes. This does not claim that the existing product is free of the failures
+observed in the retained trials.
+
+## Unqualified runtime repairs retained for follow-up
+
+The local branch `codex/native-procedure-controller-repairs-unqualified` at
+`7e270a3d3` preserves the attempted controller repairs. It is not part of this
+PR's final diff and has not passed live qualification. It scopes completion
+wakes to each committed transition and rejects silent removal of unfinished
+dependencies, with explicit handling for obsolete dependencies. Its regression
+tests still require database execution. Source typecheck, catalog generation,
+and the non-database measurement/session checks passed locally.
+
+The remaining issues need separate bounded investigation:
+
+- Reopened child completion can reuse a previously consumed parent wake key.
+- A parent can discard a still-running required dependency and finish early.
+- OpenCode's v4 hiring candidate failed the exact-credential persistence guard
+ in its local SQLite database. Cleanup removed that database. The credential
+ identity and exact persistence mechanism are not retained. No cause or fix
+ is claimed, and no credential check is weakened.
+
+## Readiness comparison v4 — historical failed experiment
+
+Candidate `aba7ec219b588de02cf323b4ebca559a105e6d01` and baseline
+`ce31f5efd0d416205c3994c55dd02b645f8b8423` use common master
+`a65ca0950834a85bb93bcc4b4042ecacdebfef53`. Candidate
+[campaign 37348723829](https://github.com/paperclipai/paperclip/actions/runs/37348723829)
+and baseline [campaign 37348764875](https://github.com/paperclipai/paperclip/actions/runs/37348764875)
+use trusted workflow `59015846ae02f935411afc620e0867ce812378fb`, distinct
+from both measured trees. Eleven result/API/ledger sets and 99 evidence hashes
+are retained. Their final ledgers contain 56 started runs, in addition to the
+earlier cohorts. All eleven cleanup results passed.
+
+Candidate: 3 PASS / 3 FAIL. Baseline: 3 PASS / 2 FAIL / 1 setup cell without a
+behavioral grade. Comparable pairs: two new failures, two new passes and one
+unchanged pass. The remaining Codex delegation pair is uncomparable because
+baseline Docker setup timed out before its paid step; no behavioral grade or
+final result artifact exists for that cell.
+
+| Story and harness | Baseline | Candidate | Observed missing behavior |
+|---|---|---|---|
+| Codex hiring/reuse | PASS | PASS | None observed by the original oracle |
+| Codex delegation/feedback | No behavioral grade | FAIL | Parent remains blocked after the revised child finishes |
+| Claude hiring/reuse | FAIL | PASS | Baseline did not deliver the revised ZIP |
+| Claude delegation/feedback | PASS | FAIL | Candidate finishes the parent before the child revision |
+| OpenCode hiring/reuse | PASS | FAIL | Candidate credential-persistence guard fails |
+| OpenCode delegation/feedback | FAIL | PASS | Baseline finishes the parent before the child revision |
+
+The two new passes do not offset the new failures. The `aba7ec2` CI passed on
+attempt 2 after five infrastructure-interrupted jobs were recovered and its
+fresh review was 5/5; source checks did not clear these behavioral failures.
+
+## Historical experiment scope
+
+The original paid comparison used master
+`a386a599983519eb1d399f8b770bfccdb2a74762` as common context. It moved
+hiring/reuse and assigned-worker guidance to `hire_agent` and `create_task`,
+kept dependency discovery in the fixed prompt, and returned waiting instructions
+from `set_dependencies`. It advanced prompt and session-catalog revisions.
+Those production changes have been removed from the final PR. Connection
+procedures and legacy skill/API instructions remain unchanged.
+
+## Measurement boundary
+
+Capture the actual standard-mode server tool authority with API tools enabled,
+a local workspace, and no assigned external apps. Measure fixed instructions,
+all advertised tool descriptions and input schemas, and the serialized task
+input together. Scripted native start/resume/continuation checks cover Codex,
+ACPX Claude and OpenCode; authenticated MCP tools/list checks the OpenCode
+bridge separately. Export source identity, file hashes, bytes and tool counts.
+
+These receipts have zero provider calls. Bytes are not model tokens or invoice
+costs. This boundary cannot establish the upstream SDK's private instructions,
+lazy loading, truncation or cognitive use of returned guidance. The previous
+completion-only capture selected a partial catalog and is not a full-tool
+baseline. Preserve its historical evidence unchanged.
+
+## Historical matched live comparison plan
+
+Use the existing explicit-only `everyday-workflows` suite with original
+`hire-reuse` and `delegate-feedback` requests and independent artifact oracles.
+Select only native Codex `gpt-5.6-sol`, ACPX Claude `claude-sonnet-5`, and OpenCode
+`openrouter/deepseek/deepseek-v4-flash-0731`, in local environments.
+
+Freeze common measurement, harness and test-runner repairs in both branches
+before the candidate production changes. The historical branch keeps the
+current production prompt and tool contracts. Record exact measured source
+SHAs separately from the trusted master workflow definition and selected
+runtime/artifact hashes. Never label a later source revision as the measured
+revision without showing its delta.
+
+The plan has six cells per variant, one attempt per cell, a 12-minute cell
+deadline, at most 12 story run records per cell, and a 1,000-cent company and
+lead-agent hard stop per cell. The original campaign applied the company cap
+but mistakenly left the lead budget at 0; the corrected common setup verifies
+both actual API payloads. All worker runs count toward the company budget;
+individual worker caps are not asserted.
+Count every actual run, including notifications and failed attempts. No broad
+matrix, automatic retries or baseline rerolls are part of this comparison.
+
+Inspect original grades and retained content for persistent teammate identity,
+reuse on revision, worker ownership, independently tested delivered artifacts,
+parent review, dependency release, and final ordering. Check per-pair changes;
+equal totals are insufficient. Preserve every original failure and missing
+evidence. Model-authored tests cannot replace the existing independent oracle.
+
+These two stories do not qualify arbitrary live resume, every existing-blocker
+combination, general coding quality, or cost/speed trends. Explicitly report
+missing evidence. Do not loosen the original oracle to create a pass.
+
+## Historical complete-catalog measurement
+
+The corrected source `ffe847fabaebbf24bc93924a4b6c8922d46a1fb6` is compared with
+baseline `aecfa3b6a5cab110a9b926e93705311bbcf4db47`. Both include the same
+measurement fixture and common eval repairs. Exactly 12 source/generated/unit
+paths differ; 256 common fixture files have identical bytes.
+
+| Normalized extracted component | Baseline bytes | Corrected candidate bytes | Change |
+|---|---:|---:|---:|
+| Fixed instructions, start/resume | 1,809 | 1,256 | −553 |
+| All 39 tool declarations including schemas | 44,944 | 45,037 | +93 |
+| Task input, start/resume | 1,993 | 1,993 | 0 |
+| Combined standing projection, start/resume | 48,781 | 48,321 | −460 |
+| OpenCode MCP tools/list declarations | 44,249 | 44,342 | +93 |
+
+Scripted Codex, ACPX Claude and OpenCode deliveries give the same comparative
+change. The serialization of the extracted components is measured separately
+from its path-normalized comparison. The fixture's real temporary paths add
+168 bytes to the combined start/resume projection in each variant. Neither
+projection is the entire transport request. Returned dependency guidance adds
+input when used, so this is not an overall token, latency or cost saving claim.
+The measurement produces zero provider calls and does not prove upstream
+loading or truncation behavior.
+
+## Original comparison — failures retained
+
+Original sources were candidate `eb01d073c35134bf0d373947b55a79f9e443f8ee` and
+baseline `64cd2194a1d058356679b653c181f16404aefc80`, using trusted master workflow
+`a386a599983519eb1d399f8b770bfccdb2a74762`. Source identity remains distinct from
+workflow identity and the later measurement-only correction.
+
+- [Original candidate campaign](https://github.com/paperclipai/paperclip/actions/runs/37325777217)
+- [Original baseline campaign](https://github.com/paperclipai/paperclip/actions/runs/37325870695)
+
+| Profile | Hire/reuse baseline → candidate | Delegate/feedback baseline → candidate |
+|---|---|---|
+| Codex | PASS → PASS | PASS → FAIL |
+| ACPX Claude | PASS → FAIL | PASS → FAIL |
+| OpenCode | FAIL → FAIL | FAIL → PASS |
+
+There are three new overall failures, one new pass, one unchanged pass and one
+unchanged failure. The candidate did not qualify. Final ledgers match the
+result run-ID sets: 25 started baseline runs and 15 candidate runs, zero retry
+links. All twelve cell cleanup receipts passed. Missing/zero billing amounts
+and unmetered host runtime prevent any claim about actual cost savings.
+
+The candidate Claude hire created Morgan and a child task, then ended with a
+waiting message without recording dependencies or using a terminal tool. The
+lead failed with `native_finalization_missing`. The corrected v7 prompt keeps
+explicit `set_dependencies` and `paperclip_block` discovery. This is a concrete
+missing behavior; a single trial does not establish causation.
+
+The candidate Codex delegate failed in Riley's worker turn with the provider
+error `Selected model is at capacity` / `serverOverloaded`. Its parent had
+received the dependency guidance. Candidate Claude delegation failed opening
+an ACPX session (`session_ensure_failed`); its underlying cause is unknown.
+Both original grades and classifiers remain unchanged.
+
+Both OpenCode hire cells failed common setup requesting an OpenAI credential
+although OpenRouter was selected, before any agent run. Shared setup now uses
+the profile's actual credential. A separate nonce/cell-ID bug left original
+lead budgets at 0; six nonce-based setup tests now verify company and lead caps
+using only the selected provider credential. These common control changes are
+why the corrected campaign uses a newly matched baseline.
+
+The baseline OpenCode delegation delivered an artifact passing the independent
+oracle but completed the parent before the child's final revision. Candidate
+passed both the artifact and ordering checks. Correct output alone did not
+qualify that baseline outcome.
+
+## Corrected comparison
+
+- [Candidate ffe847f](https://github.com/paperclipai/paperclip/actions/runs/37331580879)
+- [Baseline aecfa3b](https://github.com/paperclipai/paperclip/actions/runs/37331642168)
+- [Candidate recovery for two interrupted cells, same ffe847f source](https://github.com/paperclipai/paperclip/actions/runs/37334061104)
+
+These use the same corrected fixtures, original requests and artifact graders,
+with one attempt per campaign cell. The original campaign is preserved and is
+not relabeled as this revision. The common suite hash is
+`acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334`.
+
+| Profile | Hire/reuse baseline → candidate | Delegate/feedback baseline → candidate |
+|---|---|---|
+| Codex | PASS → PASS | PASS → FAIL (recovery) |
+| ACPX Claude | PASS → PASS | PASS → PASS (recovery) |
+| OpenCode | PASS → FAIL | FAIL → FAIL |
+
+There are **two new failures, zero new passes, three unchanged passes, one
+unchanged failure and zero pending pairs**. Workflow completion is not the
+behavioral grade. These are the original result grades; no regrading was done.
+
+### Missing and recovered behavior
+
+**Codex delegation regressed in the observed pair.** The first parent turn
+recorded its dependency and blocked correctly. After feedback, the parent
+reviewed a stale ZIP and requested a replacement. An API comment operation was
+rejected with `API comments cannot change runner execution state`. The child
+finished the replacement at 15:45:48.284 UTC. The parent then recorded the
+dependency at 15:45:51.801–15:45:59.295 UTC; its receipt scheduled no wake. The
+parent blocked and finalized at 15:46:19.909 UTC. The child was Done, but the
+parent remained Blocked with no active continuation. All four native runs had
+successful run status; that does not make the task outcome successful. This
+sequence does not by itself establish a prompt, race or platform root cause.
+
+**OpenCode hiring regressed in the observed pair.** It hired the expected
+teammate and produced an initial artifact that passed the independent checks.
+It reused the same teammate for the separator revision, then requested further
+CLI argument-handling changes. After nine started runs, the story reached the
+12-minute deadline with parent and revision work still in progress. Cleanup
+cancelled the remaining work. The final revised-ZIP and settled-outcome checks
+were not completed; they are not assumed to pass. The baseline passed after
+four runs. This single trial does not establish a speed or cost trend.
+
+**OpenCode delegation failed in both variants.** The artifacts passed the
+independent output checks, but the parents finished before the final child
+revision. Candidate parent/child completion times were 15:33:43.628 /
+15:35:03.222 UTC; baseline times were 15:35:21.429 / 15:36:03.043 UTC. Both
+parents lacked review of that final revision. Equal FAIL totals conceal neither
+this missing behavior nor the passing artifact checks.
+
+**Claude hiring now passes all 45 original checks.** Retained semantic receipts
+show dependency recording, returned guidance and an accepted current-track
+block with the child agent as owner. The parent later resumed and finished.
+This repairs the original missing dependency/finalization observation in this
+trial. It does not prove cognitive use of the guidance or every hiring tool
+path; API hiring remained available.
+
+### Interruptions and accounting
+
+Candidate Codex and Claude delegation jobs received runner shutdown signals at
+15:27:38 UTC and were cancelled at 15:27:50 UTC. Jobs `111838521694` and
+`111838521502` retained no result, final ledger or cleanup receipt. Their
+behavioral grades and total actual runs/charges are unknown. Eight distinct
+run-record IDs were visible in partial logs; this is not a complete started-run
+ledger. Preserve the workflow failures and missing evidence.
+
+Only those two missing candidate cells received one bounded recovery each, on
+the identical measured source. No completed baseline or other candidate cell
+was repeated. The original workflow revision was `a386a599`; recovery used
+`a65ca0950834a85bb93bcc4b4042ecacdebfef53` after master advanced. Workflow file
+bytes were identical, SHA-256
+`eb570267e66043c1196338bb386b07ab8e8e8306ba04b6223f13b73b04fdc8f4`.
+The measured source stayed `ffe847f`, distinct from both workflow revisions.
+
+All twelve completed/recovered cells have matching result/final-ledger run
+sets and passing cleanup receipts. They contain 27 baseline and 33 candidate
+started runs. The original campaign contains 40 more: **100 retained started
+runs, plus incompletely known activity from the two interrupted jobs**. Zero
+retry links within the completed ledgers do not erase the two infrastructure
+recoveries. The audits retain 100 original and 108 corrected JSON evidence
+hashes. Actual charges remain unknown because usage and interruption records
+are incomplete and host runtime is unmetered. No free-call or savings claim is
+made.
+
+ACPX provider execution IDs are not proven mapped to host call IDs. No strict
+no-extra-work claim or feedback-consumption inference is made from matching
+names, ordering or counts. These evidence limits remain even for a passing
+original story grade.
+
+## Historical integration and repository checks
+
+After the paid sources were frozen, the PR merged master
+`a65ca0950834a85bb93bcc4b4042ecacdebfef53` as
+`ee096aa23fc88a001e7666215bcd338b5863f377`. Three generated contract conflicts
+were resolved by normal generation from the combined sources. The paired
+provider-free baseline is `ce31f5efd0d416205c3994c55dd02b645f8b8423`.
+Their twelve intended differing paths are identical to the paid source delta;
+all 256 common fixture files remain byte-identical. **No live campaign measured
+the integrated head.** Later documentation-only commits do not change that.
+
+The integrated full-catalog projection is 49,200 → 48,740 normalized bytes at
+start/resume and 47,422 → 46,962 during continuation. The 460-byte reduction is
+unchanged. Master's project-discovery schema adds 419 bytes to both tool sets.
+The actual extracted start/resume projection is 49,368 → 48,908 bytes. All 39
+declarations remain present; this still does not measure private vendor prompts,
+model tokens, lazy loading or upstream truncation limits.
+
+Before integration, 74 focused tool/session/measurement checks, 1,252 eval-support
+Vitest checks, 128 Node checks and the eval TypeScript check passed. Repository
+typecheck and build passed before the prompt-only v7 correction. The corrected
+source CI then passed typecheck, build, tests and all eight browser shards. An
+interrupted canary job was retried once; that is separate from paid eval recovery.
+
+At integrated `ee096aa23`, local measurement/session checks passed 48 tests;
+23 authority tests could not start because PostgreSQL initialization failed,
+and 21 project-tool tests were skipped by the unsupported database helper.
+The integrated baseline passed six measurement tests. The older full local
+suite was stopped after source revisions changed during its run. Its failures
+remain retained; it is not reported as green.
+
+[Integrated CI server shard 5](https://github.com/paperclipai/paperclip/actions/runs/37335450901/job/111849219339)
+failed `workspace-git-snapshot-streaming.test.ts`: the four Git filename lanes
+over 32 MiB exceeded the 180-second timeout (707 tests passed, two skipped,
+one failed in that shard). The aggregate verify job therefore failed. The cause
+has not been established; this is not reclassified as an infrastructure pass.
+The [review summary](https://github.com/paperclipai/paperclip/pull/15218#issuecomment-5996723170)
+gave integrated `ee096aa23` 5/5 but noted project-discovery authorization work
+for actors with sparse visibility. Both inline measurement findings are
+resolved; the summary's separate concern is not erased by that count.
+
+At this historical checkpoint the failed behavior comparison required keeping
+the candidate draft. The final scope separates measurement from the rejected
+reduction. Future behavior changes need their own diagnosis and qualification;
+completed paid failures must not be rerolled simply to obtain passing grades.
+
+## Historical behavior-change gates (not met; change removed)
+
+- [x] Freeze common fixtures and both source revisions.
+- [x] Export comparable full-catalog delivery projections.
+- [x] Pass 74 focused checks, 1,252 eval-support Vitest checks and 128 Node checks.
+- [ ] Complete repository typecheck, tests and build.
+- [x] Run and inspect the bounded matched campaign, including original failures.
+- [ ] Meet the no-regression gate: **failed, two newly failing corrected pairs**.
+- [ ] Verify current-head CI, review and conflicts before readiness.
+- [x] Preserve original and corrected grades, hashes and incomplete accounting.
+
+No merge is authorized.
diff --git a/doc/plans/2026-10-05-native-procedure-readiness-v4.json b/doc/plans/2026-10-05-native-procedure-readiness-v4.json
new file mode 100644
index 00000000000..ec15020f87e
--- /dev/null
+++ b/doc/plans/2026-10-05-native-procedure-readiness-v4.json
@@ -0,0 +1,2019 @@
+{
+ "schema": "paperclip.native-procedure-readiness-public.v1",
+ "state": "no_regression_gate_failed_one_setup_cell_uncomparable",
+ "sources": {
+ "candidate": "aba7ec219b588de02cf323b4ebca559a105e6d01",
+ "baseline": "ce31f5efd0d416205c3994c55dd02b645f8b8423",
+ "candidateBranch": "codex/native-procedure-candidate-v4",
+ "baselineBranch": "codex/native-procedure-baseline-v3"
+ },
+ "campaigns": {
+ "candidate": 37348723829,
+ "baseline": 37348764875
+ },
+ "workflowSha": "59015846ae02f935411afc620e0867ce812378fb",
+ "originalGradesPreserved": true,
+ "pairCounts": {
+ "newFailures": 2,
+ "newPasses": 2,
+ "unchangedPasses": 1,
+ "unchangedFailures": 0,
+ "pending": 1
+ },
+ "pairs": [
+ {
+ "executionId": "everyday-workflows.runner-codex.local.hire-reuse",
+ "baseline": "passed",
+ "candidate": "passed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-codex.local.delegate-feedback",
+ "baseline": null,
+ "candidate": "failed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-acpx-claude.local.hire-reuse",
+ "baseline": "failed",
+ "candidate": "passed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-acpx-claude.local.delegate-feedback",
+ "baseline": "passed",
+ "candidate": "failed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-opencode.local.hire-reuse",
+ "baseline": "passed",
+ "candidate": "failed"
+ },
+ {
+ "executionId": "everyday-workflows.runner-opencode.local.delegate-feedback",
+ "baseline": "failed",
+ "candidate": "passed"
+ }
+ ],
+ "cells": [
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.delegate-feedback",
+ "source": {
+ "sha": "aba7ec219b588de02cf323b4ebca559a105e6d01",
+ "ref": "refs/heads/codex/native-procedure-candidate-v4",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37348723829"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "harnessDigest": "7fc184b06de3af473980ef1a0ad7124342cfd8d36ca721fe452298e775154cf5",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "candidate_failure",
+ "model": "claude-sonnet-5",
+ "cleanup": "passed",
+ "resultLedgerRunSetEqual": true,
+ "apiRunSetEqual": true,
+ "ledgerCount": 4,
+ "startedRunCount": 4,
+ "runStatuses": {
+ "succeeded": 4
+ },
+ "resultSha256": "2052ff9fd63a10bba7940034fe7c1362b7d9e3bfa00cbae490371226e3769789",
+ "evidenceHashes": {
+ "evidence-manifest.json": "e10659910f5060bcf07bf22ac92d776f39d8dd97ff0caba3e5029db6c27f3160",
+ "html-report/data/5c30415881df8ec08d97ca7a6bede282562ed011.json": "2052ff9fd63a10bba7940034fe7c1362b7d9e3bfa00cbae490371226e3769789",
+ "playwright-output/runner-everyday-workflows--fdae5-the-browser-and-public-APIs/attachments/runner-e2e-result-86dec9e27afb28b2e2187e13cb5c2f9fc0e27da7.json": "2052ff9fd63a10bba7940034fe7c1362b7d9e3bfa00cbae490371226e3769789",
+ "result.json": "2052ff9fd63a10bba7940034fe7c1362b7d9e3bfa00cbae490371226e3769789",
+ "snapshots/api-state.json": "79629476404aacd118880ca3fac7807e36384714a1d0665f39a912e6a5ba4596",
+ "snapshots/browser-diagnostics.json": "09425086c198b70cb77ab0445b05ef49dfc07d448e89504a35e073a8d1fe9b5e",
+ "snapshots/chat-final-run-ledger.json": "1c71ffedd9a955323eee0094120248e9bcc288f62936b903b5ed39086a5f867c",
+ "snapshots/everyday-workflow.json": "08614a740e941a2b6898490d09e16034c0c2a35093a6281c0d085fa9a0b3de96",
+ "snapshots/fixtures.json": "49ea2e205256f8c6ffda07c568ab82f4588e9e6f98d831ba0b2a224d621d5299"
+ },
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": false
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ },
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ]
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.hire-reuse",
+ "source": {
+ "sha": "aba7ec219b588de02cf323b4ebca559a105e6d01",
+ "ref": "refs/heads/codex/native-procedure-candidate-v4",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37348723829"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "harnessDigest": "7fc184b06de3af473980ef1a0ad7124342cfd8d36ca721fe452298e775154cf5",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "model": "claude-sonnet-5",
+ "cleanup": "passed",
+ "resultLedgerRunSetEqual": true,
+ "apiRunSetEqual": true,
+ "ledgerCount": 6,
+ "startedRunCount": 6,
+ "runStatuses": {
+ "succeeded": 6
+ },
+ "resultSha256": "89cf913d14d8539ac5b57e9f4e25de320a747c88afefa0eada25e06e3b12623f",
+ "evidenceHashes": {
+ "evidence-manifest.json": "105c12346c49a688db40e18e02d6efc50d14c84910916e553cc5d0a8b346afff",
+ "html-report/data/cb46b8428a23af11c95ce3d137f6335b810bd844.json": "89cf913d14d8539ac5b57e9f4e25de320a747c88afefa0eada25e06e3b12623f",
+ "playwright-output/runner-everyday-workflows--9a7d2-the-browser-and-public-APIs/attachments/runner-e2e-result-8789ecd32f82f4b761fb24a7725ca7ec6cb73ac0.json": "89cf913d14d8539ac5b57e9f4e25de320a747c88afefa0eada25e06e3b12623f",
+ "result.json": "89cf913d14d8539ac5b57e9f4e25de320a747c88afefa0eada25e06e3b12623f",
+ "snapshots/api-state.json": "29e710b168e8af6ccc61834c26651d2000b04460d01bd66a70288d22b33f56eb",
+ "snapshots/browser-diagnostics.json": "526698e7c5252f6a3977fbc39f9378100ec085828ef0496393555770a1d6a013",
+ "snapshots/chat-final-run-ledger.json": "765feb06ac615078708fb8ac606d1a1ab97906fe9a13a7e879c257062321a90a",
+ "snapshots/everyday-workflow.json": "d611e433959e70022e99e4dd52df71203c74e3a82dd901c4f0d1f72fc5fb5739",
+ "snapshots/fixtures.json": "a10c0fcdbf6f630c57ee74e882ddac14b842ecdf74bdcd358ca4d29ae3370897"
+ },
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ]
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-codex.local.delegate-feedback",
+ "source": {
+ "sha": "aba7ec219b588de02cf323b4ebca559a105e6d01",
+ "ref": "refs/heads/codex/native-procedure-candidate-v4",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37348723829"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "harnessDigest": "7fc184b06de3af473980ef1a0ad7124342cfd8d36ca721fe452298e775154cf5",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "candidate_failure",
+ "model": "gpt-5.6-sol",
+ "cleanup": "passed",
+ "resultLedgerRunSetEqual": true,
+ "apiRunSetEqual": true,
+ "ledgerCount": 4,
+ "startedRunCount": 4,
+ "runStatuses": {
+ "succeeded": 4
+ },
+ "resultSha256": "7bc74633dc89cea37a3da9808649a9a0e8594ced95e43a01df1d0db55e3443aa",
+ "evidenceHashes": {
+ "evidence-manifest.json": "7cebcff0de1037aeffbcf2e23d2bdf5a21a362210c553ec3fc3b0afb9f3b7ddc",
+ "html-report/data/9cf046f592d24ccff4f9df9a989cbeb14d66185e.json": "7bc74633dc89cea37a3da9808649a9a0e8594ced95e43a01df1d0db55e3443aa",
+ "playwright-output/runner-everyday-workflows--a6fcb-the-browser-and-public-APIs/attachments/runner-e2e-result-f13a90c839b7c34d9d295c72bec11dc94b31ff3d.json": "7bc74633dc89cea37a3da9808649a9a0e8594ced95e43a01df1d0db55e3443aa",
+ "result.json": "7bc74633dc89cea37a3da9808649a9a0e8594ced95e43a01df1d0db55e3443aa",
+ "snapshots/api-state.json": "7c68b1ae4cfb624f59d975a6ebb645ee648270805235a4e3603504b7d09977a5",
+ "snapshots/browser-diagnostics.json": "dec21a43696a72270af7bc10ab45e1d635d231f10e7ae4cd1a31e4476123bc7f",
+ "snapshots/chat-final-run-ledger.json": "2ac35bc9eb6c6f3d29452f287745d1fbb9a49b9e8e72bd241da519455ef86d64",
+ "snapshots/everyday-workflow.json": "d16fcfc9a2b0ce8bcedf8b2c6d0fecbe55813400dae7e407a166fdbb3b6f4960",
+ "snapshots/fixtures.json": "5094477bb71791879b257bb6f341e5f7804b7bf13304f62d4cb65554d6ba7e79"
+ },
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ]
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-codex.local.hire-reuse",
+ "source": {
+ "sha": "aba7ec219b588de02cf323b4ebca559a105e6d01",
+ "ref": "refs/heads/codex/native-procedure-candidate-v4",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37348723829"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "harnessDigest": "7fc184b06de3af473980ef1a0ad7124342cfd8d36ca721fe452298e775154cf5",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "model": "gpt-5.6-sol",
+ "cleanup": "passed",
+ "resultLedgerRunSetEqual": true,
+ "apiRunSetEqual": true,
+ "ledgerCount": 6,
+ "startedRunCount": 6,
+ "runStatuses": {
+ "succeeded": 6
+ },
+ "resultSha256": "f4e0c4dcb62b9d1ce7a63aa5c9f94123f201b9534f90d924fd1a51828ac705cb",
+ "evidenceHashes": {
+ "evidence-manifest.json": "3e4e2408709036e1f79c70d50edb91230a905706fc204e963a0ee1e2f38887e7",
+ "html-report/data/e07424ec1b7a5523ba0b6982a1886f1bff8f008e.json": "f4e0c4dcb62b9d1ce7a63aa5c9f94123f201b9534f90d924fd1a51828ac705cb",
+ "playwright-output/runner-everyday-workflows--d934c-the-browser-and-public-APIs/attachments/runner-e2e-result-2af08a5b86fffd7530895a7502aaf2acbb80f798.json": "f4e0c4dcb62b9d1ce7a63aa5c9f94123f201b9534f90d924fd1a51828ac705cb",
+ "result.json": "f4e0c4dcb62b9d1ce7a63aa5c9f94123f201b9534f90d924fd1a51828ac705cb",
+ "snapshots/api-state.json": "0626b20467a3e403cb1e43372e96fc704807a8742396c4847c29440a4e68df3d",
+ "snapshots/browser-diagnostics.json": "bf94315df08454b2c1361c5553f46eb82af593db78d125e9e6c195cc13dc125c",
+ "snapshots/chat-final-run-ledger.json": "349026e3638cb2d2b16279b7b98ee45fedb85e070fb780c44392c01e6bc56740",
+ "snapshots/everyday-workflow.json": "abbbfabaff06ad00f6ce6c8f0a1fd43e40398b800c76bf479365c1cbd45f3a2b",
+ "snapshots/fixtures.json": "1195bf03b48915c8d0f55157bad3d0b33e1b3a888dc5868c33aec2874af599d9"
+ },
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ]
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-opencode.local.delegate-feedback",
+ "source": {
+ "sha": "aba7ec219b588de02cf323b4ebca559a105e6d01",
+ "ref": "refs/heads/codex/native-procedure-candidate-v4",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37348723829"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "harnessDigest": "7fc184b06de3af473980ef1a0ad7124342cfd8d36ca721fe452298e775154cf5",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "resultLedgerRunSetEqual": true,
+ "apiRunSetEqual": true,
+ "ledgerCount": 4,
+ "startedRunCount": 4,
+ "runStatuses": {
+ "succeeded": 4
+ },
+ "resultSha256": "b08a55f91bbdce0cf0558a78f25fd6d5de4459a1c96d5f0559dbb13834b5b738",
+ "evidenceHashes": {
+ "evidence-manifest.json": "db3dd6cdbf826a9bae0d8ed97ebe4edc51f8c0f71022d7addc1718a3066ed2d2",
+ "html-report/data/c1b9063fd22a68f64bf4d6e5d4c3426ef6cac4dd.json": "b08a55f91bbdce0cf0558a78f25fd6d5de4459a1c96d5f0559dbb13834b5b738",
+ "playwright-output/runner-everyday-workflows--616ad-the-browser-and-public-APIs/attachments/runner-e2e-result-de3bc5087d02916426e722e1a0fbd2c23d867550.json": "b08a55f91bbdce0cf0558a78f25fd6d5de4459a1c96d5f0559dbb13834b5b738",
+ "result.json": "b08a55f91bbdce0cf0558a78f25fd6d5de4459a1c96d5f0559dbb13834b5b738",
+ "snapshots/api-state.json": "57257f9b63b63b34d049b3755f4428eeee1b71656e0797399174b503925be7cb",
+ "snapshots/browser-diagnostics.json": "ec80144d5efb3c0fcd5d8de6d847559b47f1c982ce89a4b2b6be7e4ff2745c56",
+ "snapshots/chat-final-run-ledger.json": "05648c596135076994e3e729927ed1ef75ba1caa7b063e26db175536c1f15f27",
+ "snapshots/everyday-workflow.json": "5029b09ed242ca9526f217d61031b264bb21980a0872ba914a6c077f45ea5307",
+ "snapshots/fixtures.json": "d359e7e9fab7f6d7479962dcd54ec82a7015ea7f0a2af75d1267716a2227227e"
+ },
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ]
+ },
+ {
+ "variant": "candidate",
+ "executionId": "everyday-workflows.runner-opencode.local.hire-reuse",
+ "source": {
+ "sha": "aba7ec219b588de02cf323b4ebca559a105e6d01",
+ "ref": "refs/heads/codex/native-procedure-candidate-v4",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37348723829"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "harnessDigest": "7fc184b06de3af473980ef1a0ad7124342cfd8d36ca721fe452298e775154cf5",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "secret_leak",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "resultLedgerRunSetEqual": true,
+ "apiRunSetEqual": true,
+ "ledgerCount": 6,
+ "startedRunCount": 6,
+ "runStatuses": {
+ "succeeded": 6
+ },
+ "resultSha256": "c3e7b3ccfcd8d40e8212d7cc48bc0e12aaf8340ec3e6e76ee0f93cf3502dc8b7",
+ "evidenceHashes": {
+ "evidence-manifest.json": "fb6d9c63a3dabfc2f9a4fc882fc8ab0eb4c3f185d9c01a86e735fb5c04430aaa",
+ "html-report/data/e2a9234f30c494f82aac6de3a85691ca9e0002db.json": "98cfdcc136287d080efeb8e0b2ce6ab8c91169a99a3da627e38591cfe9187588",
+ "playwright-output/runner-everyday-workflows--90607-the-browser-and-public-APIs/attachments/runner-e2e-result-5b5c108dfa523e2f2e72dd426cbcce5fa8a4f16f.json": "98cfdcc136287d080efeb8e0b2ce6ab8c91169a99a3da627e38591cfe9187588",
+ "result.json": "c3e7b3ccfcd8d40e8212d7cc48bc0e12aaf8340ec3e6e76ee0f93cf3502dc8b7",
+ "snapshots/api-state.json": "b2ca1ef09614cb4cf2dffdd5aa2fb5bd574eff3c316a689f4dd242427428b5c4",
+ "snapshots/browser-diagnostics.json": "8744b2d708c86d0c3b3595d910b6d831444fc2e217b09aa90c618dddf7326933",
+ "snapshots/chat-final-run-ledger.json": "6ee7305e3dff3192e613c6c38701b8c4b63f79aecfc7d25e40ecc5c14122cf0d",
+ "snapshots/everyday-workflow.json": "8e82f0643eda9224c7ae6c5cc941f09d1fefe6da0ea8df31b65ce1fa1bfdba16",
+ "snapshots/fixtures.json": "3800139b64c63a0cdf6109ad45f738b8cc52a36c33b085b32acc1cc78f583a37"
+ },
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ]
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.delegate-feedback",
+ "source": {
+ "sha": "ce31f5efd0d416205c3994c55dd02b645f8b8423",
+ "ref": "refs/heads/codex/native-procedure-baseline-v3",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37348764875"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "harnessDigest": "7fc184b06de3af473980ef1a0ad7124342cfd8d36ca721fe452298e775154cf5",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "model": "claude-sonnet-5",
+ "cleanup": "passed",
+ "resultLedgerRunSetEqual": true,
+ "apiRunSetEqual": true,
+ "ledgerCount": 4,
+ "startedRunCount": 4,
+ "runStatuses": {
+ "succeeded": 4
+ },
+ "resultSha256": "0c241c2bf4aa78b2e53c9a81965f2af5cd0a65914e02a9f33d7f9905446a6aa7",
+ "evidenceHashes": {
+ "evidence-manifest.json": "dce0a724dbeefc0578d07a5e4955a8ddfe9e5dd78a3e72472f48d2022864a29f",
+ "html-report/data/e247a98e2ef3ab1585b500ddeb1083f5c62eebd2.json": "0c241c2bf4aa78b2e53c9a81965f2af5cd0a65914e02a9f33d7f9905446a6aa7",
+ "playwright-output/runner-everyday-workflows--fdae5-the-browser-and-public-APIs/attachments/runner-e2e-result-b7cfd2b7fd8d7cbe59d1960795561610ea681b41.json": "0c241c2bf4aa78b2e53c9a81965f2af5cd0a65914e02a9f33d7f9905446a6aa7",
+ "result.json": "0c241c2bf4aa78b2e53c9a81965f2af5cd0a65914e02a9f33d7f9905446a6aa7",
+ "snapshots/api-state.json": "a2684af703be5f88a2c7e87632dc5db8c835586930b210c6514d6e3e979ded8c",
+ "snapshots/browser-diagnostics.json": "9fdc8a931f20fcc121b9aef71a34753bc762caa20fea0b6754b1de20fe9be298",
+ "snapshots/chat-final-run-ledger.json": "747524776dfbd2c11582bba85552d5599b00ff31ae86350ea1f570772215be7e",
+ "snapshots/everyday-workflow.json": "20cdb9a0d00ed734fdcdb750f8e3490146b75ba481563729df3afeb7dd7e6b49",
+ "snapshots/fixtures.json": "beaa1bb97dd431fbcf35989d3ec464312dffe206f961e39ada5abb042dd4dd0d"
+ },
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ]
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-acpx-claude.local.hire-reuse",
+ "source": {
+ "sha": "ce31f5efd0d416205c3994c55dd02b645f8b8423",
+ "ref": "refs/heads/codex/native-procedure-baseline-v3",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37348764875"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "harnessDigest": "7fc184b06de3af473980ef1a0ad7124342cfd8d36ca721fe452298e775154cf5",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "candidate_failure",
+ "model": "claude-sonnet-5",
+ "cleanup": "passed",
+ "resultLedgerRunSetEqual": true,
+ "apiRunSetEqual": true,
+ "ledgerCount": 6,
+ "startedRunCount": 6,
+ "runStatuses": {
+ "succeeded": 6
+ },
+ "resultSha256": "cd6a2a4dfadf970ed0bc8067bbd4352fe512b290e97dbb0234e804a980c44013",
+ "evidenceHashes": {
+ "evidence-manifest.json": "0f42e325c18e5ab1caffed574ef8c7ff064238b590376624023cbfb1c0444c69",
+ "html-report/data/25e2cab109cbcb2f719700b2acf37c71a11af214.json": "cd6a2a4dfadf970ed0bc8067bbd4352fe512b290e97dbb0234e804a980c44013",
+ "playwright-output/runner-everyday-workflows--9a7d2-the-browser-and-public-APIs/attachments/runner-e2e-result-e98664c4029e78829752908076817b85e6db5d67.json": "cd6a2a4dfadf970ed0bc8067bbd4352fe512b290e97dbb0234e804a980c44013",
+ "result.json": "cd6a2a4dfadf970ed0bc8067bbd4352fe512b290e97dbb0234e804a980c44013",
+ "snapshots/api-state.json": "daa7f727dc624e21f5f7168617271a71364f7f0f039da8e0a607d420f329d67b",
+ "snapshots/browser-diagnostics.json": "effa05d63cbf9b8a92d4df8308a8e555cd630847ad58c71406a55ece0d16d08d",
+ "snapshots/chat-final-run-ledger.json": "cf892a73243bd2da5276f87c8d5a8ab6b42dceae76145c91e759f21073f12b44",
+ "snapshots/everyday-workflow.json": "a54d3acefb569e385ae1c656a4d1a0ea142479efef35b5b83c4d9139b2f94181",
+ "snapshots/fixtures.json": "68f592252222a8a70d3253103840ad6a282f3c68a26f5cf6360a9f03bb8c20b6"
+ },
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.zip-delivered",
+ "passed": false
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ },
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ]
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-codex.local.hire-reuse",
+ "source": {
+ "sha": "ce31f5efd0d416205c3994c55dd02b645f8b8423",
+ "ref": "refs/heads/codex/native-procedure-baseline-v3",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37348764875"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "harnessDigest": "7fc184b06de3af473980ef1a0ad7124342cfd8d36ca721fe452298e775154cf5",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "model": "gpt-5.6-sol",
+ "cleanup": "passed",
+ "resultLedgerRunSetEqual": true,
+ "apiRunSetEqual": true,
+ "ledgerCount": 6,
+ "startedRunCount": 6,
+ "runStatuses": {
+ "succeeded": 6
+ },
+ "resultSha256": "553c84d9cac87670d5ccac940733f9480791955f4e257f82467bd2295802e8d8",
+ "evidenceHashes": {
+ "evidence-manifest.json": "2064b2faa0a710fcffdde7eef98231698bcac82f3b07cc829688c976abd588b7",
+ "html-report/data/b0521708080dfd9e14c867175d841965fce30834.json": "553c84d9cac87670d5ccac940733f9480791955f4e257f82467bd2295802e8d8",
+ "playwright-output/runner-everyday-workflows--d934c-the-browser-and-public-APIs/attachments/runner-e2e-result-175a197d38cae1451e9c0d0edc257c25f52b813a.json": "553c84d9cac87670d5ccac940733f9480791955f4e257f82467bd2295802e8d8",
+ "result.json": "553c84d9cac87670d5ccac940733f9480791955f4e257f82467bd2295802e8d8",
+ "snapshots/api-state.json": "de1d7d8ebbfb7087c6d74ed0256db7ad7c4a59e64431fd7e53bb097c61dd647e",
+ "snapshots/browser-diagnostics.json": "a1e96e38e345962123df2513785399aa9675a585717d716be574e2221dbcdcea",
+ "snapshots/chat-final-run-ledger.json": "d96faa781e4131a912333486d66527d9dc0acd3b959260aadde20c1a7d55535e",
+ "snapshots/everyday-workflow.json": "f0800a8e169f6b6f4af6e214cea0010d326b6053954125753467a4b70fbd4b61",
+ "snapshots/fixtures.json": "7e0d747ae4117918ab879363f592ce940773f2aa612f4dcd7b4421395ad6d18e"
+ },
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ]
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-opencode.local.delegate-feedback",
+ "source": {
+ "sha": "ce31f5efd0d416205c3994c55dd02b645f8b8423",
+ "ref": "refs/heads/codex/native-procedure-baseline-v3",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37348764875"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "harnessDigest": "7fc184b06de3af473980ef1a0ad7124342cfd8d36ca721fe452298e775154cf5",
+ "attempt": 1,
+ "originalStatus": "failed",
+ "originalFailureClass": "candidate_failure",
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "resultLedgerRunSetEqual": true,
+ "apiRunSetEqual": true,
+ "ledgerCount": 4,
+ "startedRunCount": 4,
+ "runStatuses": {
+ "succeeded": 4
+ },
+ "resultSha256": "622c78df06de7c9c17e5d875d6a7ce5eab07d24691fa8cc07e5e998202bcc410",
+ "evidenceHashes": {
+ "evidence-manifest.json": "ef77cb6f49ced2b1192156b098bf4c90c90b4ad008b059bb5c333d01321d9b22",
+ "html-report/data/921db0ab223237bb50570635a7a6652b5424ff63.json": "622c78df06de7c9c17e5d875d6a7ce5eab07d24691fa8cc07e5e998202bcc410",
+ "playwright-output/runner-everyday-workflows--616ad-the-browser-and-public-APIs/attachments/runner-e2e-result-5df85a6ef79eb3010b42b9aa7bdd5d68e2d5ae69.json": "622c78df06de7c9c17e5d875d6a7ce5eab07d24691fa8cc07e5e998202bcc410",
+ "result.json": "622c78df06de7c9c17e5d875d6a7ce5eab07d24691fa8cc07e5e998202bcc410",
+ "snapshots/api-state.json": "89f5399ae3d320c23ae7aa08650dbe596524ea2de9e98ff18f92ee6d0802d7d4",
+ "snapshots/browser-diagnostics.json": "bf82e258e3391b191b500cd10105b1f5b7a7895959c5d848e69a24b4f2e3b04f",
+ "snapshots/chat-final-run-ledger.json": "853e65b05cf46057363b99a7da7fdfa49eb51c30831a51647728f7e14244e7da",
+ "snapshots/everyday-workflow.json": "ab5ae69afa478a2ae622387acea63bc2f8a1740de89c03f5a91494ef280fa88c",
+ "snapshots/fixtures.json": "c6f60fd9fcb2fedce2be5f50b6429db062956d352267209ff128dc4aee76d9fd"
+ },
+ "originalChecks": [
+ {
+ "id": "reply-3-stored-once",
+ "passed": true
+ },
+ {
+ "id": "one-child",
+ "passed": true
+ },
+ {
+ "id": "child-consumed-feedback",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-7",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-6",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.length-1",
+ "passed": true
+ },
+ {
+ "id": "delegated-delivery.reject-zero-length",
+ "passed": true
+ },
+ {
+ "id": "feedback-delivered-to-child",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": false
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ },
+ {
+ "id": "workflow-completed",
+ "passed": false
+ }
+ ]
+ },
+ {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-opencode.local.hire-reuse",
+ "source": {
+ "sha": "ce31f5efd0d416205c3994c55dd02b645f8b8423",
+ "ref": "refs/heads/codex/native-procedure-baseline-v3",
+ "workflowRunUrl": "https://github.com/paperclipai/paperclip/actions/runs/37348764875"
+ },
+ "suiteDefinitionHash": "acd17b4acbd7051070531f7d7587131139900f54245b992eb7a62faacda8e334",
+ "harnessDigest": "7fc184b06de3af473980ef1a0ad7124342cfd8d36ca721fe452298e775154cf5",
+ "attempt": 1,
+ "originalStatus": "passed",
+ "originalFailureClass": null,
+ "model": "openrouter/deepseek/deepseek-v4-flash-0731",
+ "cleanup": "passed",
+ "resultLedgerRunSetEqual": true,
+ "apiRunSetEqual": true,
+ "ledgerCount": 6,
+ "startedRunCount": 6,
+ "runStatuses": {
+ "succeeded": 6
+ },
+ "resultSha256": "2e2f3d418169af50464e4963b0d8b24b536da50b5fb74196a5ed404799a2a482",
+ "evidenceHashes": {
+ "evidence-manifest.json": "1f1c22b1fd6ec09bf20a7a4b02e9dcb80bffff35374b8b7f252caf2d80245713",
+ "html-report/data/76284c18712671e245f76266f0a2275337bf287b.json": "2e2f3d418169af50464e4963b0d8b24b536da50b5fb74196a5ed404799a2a482",
+ "playwright-output/runner-everyday-workflows--90607-the-browser-and-public-APIs/attachments/runner-e2e-result-c90198d41e9925e738230e788c65a93ed8d33a09.json": "2e2f3d418169af50464e4963b0d8b24b536da50b5fb74196a5ed404799a2a482",
+ "result.json": "2e2f3d418169af50464e4963b0d8b24b536da50b5fb74196a5ed404799a2a482",
+ "snapshots/api-state.json": "310afec9ef9767b36d3968cbf013e75c3a892a0169226e6fc243c2552337da95",
+ "snapshots/browser-diagnostics.json": "b08a66f0f71cf2fc46c79b2b0ff182d9bb36831daffffef587039ce8418de392",
+ "snapshots/chat-final-run-ledger.json": "4d2b9a76c2c44b2251dfde036a6107bc95f607d95b534b77b562f696b47cafe2",
+ "snapshots/everyday-workflow.json": "551c6a37b971e6bd56930aa4d226edf7e4a985d33b1213fd5b914019d5e0409e",
+ "snapshots/fixtures.json": "207a9015bb726a98e4bca348e7e3048e2c94e2fed69ae6694a6d63977e318d23"
+ },
+ "originalChecks": [
+ {
+ "id": "exactly-one-hire",
+ "passed": true
+ },
+ {
+ "id": "manager-correct",
+ "passed": true
+ },
+ {
+ "id": "hire-native-connection",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "hired-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reply-5-stored-once",
+ "passed": true
+ },
+ {
+ "id": "hire-reused",
+ "passed": true
+ },
+ {
+ "id": "hired-agent-executed-revision",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.one-slugify-source",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.readme-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.project-tests-present",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-0",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-1",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-2",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-3",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-4",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-5",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-6",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.base-7",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.importable-function",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator-_",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.separator--",
+ "passed": true
+ },
+ {
+ "id": "reused-delivery.reject-invalid-separator",
+ "passed": true
+ },
+ {
+ "id": "submitted-replies-consumed",
+ "passed": true
+ },
+ {
+ "id": "parent-finishes-after-child",
+ "passed": true
+ },
+ {
+ "id": "native-model-config",
+ "passed": true
+ },
+ {
+ "id": "native-terminal-contract",
+ "passed": true
+ },
+ {
+ "id": "tasks-done",
+ "passed": true
+ },
+ {
+ "id": "settled",
+ "passed": true
+ },
+ {
+ "id": "native-runtime",
+ "passed": true
+ },
+ {
+ "id": "successful-runs",
+ "passed": true
+ },
+ {
+ "id": "bounded-work",
+ "passed": true
+ },
+ {
+ "id": "parent-owned-by-lead",
+ "passed": true
+ },
+ {
+ "id": "no-pending-bookkeeping",
+ "passed": true
+ }
+ ]
+ }
+ ],
+ "retainedStartedRuns": 56,
+ "missingCell": {
+ "variant": "baseline",
+ "executionId": "everyday-workflows.runner-codex.local.delegate-feedback",
+ "jobId": 111896338920,
+ "observedFailure": "Pinned Python oracle preparation: docker version timed out after 30 seconds (exit 124); Run paid cell was skipped; no result artifact was produced.",
+ "behavioralGrade": null,
+ "setupLogSha256": "b2c2502f9aff687facdff805834ffd1d6ad5fb0e1b9840749891dbab1583553b"
+ },
+ "limits": [
+ "Single trials do not establish causation, equivalence, speed or cost trends.",
+ "The OpenCode candidate hiring credential-persistence guard failed. Its original provider database was removed by cleanup; the credential type and exact persistence cause are not retained.",
+ "Only eleven final result/API/ledger sets are available. The missing setup cell is not passed or behaviorally failed.",
+ "Raw sessions, reasoning, run identifiers, and numeric billing subtotals are excluded. Actual charges remain unknown."
+ ]
+}
diff --git a/doc/plans/2026-10-05-plan-task-guidance.md b/doc/plans/2026-10-05-plan-task-guidance.md
new file mode 100644
index 00000000000..a0aee0b486a
--- /dev/null
+++ b/doc/plans/2026-10-05-plan-task-guidance.md
@@ -0,0 +1,98 @@
+# Planning guidance reduction — 5 October 2026
+
+Status: implementation and eval preparation; no live result yet.
+
+## Decision and scope
+
+Shorten the runtime plan-to-tasks skill and the bundled task-planning skill together.
+Preserve skill identities, installed-version behavior, automatic accepted-plan
+selection, authorization, and native/legacy mechanics. Remove the duplicated
+operational-skill pointer. Do not merge without the human's authorization.
+
+Base: `72ff3a9f27e581a27acb49771e8658bbb0bbaa47`. Prior work on PR #15218 and
+its separate checklist remains untouched.
+
+## Bounded comparison
+
+Four ordinary execution scenarios: cohesive work; independent specialist outputs;
+a real prerequisite between specialists; an independent adverse review.
+Compare current, short, and disabled planning skills using public company-copy creation
+and selection APIs in isolated companies. Archived current skill bytes come from
+the base above. The disabled variant is an unassigned-selection ablation (the library remains discoverable), not a production
+removal or an accepted-plan continuation test. Other instructions, tools, models,
+permissions, fixtures, graders, budgets, and deadlines stay matched.
+
+Initial scope: native Codex default profile, local, 12 cells, one attempt each,
+500-cent company and per-agent hard stops, at most eight total run records per
+cell, including coordination wakes. One exact pilot cell precedes the remaining
+selection. No automatic retries or outcome rerolls. User authorization for paid
+runs persists. Extra profiles/repetitions are not part of this initial comparison.
+
+Judge independently saved results, authorship, child boundaries, dependency order,
+review delivery, and parent completion. Retain all run records, failures, missing
+evidence, source/fixture hashes, skill selections and served bytes, screenshots,
+usage and billing coverage. Byte/word reductions are not token or cost savings.
+Skill availability is not proof that a model read or cognitively used a skill.
+
+Run credential-free source, catalog, type and grader calibration checks before
+providers. Preserve positive, plausible wrong, and missing-evidence calibration.
+Report exact scenario pairs rather than equal aggregate totals. Short guidance is
+eligible only if the retained comparison supports it; inconclusive evidence stays
+explicit. Automatic removal and existing installed copies need separate migration
+and continuation qualification before a deletion recommendation can be shipped.
+
+## Credential-free admission
+
+- Product E2E TypeScript compilation: pass.
+- Product E2E support: 1,286 Vitest tests and 128 Node checks pass.
+- Catalog discovery: twelve explicit local Codex cells; excluded from `--all`.
+- Archived source hashes: conversion `08cb036df0e05b1d704dc0cd547c4e37b73078597c072a85ff982a2bb9b3a370`; planning `9c52a44a30ec8d306119da51bf298e9e3e6c382a9a9559ffd3054bf5e0c75f36`. Both match the named base Git blobs exactly.
+- Generated capability inventory and catalog are synchronized.
+- No provider call has started. Live outcomes remain unqualified.
+
+Source review found two fixture defects before provider execution: bundled and
+catalog skills cannot be edited, and deleted core skills are automatically
+restored. Campaign `37399550253` at `843238f43cb266f6ca0bc9d255881558ffd2eb71`
+was cancelled; its paid-cell step was skipped, with zero provider runs and no
+behavioral grade. Corrected setup creates editable, byte-identical company copies
+and varies their explicit selection. No bundled deletion or in-place edit occurs.
+
+Corrected fixture admission: all three current/short/unassigned variants pass real
+company-skill creation, content readback and native-agent selection APIs against
+a disposable PostgreSQL database. No heartbeat run rows were created. The
+evaluator's 35 positive/wrong/missing-evidence checks pass, including rejection
+of a bare issue-ID URL without the issues route. Product E2E typecheck passes.
+Initial local DB checks were skipped until the dependency's missing library
+symlinks were restored with its supplied postinstall script; skipped checks were
+not counted as passes.
+
+The next setup campaign, [37401094799](https://github.com/paperclipai/paperclip/actions/runs/37401094799),
+measured source `370e51d110836b942e5f90567d2bbe260bcc0f3a` using trusted workflow
+revision `0e0b63e5a551388ac4601ed982b3e8f1c772f123` (workflow blob
+`0600886144d3e22ea2e4a38329a79177882f3948`). It remains an original FAIL,
+classified by the harness as `candidate_failure`. Inspection shows a browser
+fixture error before task creation: the shared helper waited for the old Task
+title field. `runIds`, the company run ledger, and planning observation are all
+empty; no model executed. Cleanup passed. The billing summary's runCount=1 is
+its minimum-one placeholder (`billing.ts`), not evidence of a provider run;
+runtime/actual charges remain unmetered. No original result is regraded.
+
+The corrected planning-only browser helper uses the current description composer,
+explicitly selects the owner, and captures the public task-create response ID. A
+real browser/server/database calibration creates the exact prompt/assignment with
+paused non-provider agents, confirms zero run rows, and deletes its company. It
+passes. Before any model execution, prompts also explicitly name the already
+required result document key and exact JSON fields, avoiding an unstated oracle
+format assumption. The legacy helper and production UI remain unchanged.
+
+Repository checks at the previous source: full typecheck and build pass. Local
+full tests: 9,591 pass, 5,796 skip and one unchanged macOS real-Git streaming test
+hits its five-minute deadline; an isolated check also fails. Preserve this
+limitation. Normal CI found a different, exact cause: truncated random fixture
+company prefixes collided in chat integration setup. An initial per-suite counter fixed within-run collisions but review found that
+its values repeat against an external database on subsequent runs. The corrected
+prefix contains the complete company UUID, with no truncation; distinct company
+IDs therefore produce distinct prefixes within and across runs. All five affected
+native-modal variants pass locally (1,058 unrelated cases filtered). This is a
+test-only repair; the measured planning fixture and production guidance remain
+frozen at `8538cfce4c2defdedc2efba7519bcfce880c4e00`.
diff --git a/doc/plans/2026-10-06-native-delegation-handoff.md b/doc/plans/2026-10-06-native-delegation-handoff.md
new file mode 100644
index 00000000000..9388b8a66c8
--- /dev/null
+++ b/doc/plans/2026-10-06-native-delegation-handoff.md
@@ -0,0 +1,124 @@
+# Native delegation handoff repair
+
+Date: 2026-10-06. Owner: this Codex task. Branch: `codex/delegation-handoff`.
+Starting master: `0fe47882cfcb12082035113c59ca96091c46ebfc`.
+
+## Finish line
+
+A reopened ordinary native child can complete again and deliver one fresh completion
+notification to its parent. Replaying the same committed completion remains
+idempotent. Prepare a reviewed, verified PR; merging is a separate human action.
+
+## Scope
+
+The native status committer currently deduplicates parent notifications by the
+parent/child pair. A consumed notification can therefore suppress a later
+completion of the same child. Scope the key to the durable completion decision
+in both parent-notification branches, including a child that is also a blocker.
+Keep existing readiness, company, ownership, workspace finalization and governance
+gates. Do not change model prompts, tools, dependency replacement semantics or
+the outcome oracle. General dependency-only wake reconciliation is separate. Exact `task_watchdog`
+children keep their existing stable wake key to avoid repeated watchdog loops;
+near-match origin names remain ordinary children. Related open #10559 and
+#4507 concern legacy wake deduplication; #11179 concerns delivery during an
+active parent run; #13044 separately proposes suppressing watchdog signals.
+The initial slice changed only the native committed-decision wake key. The
+failed live trial below requires the bounded native delivery extension described here.
+
+Prior procedure experiments in #15218 exposed stalled and premature parent
+outcomes but do not alone prove this mechanism caused every failure. The
+production relocation and earlier controller repairs were not shipped. #15296
+shipped the smaller planning skills; its report publication is separate.
+
+## Verification contract
+
+1. Reproduce the consumed-wake collision against unchanged master production
+ with the real database/control-plane conformance test. Cover parents with
+ and without an explicit dependency edge, the latest child summary, and
+ duplicate finalization.
+2. Run relevant conformance checks, repository typecheck, tests and build.
+ Preserve failures and distinguish environment limitations.
+3. Freeze candidate and baseline branches on this master with identical
+ Product E2E fixtures, graders, provider profiles and budgets. Run only
+ `everyday-workflows.runner-codex.local.delegate-feedback` and
+ `everyday-workflows.runner-acpx-claude.local.delegate-feedback` in each
+ variant: one attempt each, 12-minute per-cell deadline, at most 12 story
+ run records, 1,000-cent company and lead-agent hard stops, concurrency 2.
+ No reroll of a completed behavior failure. All provider continuations and
+ automatic recovery count in the actual run inventory.
+4. Inspect original grades and retained chronology, including revised child
+ delivery, worker ownership, parent review and parent completion ordering.
+ A green workflow is not itself a behavioral pass. A single pair does not
+ establish general equivalence, causation or cost/speed trends.
+5. Retain dated measurement/results in the private `paperclip-evals` archive
+ and existing campaign artifact storage. Keep a compact index here. Verify
+ current-head CI and review before a readiness claim.
+
+## Current state
+
+- [x] Record merged #15218 and #15296 in the working checklist.
+- [x] Reproduce both relationship cases: second completion leaves only the
+ original wake against unchanged production.
+- [x] Verify the scoped correction and replay behavior: all 20 database-backed
+ control-plane conformance tests pass, including exact watchdog and near-match
+ origin controls. Repository checks are still running.
+- [ ] Complete frozen live comparison and retain original evidence.
+- [ ] Complete PR review and CI.
+
+
+## Active-parent failure and bounded correction
+
+The original four live cells are complete: Codex PASS → FAIL and Claude FAIL →
+PASS, 17 actual runs with no retries. Original grades remain unchanged. The
+Codex candidate receives the revised child completion while its parent is active;
+the parent later blocks using an outdated child-running view, with no retained
+continuation. Both Claude parent finals reference an earlier artifact, so their
+original grades do not prove delivery/review of the latest child artifact.
+
+The human authorized publishing this summary and fixing the failures. The PR body
+now retains the original results and limits. The next source revision:
+
+- Carries ordinary child completion decision identity through the durable wake.
+- Defers that wake behind an active parent instead of treating updated run context
+ as proof the provider received it. Exact watchdog and legacy behavior stay as before.
+- Preserves a queued/deferred child result across a parent Done claim. Completion
+ authority leaves the task in progress and uses the existing continuation; it
+ rechecks under the parent status lock. Consumed and current-run wakes do not
+ block completion. Cancellation and governance are not bypassed.
+
+67 focused scheduler, native conformance and authority tests pass, along with
+repository typecheck. The controlled scheduler test proves one sequential parent
+continuation carrying the revised summary, including dispatcher replay. Native
+coverage distinguishes queued, claimed, deferred, consumed, and current-run wakes.
+
+The original baseline remains frozen. Measure only the corrected candidate in
+the same two cases, one attempt each, under the existing bounds and oracle. Keep
+all previous runs and inspect final artifact delivery separately from machine
+pass totals. Live qualification and fresh CI/review remain pending; keep draft.
+
+
+### Concurrency review and cancelled intermediate campaign
+
+Fresh review of `3c1cf6830ce9db4123b834ffb99c594c383a8986` raised an
+outbox-insertion versus parent-completion race. A controlled PostgreSQL barrier
+uses distinct parent and child agents and pauses the real child transaction at
+wake insertion. The parent must wait, then preserve the pending result. The
+previous source also passes that ordering because child writes acquire an
+implicit parent foreign-key lock. This is not a reproduced additional failure.
+The correction makes parent serialization explicit before child writes, avoiding
+shared-lock upgrades between siblings. The original four failing regressions
+remain the before/after evidence for the active-parent fix.
+
+Intermediate campaign `37518652522` was cancelled once that review required
+source changes. Both paid-cell steps started and both tasks were created before
+cancellation completed. Each retained artifact contains only its invocation
+policy. No original grade, API run inventory, final ledger or cleanup receipt
+survived. Provider-run count and charges are unknown; record two incomplete
+attempts, not passes or zero-provider setup failures. Preserve these separately
+from the original 17 actual runs. The next candidate must pass fresh review
+before its bounded live attempts. Original baseline, prompts and oracle stay
+frozen.
+
+The final lock revision passes all 68 focused scheduler, conformance and arbiter
+tests plus repository typecheck. Build, fresh CI/review and live qualification
+remain pending.
diff --git a/doc/plugins/PLUGIN_AUTHORING_GUIDE.md b/doc/plugins/PLUGIN_AUTHORING_GUIDE.md
index 2d18119ea60..a3728720e1c 100644
--- a/doc/plugins/PLUGIN_AUTHORING_GUIDE.md
+++ b/doc/plugins/PLUGIN_AUTHORING_GUIDE.md
@@ -25,6 +25,49 @@ It is intentionally narrower than [PLUGIN_SPEC.md](./PLUGIN_SPEC.md). The spec i
building custom versions.
- `ctx.assets` is not supported in the current runtime.
+## Durable resource lifecycle inbox
+
+Plugins with `events.subscribe` can read durable, company-scoped resource hooks
+through `ctx.events.listLifecycle(companyId, limit?, afterId?)` and acknowledge successful
+work with `ctx.events.acknowledgeLifecycle(companyId, eventId)`. Use an existing
+plugin job to poll each configured company; the host checks invocation scope and whether
+the plugin is ready and enabled for that company. These methods are separate
+from the fire-and-forget `ctx.events.on()` bus.
+Proactive jobs and timers may read only companies authorized by the plugin's
+company configuration. Calls inside a host-issued invocation must match its company.
+
+An event has `id`, `companyId`, `resourceType`, `resourceId`, `action`, and
+`createdAt`. Agent actions are `create`, `pause`, `resume`, and `terminate`;
+project actions are `create`, `update`, and `archive`. Pending hires produce creation
+after approval. Project updates include repository/workspace mutations and restoring
+an archived project. Provider cleanup and retention policy belong to the plugin.
+
+Reads return at most one pending event per resource (default 50, maximum 100).
+Creation is delivered before other events for that resource, even when its
+backfilled ID is newer. Remaining events follow ID order. After acknowledging
+an event, a later read exposes its successor. A failed
+resource remains pending without blocking other resources; process the rest of
+the batch independently. Progress is stored per plugin, survives worker restarts,
+and is not a global sequence cursor. The delivery migration seeds existing hired
+agents and all projects once, including archived projects. Pending hires require
+approval; paused and terminated agents retain their current status intents.
+This baseline represents current desired state, not reconstructed history.
+The baseline includes archive for existing archived projects and update for restored projects whose
+journal still ends at archive. Archiving does not authorize provider cleanup.
+After that migration, capture stays forward-only; no later journal backfill runs.
+
+Delivery is at least once: concurrent reads or a crash after a provider operation
+can repeat an event. Serialize polling and use stable company/event idempotency
+keys, then acknowledge only after successful completion. Load current authorized
+agent/project/workspace data before acting; the journal contains no configuration
+snapshots, repository credentials, or deletion authority. For offline plugin tests,
+seed `lifecycleEvents` with `createTestHarness().seed()`.
+
+Lifecycle polls can page past failed resources using the last returned event id as
+`afterId`. Reset `afterId` at the start of every polling sweep: it is a page
+cursor, never a persisted high-water mark. This retries failures and includes
+transactions that commit later with lower ids.
+
## External object reference providers
Plugins can contribute provider-neutral object reference detection and status
diff --git a/doc/public-mcp.md b/doc/public-mcp.md
index 668d57daa55..ab1433e77d6 100644
--- a/doc/public-mcp.md
+++ b/doc/public-mcp.md
@@ -38,6 +38,65 @@ token again; normal API endpoints do not accept these OAuth tokens. Public
installation requires a reachable HTTPS deployment. Private self-hosted
instances require a directly reachable endpoint; no managed relay is included.
+Unclaimed Cloud warm-standby instances return `503 workspace_unclaimed` for MCP
+setup, discovery and protocol requests without reading the database. The event
+poller also stays idle until the instance is claimed. After claim, both resume
+without a restart and remain subject to the experimental setting and normal
+authorization.
+
+## Start from Connections
+
+Inside your organization, open **Connectors → Assistant Connection (MCP) → Set up**.
+This connects an outside assistant to Paperclip using your human account; no agent
+is selected or impersonated. The entry is discoverable while disabled, but its
+setup instructions require the experimental setting. Follow **Open Experimental
+settings**, enable **Assistant connections (MCP)**, then return to setup.
+
+Click **Copy invitation** to copy the message and preview it in the shared animated
+setup prompt, then paste it into your assistant. Client-specific instructions are
+under **Set up manually**, in the icon-labeled tab bar. The invitation’s public
+setup link contains an optional organization ID,
+never a credential. It does not reveal the organization before sign-in or grant
+access. Approval happens when the assistant starts its connection. The setup page
+is server-rendered at `/mcp/setup`; `/mcp/setup.md` and `Accept: text/markdown`
+provide the same version-aware instructions for assistants without browser access.
+
+**Set up manually** contains commands for Codex, Claude Code, OpenCode, browser
+connectors and headless clients. Browser clients may require adding a connector
+in their settings; reading an invitation cannot install one. A running client may
+need a restart or a fresh conversation to load its tools. Verify the organization
+with `paperclip_connection` before doing work. Keep existing client configuration,
+and use a distinct server name when another Paperclip instance is already present.
+
+For OpenCode, merge the displayed `mcp.paperclip` entry into your project’s
+`opencode.json`, run `opencode mcp auth paperclip` there, approve the organization,
+then start `opencode web`. Restart an already-running OpenCode after authentication.
+An assistant invoking authorization through a shell tool must keep the command
+alive in a persistent terminal or background process and share its approval URL
+immediately. OpenCode's callback deadline still applies: a URL from a timed-out
+command cannot complete sign-in. Start a fresh request, or have the user run the
+command in their own terminal if the host cannot preserve it across turns.
+
+Never add upstream model keys to the MCP URL or config; the assistant’s model
+connection is configured separately.
+
+Consent names the client when available and shows its identifying URL with a site
+icon. The first available organization is selected initially; requested write
+access starts checked when the selected role permits it. Changing organization
+or refetching does not undo a write-access opt-out. Nothing is authorized until
+**Connect organization** is clicked. Organization creation stays outside consent.
+
+Return to the same Connections entry to see your connected assistants, their
+read/write access, and revoke access. The list refreshes after consent and only
+shows your grants for the selected organization. The legacy
+`/assistant-connections` URL remains available for account-wide management.
+
+`GET /api/mcp/setup` returns the live experimental gate, canonical endpoint,
+invitation URL and copyable invitation to
+authenticated browser/Cloud users, including while disabled. It cannot grant
+access, accepts no destination URL, never reflects forwarded hosts, and is not
+available to agent keys, MCP bearer tokens, or implicit local authority.
+
## Connect an assistant directly
After the instance is enabled and reachable, an existing team member can connect
@@ -55,10 +114,10 @@ claude mcp add --transport http paperclip https://YOUR-PAPERCLIP-HOST/mcp/paperc
```
Open Claude Code's `/mcp` menu and authenticate the Paperclip server. Both flows
-open browser sign-in and consent: select a team and explicitly enable task and
-comment writes when wanted. Read-only consent cannot delegate work.
+open browser sign-in and consent: review the selected organization (or choose one for a direct instance connection) and review the write-access checkbox. It starts checked when the assistant requests
+writes and your organization role allows them; uncheck it for read-only access. Read-only consent cannot delegate work.
-Ask the assistant to identify the connected team and list its agents, then ask
+Ask the assistant to identify the connected organization and list its agents, then ask
it to delegate a small task to an available agent. The returned task link is the
durable reference. In a later conversation, ask for that task's progress and
report. Configure the agent's provider credentials, execution environment and
@@ -70,6 +129,39 @@ teach team review, delegation and result retrieval. Build them for the same
endpoint before installing locally. Public ChatGPT/Codex and Claude directory
installation requires the separate deployment and submission work below.
+## Headless device login and stdio bridge
+
+With a CLI build that includes this feature:
+
+```sh
+paperclipai mcp login --device --url https://YOUR-PAPERCLIP-HOST/mcp/paperclip
+paperclipai mcp proxy --url https://YOUR-PAPERCLIP-HOST/mcp/paperclip
+```
+
+Add `--company ` to login to restrict the consent choice.
+Login prints a human verification URL and code. Open that URL, sign in, compare
+the code, and approve or decline. The private device code and issued tokens stay
+inside the CLI. Configure the second command as a local stdio MCP server in a host
+without native device support. Do not copy tokens into chat or MCP configuration.
+
+The CLI stores credentials separately under `$PAPERCLIP_HOME/mcp` (default
+`~/.paperclip/mcp`), with a private directory and files, atomic replacement and a
+cross-process refresh mutex. It forwards only to the exact bound resource and
+rejects redirects. A failed write is never retried automatically because it may
+already have completed. Revoke access from Connections when finished.
+
+The device endpoint is `/mcp/oauth/device_authorization`, browser verification is
+`/mcp-device`, and the token endpoint accepts the RFC 8628 device grant. Pending
+requests have separately hashed codes, ten-minute expiry, five-second initial
+polling, persistent backoff and atomic redemption. Shared database quotas bound
+new requests. Consent uses the same company, role, scope, grant, audit and
+revocation checks as browser OAuth. This is human authorization, not client
+credentials or agent impersonation. Both flows require the experimental setting.
+
+Tenant Cloud gateways forward setup and device protocol requests without browser
+cookies. Browser approval remains authenticated. The central directory broker
+does not advertise device or CIMD support until separately implemented.
+
## Identity and consent
- Protected-resource discovery: `/.well-known/oauth-protected-resource/mcp/paperclip`.
@@ -80,6 +172,33 @@ installation requires the separate deployment and submission work below.
- Browser consent: `/mcp-connect/:requestId`.
- User connection management: `/assistant-connections`.
+Consent identifies the registered client and its identifying origin. Client names are
+self-reported; verify the receiving domain before approving an unexpected request.
+The hosted organization chooser also identifies the original client and callback
+origin before its tenant handoff.
+
+An uncached remote client-metadata lookup consumes a database-backed admission receipt
+before fetching: at most 60 attempts per instance and six per source per rolling
+minute, shared by browser and device authorization across server replicas.
+Receipts store only a source hash and expiry, and failed lookups or mismatched
+redirects still consume the quota. Invalid resources and scopes are rejected
+without fetching. The network request runs after the admission transaction
+commits, so slow clients cannot hold its database lock. Reusing already-validated
+metadata within its cache lifetime consumes no fetch capacity, so clients shared
+by users behind one proxy do not charge the same lookup on every connection.
+
+Client ID Metadata Documents (CIMD) and dynamic registration both support public
+clients. CIMD uses an HTTPS client ID URL with an exact matching `client_id`,
+required registered redirects, a 32 KiB response limit, a bounded cache, and
+guarded DNS/HTTP fetching that rejects private networks and redirects. Supplied
+names are not proof of a brand identity. Client documents can list capabilities
+used with other servers; Paperclip retains only its implemented grants. Extra
+capabilities such as Claude web’s JWT-bearer grant do not enable that grant here.
+Verified native loopback callbacks may vary only their port; the exact authorized
+callback remains bound to code redemption. Authorization responses include `iss`.
+Resource metadata advertises resource scopes; refresh capability is advertised
+in authorization-server metadata.
+
Dynamic registration uses public clients, exact registered HTTPS redirect URIs
(or HTTP loopback), authorization code flow, S256 PKCE and exact resource
binding to the endpoint. Authorization requests expire in ten minutes; codes
@@ -208,6 +327,14 @@ Rescan the plugin's MCP server to discover the event catalog. Installing or
connecting alone does not start monitoring. Claude and other clients without
Events support can continue retrieving results through the read tools.
+Callback and hosted-authority verification reserve durable capacity before any
+remote request. Across replicas, at most 2 verifications per grant, 8 per company
+and 32 per instance can run concurrently. Attempts are bounded to 30 per grant,
+200 per company and 1,000 per instance per minute, including failed verification.
+New monitors reserve subscription quota before verification; leases expire after
+one minute. Network waits hold no database transaction, and expired, cancelled
+or revoked requests cannot finalize a subscription.
+
Delivery uses a verified HTTPS callback, Standard Webhooks HMAC signatures,
public-address DNS pinning on every connection, and no redirects. Callback URLs,
current/previous signing keys and hosted authorization proofs are encrypted with
@@ -251,10 +378,62 @@ local protocol and paid model tests do not establish store/UI readiness.
Run `pnpm storybook` and open the **Assistant connections** group. The stories
render the production consent, connection-management, and Experimental pages,
including read-only roles, loading, empty, unavailable, pending, revoked, and
-failed-save states. Interactive stories verify team-switch consent reset,
+failed-save states. Interactive stories verify organization-switch consent reset,
revocation, and settings rollback. All MCP actions use per-story in-memory
fixtures; no credentials are issued and no work is delegated.
The Cloud repository's `web` Storybook has **Assistant connections / Hosted
connection** for sign-in, organization selection, and the create-and-return
flow. OAuth redirects between the two services remain mocked in these previews.
+
+### Guided assistant walkthrough
+
+Open **Assistant connections → Start here → Guided walkthrough** for a
+presenter-led story about Alex connecting Acme Research. Each step explains
+where Alex is, what to try, what happens next, and a question to discuss.
+Next/Back and numbered chapters control the explanation independently of the
+interactive product preview; Reset this screen restores that step’s fixture.
+Each screen starts fresh, so sample state does not persist between chapters.
+
+The Cloud walkthrough covers sign-in, choosing or creating an organization,
+readiness, and the handoff. The Paperclip walkthrough covers the experimental
+setting, organization consent, example delegation and retrieval conversations, and
+revocation. Assistant conversations are explicitly illustrative; product
+screens use isolated service fixtures. No paid work or real OAuth runs here.
+
+Local cross-links expect Paperclip Storybook on port 6106 and Cloud on 6107.
+The default scripts use port 6006; launch these in separate terminals with
+explicit overrides:
+
+```sh
+# From the Paperclip repository's ui/ directory:
+pnpm exec storybook dev --port 6106 --config-dir storybook/.storybook --no-open
+
+# From the paperclip-cloud repository's web/ directory:
+npm run storybook -- --port 6107
+```
+
+When published elsewhere, open the companion Storybook separately. Each
+walkthrough works independently. **Navigation check** is a separate interaction
+story so the presentation itself never advances automatically.
+
+### One organization from Cloud through consent
+
+Cloud selects an organization once and sends its registry company ID as the
+optional OAuth `company_id` parameter. Paperclip persists it as
+`mcp_oauth_requests.requested_company_id`, filters the consent response to that
+company, and rejects approval for any other company even if the user belongs to
+both. It is a scope restriction, never a substitute for active membership or
+explicit read/write consent. A deleted, archived, or inaccessible company cannot
+fall back to another one. The UI shows the fixed organization and permissions,
+with cancel/reconnect guidance if it is unavailable.
+
+Direct instance requests without `company_id` retain their organization picker.
+There is no separate “team” entity in this flow. Cloud’s organization maps to its
+stack’s primary Paperclip company; the stack is hosting infrastructure. The hosted
+walkthrough uses **Consent → Hosted organization**; direct selection, read-only,
+and unavailable-organization variants remain separately inspectable.
+
+Apply the additive nullable request-column migration before running this tenant
+version, and deploy tenant support before the Cloud broker that sends the binding.
+Existing direct requests and grants are unchanged.
diff --git a/doc/run-log-events.md b/doc/run-log-events.md
index dd962b0aa23..ed8f723652c 100644
--- a/doc/run-log-events.md
+++ b/doc/run-log-events.md
@@ -52,6 +52,13 @@ and incomplete result-delivery command IDs and statuses. If execution and
cleanup both fail, execution retains its original error identity and cleanup is
attached as `cleanupError`.
+Semantic settlement also includes up to 20 content-free failure records, with
+the call ID, operation ID, stage (`dispatch` or `persist_result`), and cause.
+Causes distinguish an oversized command, a full command journal, known storage
+errors, dispatcher rejection, and other persistence failures. Exception messages
+and tool results are excluded. These diagnostics do not authorize replay of an
+operation whose outcome is unknown.
+
Instruction writes also commit an `agent.instruction_write_attempted` activity
row and a run-scoped `instructionToolAttempts` entry before permitting the
filesystem effect. They retain the call ID, operation ID, and input digest, not
@@ -103,6 +110,14 @@ proofs, encryption keys, environment variables, provider credentials, command
arguments, or an unsanitized stderr stream. Detailed failed-attempt diagnostics
remain in the bounded `native_run_finalizations.recovery_history` ledger.
+For a local Codex turn lost while runnerd was stopped, the canonical `turn.failed`
+event retains `error.code: "provider_turn_lost_on_restore"` and
+`error.recoverable: true`. It records the interrupted turn, not a final task
+outcome. There is no synthesized result for that interruption. An admitted
+same-session continuation emits its own `turn.submitted`, accepted turn ID, and
+terminal events; only the final outcome closes the run. Reconstructed thread
+history retains the original error so reconciliation and live delivery agree.
+
## Native Local Process Stop Evidence
The server writes `native.local_process_stopped` in the same transaction that
@@ -320,6 +335,17 @@ the enclosing workspace task. The original error and restore safety policy are
unchanged. These lines stay in the instance run log and its configured durable
storage, and are not new first-party telemetry events.
+The optional `step` identifies the failed restore operation. For
+`phase=workspace` and `step=git_integration`, `gitCommand` identifies one fixed
+command family (`rev_parse`, `symbolic_ref`, `merge_base`, `merge_tree`,
+`commit_tree`, `update_ref`, or `log`). `gitFailureKind` is `merge_conflict`,
+`invalid_object`, `ref_conflict`, `permission_denied`, or `unknown`; it is a
+bounded diagnostic clue, not a new recovery or retry decision. Only supported
+exit/OS codes and recognized Git messages produce a specific classification.
+No command arguments, stderr, filenames, repository URLs, or ref names are saved.
+The same closed fields persist in `workspaceRestoreDiagnostic` and are
+revalidated before projection into an enabled Sentry failure report.
+
## Codex resume usage snapshot
The native runner retains a bounded local `harness.diagnostic` event with code
@@ -357,3 +383,10 @@ Successful checkpoints can include `checkpointStats`: `scannedEntries`,
capture, not cumulative traffic or an atomic snapshot of background writers.
They contain no file contents. The receipt remains in the instance run log;
it adds no Paperclip Telemetry or OpenTelemetry export.
+
+If instruction-copy release throws, `instruction_cleanup` records a warning
+with payload `{ "state": "deferred" }`. The existing working-copy recovery sweep
+retries cleanup. This event preserves the run outcome and does not claim a file
+save; `instruction_save` remains authoritative for collection. The event contains
+no raw exception, host path, file contents, or lock-owner metadata. Failure to
+write the warning must not replace the provider outcome or stop lease release.
diff --git a/doc/runner-created-skills.md b/doc/runner-created-skills.md
index cf3c49c3648..9d9ad472b54 100644
--- a/doc/runner-created-skills.md
+++ b/doc/runner-created-skills.md
@@ -4,6 +4,27 @@ The native Runner exposes `create_skill` in Auto and skill-test work. An agent
can save a reusable, single-file skill directly in the company's skill library.
The tool is unavailable in Ask and pre-acceptance Plan modes.
+The native Runner also exposes `update_skill` in the same modes. Read the
+existing skill and its `currentVersionId` through the company skill API before
+editing. Supply the **complete** primary file, not a fragment:
+
+```json
+{
+ "skillId": "",
+ "expectedVersionId": "",
+ "markdown": "---\nname: release-review\ndescription: Review release notes.\n---\n\n# Review\nCheck each release note and its tests.\n",
+ "idempotencyKey": "review-update-1"
+}
+```
+
+The tool uses the existing Skill Studio file endpoint and company `skills.edit`
+policy. It returns a skill ID, path, resulting version ID, and Skill Studio
+path. Retry a lost response with **exactly** the same key and inputs; that
+returns the original receipt without another version or activity record.
+Reusing the key with different inputs, or updating after the version changes,
+returns a conflict. After a version conflict, reread the skill and choose a
+new key for the revised edit. Policy is checked again even on exact retries.
+
```json
{
"name": "release-review",
diff --git a/docker/daytona-runner/Dockerfile b/docker/daytona-runner/Dockerfile
index 5a1da31b1f8..d0de6c14b7c 100644
--- a/docker/daytona-runner/Dockerfile
+++ b/docker/daytona-runner/Dockerfile
@@ -28,7 +28,7 @@ COPY cli/package.json ./cli/package.json
# The complete resolved lock (including transitive integrity hashes) is reviewed.
# Reject registry-time drift BEFORE installing packages or running lifecycle code.
# Refresh this digest together with source/provider dependency changes.
-ARG PAPERCLIP_RUNNER_LOCK_SHA256=2c46a68811ba1d504a41b6f4d3f642bc93f4a1c615097754c9c6486881dba8e6
+ARG PAPERCLIP_RUNNER_LOCK_SHA256=e1856797158f7d0bdb728b9d6c6dda3d65ad5f7896e68216883174de508431a7
RUN printf '%s pnpm-lock.yaml\n' "${PAPERCLIP_RUNNER_LOCK_SHA256}" > /tmp/provider-lock.sha256 \
&& sha256sum -c /tmp/provider-lock.sha256 \
&& pnpm install --frozen-lockfile --filter '@paperclipai/paperclip-runner...'
@@ -56,9 +56,9 @@ ENV PATH=${PAPERCLIP_RUNNER_PROVIDER_PACK_ROOT}/node_modules/.bin:/usr/local/sha
# Never add a second CLI version to work around a runner compatibility pin.
RUN npm uninstall -g @anthropic-ai/claude-code @openai/codex opencode-ai \
&& npm install -g \
- @xai-official/grok@1.0.41 \
- @google/gemini-cli@0.60.0 \
- @moonshot-ai/kimi-code@2.0.2 \
+ @xai-official/grok@1.0.46 \
+ @google/gemini-cli@0.62.0 \
+ @moonshot-ai/kimi-code@2.1.1 \
&& npm cache clean --force
# Hermes requires Python >=3.11,<3.14; the image's default Python is newer.
@@ -69,8 +69,8 @@ RUN /usr/bin/python3 -m venv /opt/hermes \
&& /opt/hermes/bin/pip install --no-cache-dir hermes-agent==0.19.0 \
&& ln -sf /opt/hermes/bin/hermes /usr/local/bin/hermes
-ARG CURSOR_VERSION=2026.09.18-9a7762b
-ARG CURSOR_SHA256_AMD64=b1308f5a2fc05458b9d8966752986bb23a971bbcc67c842c1df94c4b8132bad9
+ARG CURSOR_VERSION=2026.10.01-e373342
+ARG CURSOR_SHA256_AMD64=a79726c6e644520e993970be4c45775a6889802b67abe461a677a53219ae28e8
RUN set -eu; \
arch="$(dpkg --print-architecture)"; \
[ "$arch" = "amd64" ] || { echo "FATAL: cursor pin only covers amd64, not $arch" >&2; exit 1; }; \
@@ -84,8 +84,8 @@ RUN set -eu; \
ln -sf /usr/local/bin/cursor-agent /usr/local/bin/agent; \
chmod -R a+rX /opt/cursor
-ARG GH_VERSION=2.101.0
-ARG GH_SHA256_AMD64=9bca2d1c16825f109907a23307628a2f0698fbf99662b73a5cf0b020293072b8
+ARG GH_VERSION=2.102.0
+ARG GH_SHA256_AMD64=bb766f710eef8ede859c18578c72c327597cd4c8a85b06001b1f3843c6019386
RUN set -eu; \
arch="$(dpkg --print-architecture)"; \
[ "$arch" = "amd64" ] || { echo "FATAL: gh pin only covers amd64, not $arch" >&2; exit 1; }; \
@@ -139,9 +139,9 @@ RUN /bin/sh -lc 'set -eu; \
for command_name in acpx claude-agent-acp codex-acp; do \
command -v "$command_name" >/dev/null || { echo "FATAL: $command_name not on PATH for daytona user" >&2; exit 1; }; \
done; \
- test "$(codex --version)" = "codex-cli 0.156.0"; \
- test "$(claude --version)" = "2.1.280 (Claude Code)"; \
- test "$(opencode --version)" = "1.18.32"; \
+ test "$(codex --version)" = "codex-cli 0.160.0"; \
+ test "$(claude --version)" = "2.1.286 (Claude Code)"; \
+ test "$(opencode --version)" = "1.18.34"; \
test "$(acpx --version)" = "0.13.1"; \
test "$(claude-agent-acp --version)" = "0.73.0"; \
test "$(codex-acp --version)" = "@agentclientprotocol/codex-acp 1.6.2"'
diff --git a/docker/daytona-runner/README.md b/docker/daytona-runner/README.md
index cd54962638f..8b48d4c1bea 100644
--- a/docker/daytona-runner/README.md
+++ b/docker/daytona-runner/README.md
@@ -2,7 +2,7 @@
This image is the Paperclip Cloud fleet sandbox image plus a source-built
`paperclip-runnerd` and immutable provider pack. The pack contains Node 24.11,
-OpenCode 1.18.32, the compiled OpenCode proxy, ACPX 0.13.1 sidecar, qualified ACP
+OpenCode 1.18.34, the compiled OpenCode proxy, ACPX 0.13.1 sidecar, qualified ACP
agents, and the production lockfile. Its manifest digests each executable bridge
and binds the pack to the runner source revision, avoiding artifact upload and
npm installation on every fresh lease.
@@ -14,14 +14,18 @@ image that this Dockerfile can extend directly.
## Harness versions
-The September 22, 2026 refresh pins Codex 0.156.0, Claude Agent SDK
-0.3.280 (Claude Code 2.1.280), and OpenCode 1.18.32 in the shared provider
+The October 2026 refreshes pin Codex 0.160.0, Claude Agent SDK
+0.3.286 (Claude Code 2.1.286), and OpenCode 1.18.34 in the shared provider
pack. Claude Code 2.1.280 is the minimum for
-[Opus 5.5](https://code.claude.com/docs/en/model-config); it also supports
-Fable 5.1. Codex uses the current
-[GPT-6 Sol and Luna model IDs](https://learn.chatgpt.com/docs/models).
-Grok CLI 1.0.41 supports the current
-[Grok 4.7](https://docs.x.ai/developers/grok-4-7) model family.
+[Opus 5.5](https://code.claude.com/docs/en/model-config) and 2.1.284 is the
+minimum for Sonnet 5.5; the pinned runtime also supports Fable 5.1. Codex
+0.160.0 ships bundled metadata for the current
+[GPT-6.1 Sol, GPT-6 Sol, and GPT-6 Luna model IDs](https://learn.chatgpt.com/docs/models).
+The same refresh pins Grok CLI 1.0.46, Gemini CLI 0.62.0, Kimi Code 2.1.1,
+Cursor CLI 2026.10.01-e373342, and GitHub CLI 2.102.0 in the sandbox layer.
+Grok CLI 1.0.46 supports the current
+[Grok 4.7](https://docs.x.ai/developers/grok-4-7) model family. Hermes stays
+at 0.19.0, the newest release on PyPI.
Keep the patched ACP bridge versions separate from their CLI runtime pins.
Their executable digests do not change when only the runtime dependency
diff --git a/docs/api/routines.md b/docs/api/routines.md
index 6ac4a2d5b49..729efcdf493 100644
--- a/docs/api/routines.md
+++ b/docs/api/routines.md
@@ -21,6 +21,13 @@ GET /api/routines/{routineId}
Returns routine details including triggers.
+Routine and trigger resource IDs must be complete UUIDs from the API response.
+Short prefixes and malformed IDs return the same `404` as a missing resource.
+UUID lookup accepts PostgreSQL's existing input forms, including uppercase,
+compact and braced UUIDs; it does not trim whitespace or resolve prefixes.
+Company access and routine-assignee permissions still apply. Public trigger
+IDs in webhook URLs are separate opaque identifiers, not resource UUIDs.
+
## Create Routine
```
diff --git a/docs/deploy/environment-variables.md b/docs/deploy/environment-variables.md
index a663f1f0e80..eb60708a670 100644
--- a/docs/deploy/environment-variables.md
+++ b/docs/deploy/environment-variables.md
@@ -24,7 +24,7 @@ All environment variables that Paperclip uses for server configuration.
| `PAPERCLIP_RUNNER_CA_BUNDLE_PATH` | (unset) | Optional PEM CA bundle for direct runner WSS. Platform roots remain enabled. There is no insecure TLS bypass. |
| `PAPERCLIP_RUNNER_REMOTE_BINARY_PATH` | (host build) | Host-local path to a `paperclip-runnerd` artifact built for the remote target OS and architecture. Required when Paperclip and the remote sandbox do not share a compatible platform; build metadata and the required transport mode are verified before launch. |
| `PAPERCLIP_RUNNER_REMOTE_CODEX_PATH` | (unset) | Optional host-local path to a Codex executable built for the remote target OS and architecture. For remote Codex-backed runners, Paperclip stages and verifies this executable beside `paperclip-runnerd`. |
-| `PAPERCLIP_RUNNER_REMOTE_CODEX_NPM_SPEC` | (unset) | Optional pinned npm package spec (for example, `@openai/codex@0.156.0`) installed inside each fresh remote lease when its Codex harness is not baked into the sandbox image. Mutually exclusive with `PAPERCLIP_RUNNER_REMOTE_CODEX_PATH`; Paperclip verifies the installed executable before starting `runnerd`. |
+| `PAPERCLIP_RUNNER_REMOTE_CODEX_NPM_SPEC` | (unset) | Optional pinned npm package spec (for example, `@openai/codex@0.160.0`) installed inside each fresh remote lease when its Codex harness is not baked into the sandbox image. Mutually exclusive with `PAPERCLIP_RUNNER_REMOTE_CODEX_PATH`; Paperclip verifies the installed executable before starting `runnerd`. |
| `PAPERCLIP_RUNNER_REMOTE_PROVIDER_PACK_PATH` | `/opt/paperclip-runner/provider-pack` in Docker; otherwise unset | Host-local path to the immutable provider pack built by `pnpm --filter @paperclipai/paperclip-runner build:provider-pack`. Stamped standard Docker images include the pack; downstream compositions and the `cloud` target inherit it. Unstamped local Docker builds skip pack generation. The pack includes its target-built Node 24.11+ runtime, locked production dependencies, OpenCode proxy/executable, and ACPX sidecar. Remote OpenCode and ACPX fail closed without it. A preinstalled pack is accepted only when its complete digested manifest matches this build-owned pack; otherwise Paperclip stages this pack into the sandbox. |
| `PAPERCLIP_HIDDEN_SETTINGS` | (unset) | Comma-separated settings surfaces to hide from the UI and floor at the API, for operators hosting Paperclip for others (managed cloud, internal shared server). See [Hiding settings surfaces](#hiding-settings-surfaces). |
| `PAPERCLIP_SETTING_DEFAULTS` | (unset) | JSON object replacing the schema default of selected instance settings, for hosting operators. See [Operator setting defaults](#operator-setting-defaults). |
diff --git a/docs/guides/board-operator/execution-workspaces-and-runtime-services.md b/docs/guides/board-operator/execution-workspaces-and-runtime-services.md
index e38b1b2692d..16eeefe881e 100644
--- a/docs/guides/board-operator/execution-workspaces-and-runtime-services.md
+++ b/docs/guides/board-operator/execution-workspaces-and-runtime-services.md
@@ -138,6 +138,7 @@ fetches with it. Details and caveats:
Code state moves between runs through the local execution-workspace cwd alone — not through a git remote.
- Each run's prepare step bundles the local worktree to the run's remote dir over ssh, with no `git remote` configured.
+- Other project repositories under `.paperclip-repositories/` make the same round trip. Each one is bundled and restored as its own Git checkout.
- The adapter's restore step at the end of the run writes any new remote commits back into the local worktree directly.
- Adapters must never `git push` from runtime code, and must never assume a remote exists.
- A failed restore is a run-level error and records `workspace_finalize=failed` on the execution workspace, which gates dependent issue wakes until the next successful finalize.
diff --git a/feature-map/README.md b/feature-map/README.md
new file mode 100644
index 00000000000..b38d7fb650c
--- /dev/null
+++ b/feature-map/README.md
@@ -0,0 +1,177 @@
+# Paperclip feature map
+
+Start here when reproducing a user-facing bug, verifying a change, or deciding
+which surfaces a fix must cover. Each recipe describes what a person can do,
+where they can do it, the expected result, and the evidence needed to verify it.
+Product behavior is still governed by [the implementation spec](../doc/SPEC-implementation.md).
+
+## Features
+
+The map is organized by user capability, not by source file. It covers **35 feature
+families** across the product, CLI, and operator workflows, checked against source
+on 2026-10-05. Experimental and developer-only surfaces are labeled explicitly.
+Each recipe includes sub-features, current entry points, automated evidence,
+manual verification steps, and gotchas.
+
+### Getting started and access
+
+| Feature | What it covers |
+| --- | --- |
+| [Onboarding and first work](./onboarding.md) | Instance setup, company wizard, first agent and task. |
+| [Login, invitations, and access](./access.md) | Sessions, bootstrap, membership, roles, and CLI authorization. |
+| [Companies and portability](./companies.md) | Company switching/settings, archival, package import/export. |
+
+### Tasks and conversations
+
+| Feature | What it covers |
+| --- | --- |
+| [Task creation and lifecycle](./tasks.md) | Creation, assignment, lists, properties, comments, and completion. |
+| [Delegation, dependencies, and signoff](./task-coordination.md) | Child work, prerequisites, reviewers, and task-tree controls. |
+| [Inbox, decisions, and search](./inbox-search.md) | Personal triage, decision queues, unread/blocked views, and search. |
+| [Agent conversations and project handoff](./agent-chat.md) | Persistent conversations, discovery, handoff, and gated board chat. |
+| [Questions and approvals](./questions-and-approvals.md) | Question/plan responses, formal approvals, and app-tool review. |
+| [Steering and queued messages](./steering.md) | Follow-ups, queue edits, interruption, and pause/resume. |
+| [Documents, attachments, and work products](./documents-artifacts.md) | Versioned documents, annotations, files, outputs, and artifact library. |
+
+### Agents and reusable capabilities
+
+| Feature | What it covers |
+| --- | --- |
+| [Hiring, configuration, and organization](./agents.md) | Agent identity, instructions, reporting lines, lifecycle, and built-ins. |
+| [Runs, harnesses, and model accounts](./runs-adapters.md) | Adapter/model setup, account validation, transcripts, and run history. |
+| [Skills and Skill Studio](./skills.md) | Discovery, sources, authoring, revisions, tests, and agent policies. |
+| [Team packages and installation](./teams.md) | Catalog preview/install via CLI/API; catalog UI availability called out. |
+
+### Projects and execution
+
+| Feature | What it covers |
+| --- | --- |
+| [Projects and repositories](./projects.md) | Project lifecycle, task context, repository configuration, and defaults. |
+| [Goals and work alignment](./goals.md) | Goal hierarchy, ownership, status, and project/task context. |
+| [Workspaces, services, and files](./workspaces.md) | Provisioning, task bindings, services/logs, Git/files, and closure. |
+| [Execution environments](./execution-environments.md) | Local, SSH, sandbox providers, target probes, and custom images. |
+| [Recovery](./recovery.md) | Stopped work, workspace repair, bounded continuation, and reconnect. |
+
+### Apps, channels, and extensions
+
+| Feature | What it covers |
+| --- | --- |
+| [Connection setup](./connection-setup.md) | Catalog, MCP links, task requests, authentication, and setup resumption. |
+| [App access and action permissions](./app-permissions.md) | Agent grants, off/ask/allowed actions, discovery, tests, and revocation. |
+| [External chat and email](./chat-channels.md) | Provider-specific identity, threads, files, delivery, and endpoint upkeep. |
+| [Tool gateways and access profiles](./gateways-profiles.md) | Tool exposure, client configuration, tokens, profiles, and activity. |
+| [Secrets and proposals](./secrets.md) | Company/user credentials, grants, proposals, and vault import. |
+| [Plugins](./plugins.md) | Installation/configuration, contributed pages/tools, and lifecycle. |
+
+### Automation and structured work
+
+| Feature | What it covers |
+| --- | --- |
+| [Routines, schedules, and triggers](./routines.md) | Definitions, variables, scheduled/webhook/manual runs, and history. |
+| [Pipelines, review queues, and learnings](./pipelines.md) | Experimental stages, automation, items, review, and learning records. |
+| [Cases](./cases.md) | Experimental structured fields, relationships, revisions, and task links. |
+| [Status cards](./status-cards.md) | Experimental summaries, watched work, refresh history, and settings. |
+
+### Oversight and operation
+
+| Feature | What it covers |
+| --- | --- |
+| [Costs and budgets](./budgets-costs.md) | Spend reports, scoped limits, incidents, hard stops, and resumption. |
+| [Dashboards and audit trails](./activity.md) | Company health, live work, activity, runs, routines, and timeline. |
+| [Navigation, profile, and announcements](./navigation-preferences.md) | Sidebar state, favorites/recents, personal identity, and dismissals. |
+| [Instance operations](./instance-operations.md) | Installation, updates, service health, configuration, and backups. |
+| [CLI/API and local worktrees](./cli-operations.md) | Explicit context, resource commands, outputs, runs, and isolated instances. |
+
+### Contributor surfaces
+
+| Feature | What it covers |
+| --- | --- |
+| [Developer previews and diagnostic labs](./developer-labs.md) | Design examples, interaction fixtures, performance checks; not production acceptance. |
+
+These are verification instructions, not a claim that every journey passed a live
+test. A component test proves its component; a scripted provider proves that
+fixture integration. Record executed results separately from the map.
+
+## Before driving a journey
+
+1. Use this checkout's [isolated test drive](../doc/DEVELOPING.md#one-command-isolated-manual-test-drive)
+ for manual product checks. It creates a temporary instance and prints its URL
+ and data directory. Do not guess that a server on port 3100 belongs to you.
+2. Record the commit, URL, company, login role, relevant experimental settings,
+ adapter, runtime mode, and live versus simulated dependencies. Use disposable
+ tasks and provider resources. A fresh test drive creates a company and CEO,
+ but no task or first run.
+3. Use the current navigation and company prefix. Paths in recipes omit that
+ prefix. Record whether the streamlined or production shell is selected;
+ Agent Chat, chat connectors, and the combined Inbox/Tasks view have separate
+ gates. A hidden surface is an unmet prerequisite, not a successful test.
+4. Run the smallest relevant test first. Vitest commands below run from the
+ repository root after installing dependencies. Playwright recipes use their
+ named configuration and its isolated environment, not an unrelated running
+ instance. Reserve expensive runner/provider tests for the behavior at issue.
+5. Exercise the actual user action, inspect its result, reload, and verify the
+ persisted state or continuation. Use read-only API checks to corroborate UI
+ evidence; creating state through the API does not prove the creation UI.
+
+For agent-driven acceptance work, the existing
+[dev-workspace run/verify skill](../.agents/skills/paperclip-dev-workspace-run-verify-fix/SKILL.md)
+and [evaluation skill](../.agents/skills/paperclip-evals/SKILL.md) describe runtime
+ownership and evidence handling. Reuse them; this map introduces no environment
+launcher, credentials, scheduled job, or second test framework.
+
+## Evidence contract
+
+Report each entry point as **passed**, **failed**, **blocked** (with its missing
+prerequisite), or **not run**. Include the feature filename and entry-point ID,
+commit/environment, user action, expected and observed result, command/exit code,
+and evidence links. Screenshots or traces should show both the action and the
+discriminating result. Include task/run/request IDs when relevant, without secrets.
+
+A fix is verified across its affected surfaces only when each has evidence or
+an explicit reason it does not apply. Shared code alone does not prove parity.
+Keep product regressions visible; do not change the recipe to bless a failure.
+For Paperclip-assigned work, attach evidence through the
+[artifact workflow](../doc/AGENT-ARTIFACTS.md).
+
+## Inventory and remaining depth
+
+[The UI coverage inventory](./coverage.json) accounts for every non-test TSX
+module under `ui/src/pages`, including supporting panels, legacy variants, and
+labs. Every product area now links to concrete recipes. **Partial** means the
+area still has the named variant or workflow gaps; **unmapped** is reserved for
+an area with no recipe. These statuses describe documentation, not runtime health.
+
+The page inventory is a source snapshot dated 2026-10-05. The map also
+includes entry points hosted inside other modules (pipeline Review Queue and
+Learnings, task documents, onboarding), CLI-only operations, and operator work.
+The team recipe explicitly distinguishes the current CLI/API path from catalog
+UI components without a current top-level route. Refer to [route registration](../ui/src/App.tsx)
+and the [CLI registry](../cli/src/index.ts) when changing reachability.
+
+Remaining depth includes complete provider/auth/attachment matrices, every
+harness/model/environment capability combination, third-party plugin features,
+and every role/error/mobile/legacy-shell permutation. The recipes name relevant
+gaps instead of equating source presence with a working user journey. The index
+can include capabilities that do not add a page file.
+
+## Maintaining the reference
+
+The map is documentation only. It adds no CI checks, automatic journey execution,
+or required inventory updates for future pull requests.
+
+When maintaining a recipe, compare its entry points and expected results with
+the current source. Check that linked tests still exercise the stated behavior
+and that local references still exist. Refresh the inventory snapshot when it
+helps explain the current product. Maintenance is optional and review-based.
+
+Each recipe starts with an H1 and a user-visible description, then exactly:
+
+1. **Sub-features** — stable backticked IDs and observable behavior/states.
+2. **How to get to it (user POV)** — one H3 backticked entry-point ID per surface.
+3. **Driving it** — starts with `Preconditions:`; repeat each entry-point H3,
+ with `Automated:` and `Manual:` paragraphs. Name test scope and gaps honestly.
+4. **Gotchas** — misleading look-alikes, feature gates, and invalid evidence.
+
+The format is inspired by
+[Omnigent's feature map](https://github.com/omnigent-ai/omnigent/tree/91acfbbb59f6fc210ff95a9e9428aadd62e06582/feature-map).
+Paperclip's recipes and checks follow its own task model and test infrastructure.
diff --git a/feature-map/access.md b/feature-map/access.md
new file mode 100644
index 00000000000..d7248c8b63a
--- /dev/null
+++ b/feature-map/access.md
@@ -0,0 +1,55 @@
+# Login, invitations, and access
+
+People and agents enter the correct instance and company with the permissions granted to their identity. Login, membership, resource access, and CLI authorization have separate controls.
+
+Implementation: [auth page](../ui/src/pages/Auth.tsx), [company members](../ui/src/pages/CompanyAccess.tsx), [invitation](../ui/src/pages/InviteLanding.tsx).
+
+## Sub-features
+
+- `login`: sign in or claim the board in the configured deployment mode.
+- `invitations`: join through a valid invite and handle expired or already-used links.
+- `membership`: review join requests and manage company/instance membership and permissions.
+- `resources`: respect company and resource boundaries on deep links and mutations.
+- `cli-auth`: authorize a CLI session and revoke or replace credentials.
+
+## How to get to it (user POV)
+
+### `login`
+
+Open `/auth`; first-owner bootstrap uses `/board-claim/:token` when configured.
+
+### `invite-members`
+
+Open `/invite/:token`; operators manage members in company settings and join requests at `/inbox/requests`.
+
+### `cli-authorization`
+
+Start the CLI auth/connect flow and approve its `/cli-auth/:id` browser page; instance access is under Settings when visible.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). For login tests use authenticated mode and two test users; local-trusted mode does not prove session enforcement. Use two companies for isolation checks.
+
+### `login`
+
+Automated: [auth UI](../ui/src/pages/Auth.test.tsx) and [session routes](../server/src/__tests__/auth-session-route.test.ts) cover their respective layers.
+
+Manual: Sign in, reload a company deep link, sign out, and revisit it. Confirm the browser requests authentication rather than showing cached company data. Test an invalid claim separately on disposable state.
+
+### `invite-members`
+
+Automated: [member UI](../ui/src/pages/CompanyAccess.test.tsx) and [invite replay](../server/src/__tests__/invite-accept-replay.test.ts) provide component and route evidence.
+
+Manual: Accept an invite as the intended user, inspect the resulting company and permissions, then reuse and expire disposable invites. Change a member permission, reload as that member, and verify a denied operation on another company remains denied.
+
+### `cli-authorization`
+
+Automated: [board auth client](../cli/src/__tests__/board-auth.test.ts) and [token commands](../cli/src/__tests__/token.test.ts) cover the client contracts.
+
+Manual: Authorize the intended CLI context, make a read-only company request, then revoke its token and retry. Verify failure is explicit and does not silently fall back to another identity.
+
+## Gotchas
+
+- Settings visibility is not authorization; direct requests still need permission checks.
+- An agent bearer key must not gain another company’s access.
+- Never put invite tokens, session cookies, or API keys in verification evidence.
diff --git a/feature-map/activity.md b/feature-map/activity.md
new file mode 100644
index 00000000000..a50206a9fca
--- /dev/null
+++ b/feature-map/activity.md
@@ -0,0 +1,45 @@
+# Dashboards, activity, and audit trails
+
+People inspect company health, recent activity, run history, and routine activity, then follow evidence back to the task or agent responsible.
+
+Implementation: [dashboard](../ui/src/pages/Dashboard.tsx), [live dashboard](../ui/src/pages/DashboardLive.tsx), [audit hub](../ui/src/pages/audit/AuditHub.tsx).
+
+## Sub-features
+
+- `overview`: inspect the company dashboard and live-work summary.
+- `activity`: filter and page through recorded actor/resource events.
+- `runs`: find executions and follow their task/agent context.
+- `routine-audit`: inspect routine execution activity separately from its definition.
+- `timeline`: use the available timeline view to understand work over time.
+
+## How to get to it (user POV)
+
+### `dashboard`
+
+Open `/dashboard` or `/dashboard/live`.
+
+### `activity-audit`
+
+Open `/activity`, `/activity/runs`, or `/activity/timeline` in the streamlined shell; legacy routes may redirect.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Prepare known task mutations and completed/failed runs in a disposable company, recording their IDs and actors.
+
+### `dashboard`
+
+Automated: [dashboard service](../server/src/__tests__/dashboard-service.test.ts) covers server aggregation; [dashboard helpers](../ui/src/pages/Dashboard.test.ts) is narrower UI helper coverage.
+
+Manual: Compare the dashboard with the known fixture tasks and runs. Start and finish a small task, refresh/reload, and verify the summary changes and links reach the right records. Exercise empty data and a failed fetch.
+
+### `activity-audit`
+
+Automated: [activity service](../server/src/__tests__/activity-service.test.ts), [audit runs](../ui/src/pages/audit/AuditRuns.test.tsx), and [routine audit](../ui/src/pages/audit/RoutineAuditActivity.test.tsx) cover these separate data/host layers.
+
+Manual: Find a known mutation by actor/resource and a known run by status. Change filters, load more, and follow the source links. Reload the chosen view and verify no company leakage or duplicate events. Inspect a routine run from its audit entry.
+
+## Gotchas
+
+- Audit/activity events, run-log rows, first-party Telemetry, and operator OpenTelemetry traces are separate data paths.
+- A healthy stream or dashboard counter alone does not prove task success.
+- Cost and budget reports have their own [recipe](./budgets-costs.md).
diff --git a/feature-map/agent-chat.md b/feature-map/agent-chat.md
new file mode 100644
index 00000000000..e47de311b56
--- /dev/null
+++ b/feature-map/agent-chat.md
@@ -0,0 +1,54 @@
+# Agent conversations and project handoff
+
+A person can hold a persistent conversation with an agent, return to its history, and hand useful work into a project or task. The gated conference-room chat is a separate conversation surface.
+
+Implementation: [agent chat](../ui/src/pages/AgentChat.tsx), [chat landing](../ui/src/pages/AgentChats.tsx), [conference room](../ui/src/pages/BoardChat.tsx).
+
+## Sub-features
+
+- `discovery`: find an agent and reopen an accessible recent conversation.
+- `history`: send messages, inspect replies/files, and return to the same conversation.
+- `handoff`: create or identify a project/task from chat and follow the resulting work.
+- `conference-room`: use the separately gated board chat without assuming parity with agent chat.
+
+## How to get to it (user POV)
+
+### `agent-conversation`
+
+Open `/chats`, choose an agent, or use `/chats/:agentRef` and its conversation sidebar.
+
+### `project-handoff`
+
+Ask for project work in Agent Chat and follow its created project/task links.
+
+### `conference-room`
+
+Open `/board-chat` only when its conference-room gate is enabled.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Enable the applicable chat feature, use a configured test agent, and distinguish model replies from a mocked conversation fixture.
+
+### `agent-conversation`
+
+Automated: [chat landing](../ui/src/pages/AgentChats.test.tsx) checks recent-chat routing; [conversation service](../server/src/__tests__/agent-conversations.test.ts) covers persisted conversation behavior.
+
+Manual: Start a conversation, send a recognizable request, and inspect its reply. Navigate away and reopen the same history. Test a new conversation, unavailable historical agent, and an inaccessible saved conversation; verify no cross-user or cross-company history appears.
+
+### `project-handoff`
+
+Automated: [chat project tools](../server/src/__tests__/chat-project-tools.test.ts) checks tool contracts; live model choice and UI handoff require a manual run.
+
+Manual: Ask the configured agent to create bounded project work, inspect the proposed/created target, and open the resulting task. Verify the request context and intended project survived and the task produces a useful output.
+
+### `conference-room`
+
+Automated: [board chat gate](../server/src/__tests__/board-chat-route-feature-flag.test.ts) proves route gating, not a live conversation.
+
+Manual: Check disabled access first, enable in the disposable instance, then send and reload a conversation. Inspect the actual responding agent and persisted history; report this result separately from Agent Chat.
+
+## Gotchas
+
+- Idle chat is not failed execution.
+- See [steering](./steering.md) for in-flight messages and [questions](./questions-and-approvals.md) for interactions.
+- An API tool test does not prove that every harness will choose the same handoff tool.
diff --git a/feature-map/agents.md b/feature-map/agents.md
new file mode 100644
index 00000000000..a1633a52da5
--- /dev/null
+++ b/feature-map/agents.md
@@ -0,0 +1,55 @@
+# Hiring, agent configuration, and organization
+
+Operators hire agents, configure their identity and instructions, assign reporting relationships, and manage their lifecycle. Built-in agents have their own setup and lifecycle constraints.
+
+Implementation: [hiring](../ui/src/pages/NewAgent.tsx), [configuration](../ui/src/components/AgentConfigForm.tsx), [organization](../ui/src/pages/OrgChart.tsx).
+
+## Sub-features
+
+- `hire`: choose role, manager, adapter, model, and required account settings.
+- `instructions`: edit agent configuration and instruction files with durable revisions.
+- `organization`: inspect and change reporting relationships through supported controls.
+- `lifecycle`: pause/resume or retire an agent while preserving history.
+- `built-in`: configure required agents without treating them as ordinary removable hires.
+
+## How to get to it (user POV)
+
+### `hire-agent`
+
+Use New agent from the roster or `/agents/new`.
+
+### `agent-configuration`
+
+Open `/agents/:agentId` and the configuration/instruction surfaces it exposes.
+
+### `organization`
+
+Use the roster’s organization view; `/org` redirects to the roster in the streamlined shell.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a disposable company and supported adapter; hiring may require a formal approval.
+
+### `hire-agent`
+
+Automated: [new agent page](../ui/src/pages/NewAgent.test.tsx) and [configuration form](../ui/src/components/AgentConfigForm.render.test.tsx) cover mocked UI behavior.
+
+Manual: Hire an agent with a distinct name and role. Complete any required approval, reload the roster, and open its configuration. Confirm manager, adapter, and model persisted; run a small task to prove execution readiness.
+
+### `agent-configuration`
+
+Automated: [instruction service](../server/src/__tests__/agent-instructions-service.test.ts) and [instruction revisions](../server/src/__tests__/agent-instruction-revisions.test.ts) cover file/revision contracts.
+
+Manual: Save a harmless instruction edit, reload, and verify its revision and effect in the next eligible run. Pause and resume the disposable agent; confirm pause prevents new work and does not erase previous runs.
+
+### `organization`
+
+Automated: [org chart](../ui/src/pages/OrgChart.test.tsx) is component evidence. Built-in setup also has [configuration modal tests](../ui/src/components/ConfigureBuiltInAgentModal.test.tsx).
+
+Manual: Inspect a manager and report, change the relationship through the offered controls, and reload both views. Exercise a rejected invalid relationship. Configure a built-in agent and verify it retains its required identity and restrictions.
+
+## Gotchas
+
+- A roster entry is not proof of an authenticated or invokable adapter.
+- Pending hires may live in approval/task surfaces rather than the active roster.
+- Skill and tool grants are separate: see [skills](./skills.md) and [app permissions](./app-permissions.md).
diff --git a/feature-map/app-permissions.md b/feature-map/app-permissions.md
new file mode 100644
index 00000000000..fd8a825c51f
--- /dev/null
+++ b/feature-map/app-permissions.md
@@ -0,0 +1,45 @@
+# App access, action permissions, and testing
+
+After connecting an app, an operator decides which agents may use it and whether each action is off, requires approval, or is allowed. Activity and action tests help verify the resulting access.
+
+Implementation: [app detail](../ui/src/pages/apps/AppDetail.tsx), [permissions](../ui/src/pages/apps/app-detail/PermissionsPanel.tsx), [activity](../ui/src/pages/apps/app-detail/ActivityPanel.tsx).
+
+## Sub-features
+
+- `agent-access`: grant the connection to all or selected eligible agents.
+- `action-policy`: set off/ask/allowed independently for available actions.
+- `catalog-change`: review newly discovered/quarantined actions before enabling them.
+- `test-action`: choose an actor and inputs and inspect a real action result.
+- `account-maintenance`: inspect accounts, reconnect/revoke, and review connection activity.
+
+## How to get to it (user POV)
+
+### `permissions`
+
+Open an app at `/apps/:connectionId/permissions`; this is the default connected-app view.
+
+### `test-and-maintain`
+
+Use the action test control in Permissions, then the connection’s Activity and available account/advanced controls.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Prepare a connection to a fixture or test provider, two agents, and a harmless action. Record provider and credential ownership.
+
+### `permissions`
+
+Automated: [app detail](../ui/src/pages/apps/AppDetail.test.tsx) covers agent/action controls, quarantined actions, and navigation using mocked requests.
+
+Manual: Grant one agent access, leave another excluded, and exercise off, ask, and allowed states for a harmless action. Reload between changes. Verify actual denied calls stay denied and ask-first creates a decision rather than executing early.
+
+### `test-and-maintain`
+
+Automated: [app detail tests](../ui/src/pages/apps/AppDetail.test.tsx) cover test-dialog/UI contracts. Real provider execution and revocation require the selected provider’s live check.
+
+Manual: Run a read-only action with explicit inputs and inspect returned data and activity. Refresh discovery and review new actions. Revoke or disconnect only the disposable credential, then verify subsequent use fails with an actionable reconnect state.
+
+## Gotchas
+
+- Connected does not imply an agent has access or an action is allowed.
+- Credential-only connections may replace tool-action controls with account-specific controls.
+- See [connection setup](./connection-setup.md) for auth and [questions and approvals](./questions-and-approvals.md) for pending action review.
diff --git a/feature-map/budgets-costs.md b/feature-map/budgets-costs.md
new file mode 100644
index 00000000000..e1a1efc5734
--- /dev/null
+++ b/feature-map/budgets-costs.md
@@ -0,0 +1,44 @@
+# Costs, budgets, and spending controls
+
+Operators inspect recorded spend and configure budget controls for the company, projects, and agents. Hard stops pause or prevent eligible work until the governing incident is resolved.
+
+Implementation: [costs and budget host](../ui/src/pages/Costs.tsx), [audit hub](../ui/src/pages/audit/AuditHub.tsx).
+
+## Sub-features
+
+- `cost-reporting`: inspect spend by the offered time range and resource dimensions.
+- `budgets`: configure supported company/project/agent limits and inspect usage.
+- `incidents`: distinguish warnings, hard stops, and manual pauses.
+- `resolution`: raise or resolve a budget incident through authorized controls and verify resumption.
+
+## How to get to it (user POV)
+
+### `cost-overview`
+
+Use Activity → Costs/Budgets in the streamlined shell, `/costs` in the production shell, or scoped project/agent budget panels.
+
+### `budget-enforcement`
+
+Open the governing budget configuration and any resulting budget incident card.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use synthetic low-cost events and small disposable budgets. Do not buy model usage merely to hit a threshold.
+
+### `cost-overview`
+
+Automated: [costs service](../server/src/__tests__/costs-service.test.ts) covers cost contracts; [embedded costs UI](../ui/src/pages/Costs.test.tsx) has narrow Audit-host coverage.
+
+Manual: Inspect a known fixture run and reconcile its recorded spend with the selected report period and resource. Switch company/project filters and reload. Check empty and unavailable cost data without treating missing data as zero spend.
+
+### `budget-enforcement`
+
+Automated: [budget service](../server/src/__tests__/budgets-service.test.ts) exercises soft incidents, hard stops, scope, and valid budget raises.
+
+Manual: Create a small fixture budget, cross its threshold with synthetic recorded spend, and verify the warning or hard-stop state. Attempt new work and confirm it is gated. Raise the correct budget through an authorized action and verify eligible continuation without clearing unrelated manual pauses.
+
+## Gotchas
+
+- Paperclip cost accounting is not a provider invoice or a promise about externally billed spend.
+- Company, project, and agent gates can overlap; fixing one may leave another active.
+- A successful retry must not bypass an unresolved budget hold.
diff --git a/feature-map/cases.md b/feature-map/cases.md
new file mode 100644
index 00000000000..10cde78e5eb
--- /dev/null
+++ b/feature-map/cases.md
@@ -0,0 +1,43 @@
+# Cases and structured work records
+
+The cases experiment exposes structured records with types, fields, parent/child relationships, activity, revisions, and related task work.
+
+Implementation: [case list](../ui/src/pages/Cases.tsx), [case detail](../ui/src/pages/CaseDetail.tsx).
+
+## Sub-features
+
+- `browse`: search, filter, sort, group, and navigate case records.
+- `structure`: inspect fields and parent/child relationships without losing matching descendants.
+- `history`: inspect revisions and activity for a record.
+- `task-links`: follow work associated with a case in both directions.
+
+## How to get to it (user POV)
+
+### `case-list`
+
+Open `/cases` and switch between available grouped/tree views.
+
+### `case-record`
+
+Open `/cases/:caseIdentifier` or a task’s linked case.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Enable cases and prepare related records with different types/statuses plus an associated task.
+
+### `case-list`
+
+Automated: [case list](../ui/src/pages/Cases.test.tsx) covers filters, persisted view state, and keyboard/tree behavior with mocked data.
+
+Manual: Search for a child, verify its parent context remains understandable, change filters/grouping/columns, and reload. Open the record by keyboard and direct link. Include empty results and terminal records.
+
+### `case-record`
+
+Automated: [case routes](../server/src/__tests__/cases-routes.test.ts) covers API behavior; [case fields](../ui/src/components/CaseFieldsPanel.test.tsx) covers field UI separately.
+
+Manual: Edit an offered field, reload, inspect its revision/activity, and follow child and task links. Verify cross-company and invalid field changes fail clearly. Distinguish a pipeline-owned item from a stand-alone case.
+
+## Gotchas
+
+- A case is not a task execution; inspect linked tasks to prove work occurred.
+- Feature gating and case-type schema determine which actions are available.
diff --git a/feature-map/chat-channels.md b/feature-map/chat-channels.md
new file mode 100644
index 00000000000..3399965dca4
--- /dev/null
+++ b/feature-map/chat-channels.md
@@ -0,0 +1,45 @@
+# External chat and email conversations
+
+People can talk to an assigned agent through configured external channels, bind their identity, exchange files, and inspect delivery state. Each provider has a different identity, threading, and attachment contract.
+
+Implementation: [endpoint setup](../ui/src/pages/apps/chat/ChatEndpointSetup.tsx), [endpoint detail](../ui/src/pages/apps/chat/ChatEndpointDetail.tsx), [email setup](../ui/src/pages/apps/chat/EmailEndpointSetup.tsx).
+
+## Sub-features
+
+- `providers`: configure the available Slack, Discord, Microsoft Teams, Telegram, GitHub, AgentMail, and experimental iMessage Photon paths; availability still depends on gates and provider support.
+- `identity`: link the external sender to the intended authorized Paperclip identity.
+- `conversation`: route inbound messages to the selected agent and send replies to the correct thread.
+- `attachments`: transfer supported files with inspectable delivery and failure states.
+- `lifecycle`: inspect endpoint activity, repair auth, and disable delivery when required.
+
+## How to get to it (user POV)
+
+### `external-thread`
+
+Message the configured bot/address from its external provider and follow the corresponding Paperclip conversation/task.
+
+### `endpoint-management`
+
+Open `/apps/chat/:endpointId/settings` and the endpoint’s other available tabs; identity confirmation uses `/chat-identity/confirm`.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Enable chat connectors and use a test provider account/channel with permission to send messages. Setup is covered in [connection setup](./connection-setup.md).
+
+### `external-thread`
+
+Automated: [channel integration](../server/src/__tests__/chat-channels.integration.test.ts) uses provider fixtures; it does not prove a live Slack, Discord, Teams, Telegram, GitHub, email, or Photon delivery.
+
+Manual: For each supported provider being changed, send a unique message, verify the intended agent/company receives it, and inspect the actual external reply in the original thread. Repeat with an unlinked/unauthorized sender, duplicate inbound delivery, and one supported attachment. Record provider-specific results separately.
+
+### `endpoint-management`
+
+Automated: [channel integration](../server/src/__tests__/chat-channels.integration.test.ts) covers shared endpoint/delivery behavior; live credential repair and provider ownership remain manual checks.
+
+Manual: Inspect the bound agent and identity, recent activity, and delivery failure details. Repair a disposable credential, retry a safe message when offered, and verify exactly one external reply. Disable the endpoint and confirm new traffic is not silently processed.
+
+## Gotchas
+
+- One provider’s passing fixture does not qualify another provider or live delivery.
+- An accepted send request does not prove the recipient received the message or file.
+- Use [steering](./steering.md) and [questions](./questions-and-approvals.md) for their channel-specific interaction checks.
diff --git a/feature-map/cli-operations.md b/feature-map/cli-operations.md
new file mode 100644
index 00000000000..34c95f01c6c
--- /dev/null
+++ b/feature-map/cli-operations.md
@@ -0,0 +1,55 @@
+# CLI, API clients, and local worktrees
+
+Operators and agents can work through explicit CLI/API context, manage domain resources, inspect runs, and create isolated local worktree instances for development.
+
+Implementation: [command registry](../cli/src/index.ts), [client context](../cli/src/commands/client/context.ts), [worktree commands](../cli/src/commands/worktree.ts).
+
+## Sub-features
+
+- `context`: choose instance/API base, profile, identity, and company explicitly.
+- `domain-commands`: read/write tasks, agents, projects, goals, approvals, routines, and other registered resources.
+- `outputs`: work with documents/assets/skills and inspect machine-readable results.
+- `run-controls`: invoke/inspect supported runs and observe actual outcomes.
+- `worktree-instances`: initialize, seed, diagnose, and clean up only an owned development instance.
+
+## How to get to it (user POV)
+
+### `client-context`
+
+Use `paperclipai context show/list/use/set`, auth/connect, and the registered resource command help.
+
+### `subresources-and-runs`
+
+Use issue subresource, asset/skill, and run/heartbeat commands exposed by the CLI help.
+
+### `worktree-instance`
+
+Use the documented worktree/test-drive commands in an owned checkout; inspect `paperclipai worktree --help` first.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use `--help` from the checked-out CLI to discover exact arguments. Select a disposable company and isolated context; do not inherit an unknown API target.
+
+### `client-context`
+
+Automated: [context](../cli/src/__tests__/context.test.ts), [HTTP client](../cli/src/__tests__/http.test.ts), and [operations parity](../cli/src/__tests__/operations-parity.test.ts) cover client contracts, not every live endpoint.
+
+Manual: Inspect the selected context and identity, list the disposable company’s resources, create a harmless task through the supported command, and verify it in the browser. Exercise an invalid token and wrong-company resource. Inspect JSON output and nonzero errors rather than only printed success text.
+
+### `subresources-and-runs`
+
+Automated: [issue subresources](../cli/src/__tests__/issue-subresources.test.ts) and [asset/skill parity](../cli/src/__tests__/admin-asset-skill-parity.test.ts) cover command/API contracts.
+
+Manual: Write a small task document or attach a fixture using the supported command, open it in the UI, and compare contents. Invoke eligible test work, inspect the resulting run ID/status/output, and verify denial when the actor lacks permission.
+
+### `worktree-instance`
+
+Automated: [worktree commands](../cli/src/__tests__/worktree.test.ts) and [test drive](../cli/src/__tests__/test-drive.test.ts) cover isolation/setup contracts.
+
+Manual: Initialize an owned disposable worktree instance, inspect its printed paths and ports, verify health and login, and confirm any seed data belongs to the intended source. Stop and clean up only that instance; inspect preserved work before deleting any checkout.
+
+## Gotchas
+
+- API success proves its contract, not the equivalent browser creation journey.
+- The CLI command registry is broader than the UI page inventory; new command families need a recipe review.
+- See [instance operations](./instance-operations.md) for install/update/backup and feature-specific recipes for domain behavior.
diff --git a/feature-map/companies.md b/feature-map/companies.md
new file mode 100644
index 00000000000..d0ce6853189
--- /dev/null
+++ b/feature-map/companies.md
@@ -0,0 +1,44 @@
+# Companies and portability
+
+An operator can switch between companies, change their identity and settings, archive them, and preview an import or export. Each company remains a separate scope for work and agents.
+
+Implementation: [companies](../ui/src/pages/Companies.tsx), [settings](../ui/src/pages/CompanySettings.tsx), [import](../ui/src/pages/CompanyImport.tsx), [export](../ui/src/pages/CompanyExport.tsx).
+
+## Sub-features
+
+- `selection`: create/select a company and keep navigation in its scope.
+- `identity`: update company identity and configured settings.
+- `archive`: archive and restore through the available controls without confusing archival with deletion.
+- `portability`: preview a company package and inspect imported agents, projects, skills, and conflicts.
+
+## How to get to it (user POV)
+
+### `company-switcher`
+
+Use the company switcher or `/companies`, then enter company Settings.
+
+### `package-transfer`
+
+Use `/company/export` and `/company/import` where enabled, or the corresponding CLI company commands.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use two disposable companies and a small package fixture. Record cloud-managed restrictions and visible settings gates.
+
+### `company-switcher`
+
+Automated: [company list](../ui/src/pages/Companies.test.tsx) and [archive UI](../ui/src/pages/CompanySettingsArchive.test.tsx) cover UI behavior with mocks.
+
+Manual: Create or select a company, rename it, and reload. Switch to the second company and back; verify tasks, agents, and settings follow the selection. Archive the disposable company and verify its visibility and offered restoration path.
+
+### `package-transfer`
+
+Automated: [portability routes](../server/src/__tests__/company-portability-routes.test.ts) and [CLI import/export](../cli/src/__tests__/company-import-export-e2e.test.ts) cover package and command behavior, not every external Git host.
+
+Manual: Export a small company, inspect the package preview, and import into a disposable target. Verify counts, references, conflict choices, and agent configuration. Run one imported task after supplying its required local credentials. Confirm source company data is unchanged.
+
+## Gotchas
+
+- Package presence does not prove a runnable imported company; credentials and environment bindings need separate verification.
+- Company deletion is a distinct gated operation; do not use it as the archive test.
+- Settings hidden in a managed deployment should be recorded as unavailable, not bypassed.
diff --git a/feature-map/connection-setup.md b/feature-map/connection-setup.md
new file mode 100644
index 00000000000..00c9328a9ae
--- /dev/null
+++ b/feature-map/connection-setup.md
@@ -0,0 +1,150 @@
+# Connection setup
+
+People connect an app or account, choose who may use it, and recover incomplete
+setup from either Apps or a task that needs access. A saved draft, a completed
+provider login, a usable connection, and a resumed task are separate checkpoints.
+Chat channels additionally require an endpoint and linked sender identity.
+
+## Sub-features
+
+- `catalog`: find a provider, inspect its available methods, and open setup;
+ unavailable methods explain their prerequisite rather than silently switching.
+- `identity-and-access`: select personal/shared identity and eligible agents;
+ an empty explicit selection and company-wide access must not be confused.
+- `credentials`: provider sign-in, key, or generic MCP URL follows its supported
+ setup method; credentials are not retained in browser draft storage.
+- `handoff`: provider popup/full-page callback returns to the correct setup
+ host with the original task intent and identity choice intact.
+- `draft-recovery`: cancel, Back, Save & exit, reload, Finish setup, and reconnect
+ preserve the exact draft rather than creating duplicate connections.
+- `task-request`: only the addressed person resolves the requested connection;
+ usable access releases the pending task request through normal continuation.
+- `channel-setup`: provider endpoint, represented agent, linked sender, and
+ communication instructions are configured before an external message is used.
+- `failure`: denied login, unreachable/private URL, expired credentials, and
+ permission errors leave an actionable state rather than a false success.
+
+## How to get to it (user POV)
+
+### `apps-catalog`
+
+Open Apps (`/apps`), choose an app, and connect from its landing page. Select an
+available method and access, then complete setup. Existing connections open
+their details; unfinished ones offer a way to finish setup.
+
+### `mcp-link`
+
+Use **Connect with a link** or `/apps/byo` for a generic MCP server. Paste its
+URL, select access, and follow the probe's sign-in/key guidance. Provider-specific
+catalog setup and a generic endpoint may use different flows.
+
+### `task-request`
+
+Open the task's pending connection request and its setup action as the named
+user. Setup can open in a task dialog and may use an OAuth popup. Follow the
+request's original link if setup falls back to a standalone page.
+
+### `resume-connection`
+
+From Apps or connection details, use Finish setup, reconnect, or the offered
+authentication recovery action. Reload or return from the provider before
+checking whether the same saved connection became usable.
+
+### `chat-channel`
+
+With chat connectors enabled, select a supported chat/email provider in Apps
+or open `/apps/chat/connect`. Complete that provider's endpoint setup, then
+open its settings (`/apps/chat/:endpointId/settings`). Follow identity linking
+as the intended sender before messaging the agent externally.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey).
+Choose a disposable provider account/resource and record its auth method,
+deployment mode, account ownership, and access selection. For live setup, use
+the provider's documented prerequisites in the
+[connector playbook](../doc/connections/CONNECTOR-PLAYBOOK.md). Automated fixtures
+do not establish OAuth registration, public callbacks, or production provider access.
+
+### `apps-catalog`
+
+Automated: [Browse](../ui/src/pages/apps/Browse.test.tsx),
+[unconnected app](../ui/src/pages/apps/AppNotConnected.test.tsx), and
+[AppsConnect](../ui/src/pages/apps/AppsConnect.test.tsx) cover catalog entry,
+access selection, provider-specific method choices, and setup failures with
+mocked APIs. [Connection intents](../tests/e2e/connection-intents.spec.ts)
+drives store and task setup against one fake provider through a useful continuation:
+
+```sh
+pnpm exec vitest run ui/src/pages/apps/Browse.test.tsx ui/src/pages/apps/AppsConnect.test.tsx
+pnpm exec playwright test -c tests/e2e/playwright.config.ts tests/e2e/connection-intents.spec.ts
+```
+
+Manual: connect from an unconnected provider landing. Select the intended
+identity and agent access, complete authentication, reload, and inspect the
+saved connection. Run a permitted read-only action with an eligible agent and
+verify its useful result. Try an ineligible agent and confirm denial. Repeat
+with a user who cannot install company-wide; the UI must not imply broad access.
+
+### `mcp-link`
+
+Automated: AppsConnect's generic MCP cases cover probe-driven auth, private or
+unreachable endpoints, preregistered clients, secret-backed headers, and unsafe
+authorization URLs. These are component/API mocks, not remote provider proof.
+
+Manual: connect a known test MCP URL through the link flow, verify its saved
+endpoint and a read-only action, then repeat with a bad URL and wrong credential.
+The error should explain the next action and preserve non-secret setup context.
+Test no-auth and authenticated endpoints separately; never infer one from the other.
+
+### `task-request`
+
+Automated: [interaction card](../ui/src/components/IssueThreadInteractionCard.test.tsx)
+checks addressed-user controls. AppsConnect tests cover page/dialog parity,
+task-bound OAuth, popup handoff, and verifying a saved connection before closing.
+The connection-intents browser suite above exercises fixture-backed continuation.
+
+Manual: ask an agent to use an unavailable app, open its request as the named
+user, and complete setup in the dialog. Verify the card settles, the exact task
+resumes, and the agent returns a useful provider result. Repeat the page-host
+fallback and denied OAuth path. As another user, confirm that merely seeing the
+task does not grant the right to resolve the request.
+
+### `resume-connection`
+
+Automated: AppsConnect tests cover exact-draft resume, declined OAuth, reconnect
+lookup failure/retry, response-lost creation, archived connection revival, and
+saved account reuse. [App detail](../ui/src/pages/apps/AppDetail.test.tsx) covers
+the connection host. These tests do not complete a real provider login.
+
+Manual: leave setup through its footer, reload Apps, choose Finish setup, and
+confirm the same connection is resumed. Decline provider login and recover from
+that checkpoint. Reconnect an expired disposable account and verify a permitted
+action afterwards. Count connections before/after to catch accidental duplicates.
+
+### `chat-channel`
+
+Automated: [setup routing](../ui/src/pages/apps/chat/ChatEndpointSetup.routing.test.tsx),
+[saved setup state](../ui/src/pages/apps/chat/ChatEndpointSetup.state.test.ts),
+[email setup](../ui/src/pages/apps/chat/EmailEndpointSetup.test.tsx), and
+[identity confirmation](../ui/src/pages/apps/chat/ChatIdentityConfirm.test.tsx)
+cover shared UI logic with fixtures. Provider-specific live setup is not implied.
+
+Manual: complete setup for one named provider, reload endpoint settings, link
+the intended sender, and send a disposable message. Verify one task and a useful
+reply in the originating conversation. Inspect an unlinked sender's denial and
+the endpoint's pause behavior. Repeat independently for each provider at issue;
+Slack setup does not qualify Discord, Telegram, GitHub, email, or iMessage.
+
+## Gotchas
+
+- A successful OAuth callback is not proof of saved connection access or task
+ continuation. Verify all three checkpoints.
+- Personal identity, shared account access, and per-agent access are distinct.
+ Connecting an account does not waive an Off action or Ask first review.
+- A tool app connection is not a chat endpoint. The same provider can offer both.
+- Old Apps/Connections URLs can redirect to Apps. Use the current navigation and
+ record the actual destination rather than documenting an obsolete screen.
+- Full provider matrix, AI-account selection, gateway/profile administration,
+ and account revocation lifecycles remain outside this seed recipe.
+- For governed actions after setup, use [questions and approvals](./questions-and-approvals.md).
diff --git a/feature-map/coverage.json b/feature-map/coverage.json
new file mode 100644
index 00000000000..7fc99df425e
--- /dev/null
+++ b/feature-map/coverage.json
@@ -0,0 +1,401 @@
+{
+ "version": 1,
+ "areas": [
+ {
+ "id": "tasks-and-attention",
+ "title": "Tasks, conversations, and attention",
+ "status": "partial",
+ "features": [
+ "tasks.md",
+ "task-coordination.md",
+ "inbox-search.md",
+ "agent-chat.md",
+ "questions-and-approvals.md",
+ "steering.md",
+ "recovery.md",
+ "documents-artifacts.md"
+ ],
+ "gap": "Recipes cover the main task/conversation/attention workflows. Full shell, permission, attachment, long-thread, and concurrency permutations remain to be enumerated.",
+ "paths": [
+ "ui/src/pages/AgentChat.tsx",
+ "ui/src/pages/AgentChats.tsx",
+ "ui/src/pages/BoardChat.tsx",
+ "ui/src/pages/DecisionQueuePage.tsx",
+ "ui/src/pages/Inbox.tsx",
+ "ui/src/pages/IssueDetail.tsx",
+ "ui/src/pages/Issues.tsx",
+ "ui/src/pages/LegacyInbox.tsx",
+ "ui/src/pages/MyIssues.tsx",
+ "ui/src/pages/Search.tsx",
+ "ui/src/pages/WhatNeedsMe.tsx"
+ ]
+ },
+ {
+ "id": "agents",
+ "title": "Agents, organization, and runtime setup",
+ "status": "partial",
+ "features": [
+ "agents.md",
+ "runs-adapters.md",
+ "skills.md",
+ "app-permissions.md",
+ "recovery.md",
+ "execution-environments.md"
+ ],
+ "gap": "Per-harness/model/account capabilities, every instruction-file error, and complete built-in-agent lifecycle variants remain separate qualification matrices.",
+ "paths": [
+ "ui/src/pages/AdapterManager.tsx",
+ "ui/src/pages/AgentDetail.production.tsx",
+ "ui/src/pages/AgentDetail.tsx",
+ "ui/src/pages/AgentToolsTab.tsx",
+ "ui/src/pages/Agents.production.tsx",
+ "ui/src/pages/Agents.tsx",
+ "ui/src/pages/NewAgent.tsx",
+ "ui/src/pages/Org.tsx",
+ "ui/src/pages/OrgChart.production.tsx",
+ "ui/src/pages/OrgChart.tsx"
+ ]
+ },
+ {
+ "id": "apps",
+ "title": "App catalog and connection setup",
+ "status": "partial",
+ "features": [
+ "connection-setup.md",
+ "app-permissions.md",
+ "questions-and-approvals.md"
+ ],
+ "gap": "Provider-specific authentication/revocation, credential-only accounts, and aggregator administrative variants still need their own detailed matrices.",
+ "paths": [
+ "ui/src/pages/apps/AggregatorAppManager.tsx",
+ "ui/src/pages/apps/AggregatorConnectDialog.tsx",
+ "ui/src/pages/apps/AppDetail.tsx",
+ "ui/src/pages/apps/AppLogo.tsx",
+ "ui/src/pages/apps/AppNotConnected.tsx",
+ "ui/src/pages/apps/AppsConnect.tsx",
+ "ui/src/pages/apps/AppsReview.tsx",
+ "ui/src/pages/apps/ArcadeDiscoverySetup.tsx",
+ "ui/src/pages/apps/Browse.tsx",
+ "ui/src/pages/apps/CatalogSourceFilters.tsx",
+ "ui/src/pages/apps/ComposioAppManager.tsx",
+ "ui/src/pages/apps/ComposioAppSetup.tsx",
+ "ui/src/pages/apps/ConnectionProvenanceChip.tsx",
+ "ui/src/pages/apps/Connections.tsx",
+ "ui/src/pages/apps/ExecutorManagementSetup.tsx",
+ "ui/src/pages/apps/PaperclipCloudOAuthHandoff.tsx",
+ "ui/src/pages/apps/ReviewQueueCard.tsx",
+ "ui/src/pages/apps/UnverifiedServerBadge.tsx",
+ "ui/src/pages/apps/app-detail/ActionTestDialog.tsx",
+ "ui/src/pages/apps/app-detail/ActivityPanel.tsx",
+ "ui/src/pages/apps/app-detail/AdvancedPanel.tsx",
+ "ui/src/pages/apps/app-detail/AgentConnectionAccess.tsx",
+ "ui/src/pages/apps/app-detail/BrowserUseSettingsPanel.tsx",
+ "ui/src/pages/apps/app-detail/ConnectedAggregatorApps.tsx",
+ "ui/src/pages/apps/app-detail/IdentitiesSection.tsx",
+ "ui/src/pages/apps/app-detail/PermissionsPanel.tsx",
+ "ui/src/pages/apps/app-detail/RailwayAccessPanel.tsx",
+ "ui/src/pages/apps/app-detail/ReviewPanel.tsx",
+ "ui/src/pages/apps/app-detail/SetupPanel.tsx",
+ "ui/src/pages/apps/connection-owner.tsx"
+ ]
+ },
+ {
+ "id": "chat-channels",
+ "title": "Chat and email channel setup",
+ "status": "partial",
+ "features": [
+ "chat-channels.md",
+ "connection-setup.md",
+ "questions-and-approvals.md",
+ "steering.md"
+ ],
+ "gap": "Shared recipes name provider checks; each provider transport/thread/identity/file-size/type combination needs separate live evidence and deeper instructions.",
+ "paths": [
+ "ui/src/pages/apps/chat/ChatCommunicationInstructions.tsx",
+ "ui/src/pages/apps/chat/ChatEndpointDetail.tsx",
+ "ui/src/pages/apps/chat/ChatEndpointSetup.tsx",
+ "ui/src/pages/apps/chat/ChatIdentityConfirm.tsx",
+ "ui/src/pages/apps/chat/EmailEndpointSetup.tsx",
+ "ui/src/pages/apps/chat/GitHubBotConfiguration.tsx",
+ "ui/src/pages/apps/chat/GitHubBotManagement.tsx",
+ "ui/src/pages/apps/chat/GitHubChatSetup.tsx",
+ "ui/src/pages/apps/chat/GitHubSetupPrompt.tsx",
+ "ui/src/pages/apps/chat/PhotonConnectStep.tsx",
+ "ui/src/pages/apps/chat/SetupPrompt.tsx",
+ "ui/src/pages/apps/chat/SlackAvatarStep.tsx",
+ "ui/src/pages/apps/chat/SlackIdentityStep.tsx",
+ "ui/src/pages/apps/chat/SlackSetupPrompt.tsx",
+ "ui/src/pages/apps/chat/SlackToolSettings.tsx"
+ ]
+ },
+ {
+ "id": "skills-and-teams",
+ "title": "Skills, Skill Studio, and teams",
+ "status": "partial",
+ "features": [
+ "skills.md",
+ "teams.md",
+ "questions-and-approvals.md"
+ ],
+ "gap": "Main library/Studio/source/policy and CLI team-install paths are mapped. Full source-provider conflicts, harness sync, and remote package variants remain; catalog UI is not a current top-level route.",
+ "paths": [
+ "ui/src/pages/CompanySkills.production.tsx",
+ "ui/src/pages/CompanySkills.tsx",
+ "ui/src/pages/SkillSources.tsx",
+ "ui/src/pages/SkillStudio.tsx",
+ "ui/src/pages/TeamCatalog.tsx",
+ "ui/src/pages/agent-skills/AgentSkillReleasePicker.tsx",
+ "ui/src/pages/agent-skills/AgentSkillRow.tsx",
+ "ui/src/pages/agent-skills/AgentSkillsTab.tsx",
+ "ui/src/pages/skills/ImportSkillsFromProjectDialog.tsx",
+ "ui/src/pages/skills/SkillImportProgress.tsx",
+ "ui/src/pages/skills/SkillPackagePreview.tsx",
+ "ui/src/pages/skills/SkillSourceTree.tsx"
+ ]
+ },
+ {
+ "id": "projects-and-workspaces",
+ "title": "Projects and execution workspaces",
+ "status": "partial",
+ "features": [
+ "projects.md",
+ "workspaces.md",
+ "goals.md",
+ "execution-environments.md",
+ "budgets-costs.md",
+ "recovery.md"
+ ],
+ "gap": "Provider-specific provisioning, multi-repository/submodule edge cases, Git reconciliation variants, and all service exposure combinations require deeper recipes.",
+ "paths": [
+ "ui/src/pages/ExecutionWorkspaceDetail.tsx",
+ "ui/src/pages/ProjectDetail.tsx",
+ "ui/src/pages/ProjectWorkspaceDetail.tsx",
+ "ui/src/pages/Projects.tsx",
+ "ui/src/pages/Workspaces.tsx"
+ ]
+ },
+ {
+ "id": "formal-approvals",
+ "title": "Formal governance approvals",
+ "status": "partial",
+ "features": [
+ "questions-and-approvals.md",
+ "task-coordination.md",
+ "agents.md"
+ ],
+ "gap": "Formal board decisions and signoff have recipes; every approval payload/type and actor/host error permutation is not enumerated.",
+ "paths": [
+ "ui/src/pages/ApprovalDetail.tsx",
+ "ui/src/pages/Approvals.tsx"
+ ]
+ },
+ {
+ "id": "auth-and-access",
+ "title": "Login, invitations, and access",
+ "status": "partial",
+ "features": [
+ "onboarding.md",
+ "access.md",
+ "navigation-preferences.md",
+ "cli-operations.md"
+ ],
+ "gap": "Deployment modes and core login/invite/member/token paths are mapped; exhaustive identity-provider, expiry, role, and resource-policy combinations remain.",
+ "paths": [
+ "ui/src/pages/Auth.tsx",
+ "ui/src/pages/BoardClaim.tsx",
+ "ui/src/pages/CliAuth.tsx",
+ "ui/src/pages/CompanyAccess.tsx",
+ "ui/src/pages/InstanceAccess.tsx",
+ "ui/src/pages/InviteLanding.tsx",
+ "ui/src/pages/JoinRequestQueue.tsx",
+ "ui/src/pages/UserProfile.tsx"
+ ]
+ },
+ {
+ "id": "company-and-instance",
+ "title": "Company and instance administration",
+ "status": "partial",
+ "features": [
+ "companies.md",
+ "onboarding.md",
+ "instance-operations.md",
+ "execution-environments.md",
+ "navigation-preferences.md"
+ ],
+ "gap": "Core administration/import/export/operator workflows are mapped; cloud/self-hosted differences, migration/restore compatibility, and platform-specific service variants need deeper recipes.",
+ "paths": [
+ "ui/src/pages/Companies.tsx",
+ "ui/src/pages/CompanyEnvironments.tsx",
+ "ui/src/pages/CompanyExport.tsx",
+ "ui/src/pages/CompanyImport.tsx",
+ "ui/src/pages/CompanySettings.tsx",
+ "ui/src/pages/InstanceExperimentalSettings.tsx",
+ "ui/src/pages/InstanceGeneralSettings.tsx",
+ "ui/src/pages/ProfileSettings.tsx"
+ ]
+ },
+ {
+ "id": "goals-costs-and-activity",
+ "title": "Goals, dashboards, costs, and activity",
+ "status": "partial",
+ "features": [
+ "goals.md",
+ "budgets-costs.md",
+ "activity.md",
+ "runs-adapters.md",
+ "routines.md"
+ ],
+ "gap": "Core goal/report/budget/audit journeys are mapped. Every aggregation/filter combination, cost source, and overlapping budget window still needs dedicated cases.",
+ "paths": [
+ "ui/src/pages/Costs.production.tsx",
+ "ui/src/pages/Costs.tsx",
+ "ui/src/pages/Dashboard.tsx",
+ "ui/src/pages/DashboardLive.tsx",
+ "ui/src/pages/GoalDetail.tsx",
+ "ui/src/pages/Goals.tsx",
+ "ui/src/pages/Timeline.tsx",
+ "ui/src/pages/audit/AuditFeed.production.tsx",
+ "ui/src/pages/audit/AuditFeed.tsx",
+ "ui/src/pages/audit/AuditHub.tsx",
+ "ui/src/pages/audit/AuditRuns.tsx",
+ "ui/src/pages/audit/CompanyActivity.production.tsx",
+ "ui/src/pages/audit/CompanyActivity.tsx",
+ "ui/src/pages/audit/RoutineAuditActivity.tsx"
+ ]
+ },
+ {
+ "id": "artifacts",
+ "title": "Artifacts and work products",
+ "status": "partial",
+ "features": [
+ "documents-artifacts.md"
+ ],
+ "gap": "Document/attachment/library/work-product journeys are mapped; every media preview type, storage backend, annotation conflict, and runtime-resource lifecycle variant remains separate.",
+ "paths": [
+ "ui/src/pages/Artifacts.tsx"
+ ]
+ },
+ {
+ "id": "routines-and-pipelines",
+ "title": "Routines, pipelines, cases, and status cards",
+ "status": "partial",
+ "features": [
+ "routines.md",
+ "pipelines.md",
+ "cases.md",
+ "status-cards.md"
+ ],
+ "gap": "All four capabilities have recipes. Trigger/provider/timezone combinations, custom case schemas, stage automation types, and summarizer quality need deeper cases.",
+ "paths": [
+ "ui/src/pages/CaseDetail.tsx",
+ "ui/src/pages/Cases.tsx",
+ "ui/src/pages/PipelineSettings.tsx",
+ "ui/src/pages/Pipelines.tsx",
+ "ui/src/pages/RoutineDetail.production.tsx",
+ "ui/src/pages/RoutineDetail.tsx",
+ "ui/src/pages/Routines.production.tsx",
+ "ui/src/pages/Routines.tsx",
+ "ui/src/pages/StatusCards/ArchivedStatusCardRow.tsx",
+ "ui/src/pages/StatusCards/CreateStatusCardDialog.tsx",
+ "ui/src/pages/StatusCards/StatusCardDetailDrawer.tsx",
+ "ui/src/pages/StatusCards/StatusCardSettingsForm.tsx",
+ "ui/src/pages/StatusCards/StatusCardTile.tsx",
+ "ui/src/pages/StatusCards/SummarizerAgentSelect.tsx",
+ "ui/src/pages/StatusCards/index.tsx"
+ ]
+ },
+ {
+ "id": "secrets",
+ "title": "Secrets and secret proposals",
+ "status": "partial",
+ "features": [
+ "secrets.md",
+ "access.md",
+ "app-permissions.md"
+ ],
+ "gap": "Company/user/proposal/vault and runtime-binding paths are mapped; every secret provider, rotation scenario, and delivery context needs separate validation.",
+ "paths": [
+ "ui/src/pages/Secrets.tsx",
+ "ui/src/pages/secrets/ImportFromVaultDialog.tsx",
+ "ui/src/pages/secrets/MissingUserSecretsBanner.tsx",
+ "ui/src/pages/secrets/MyUserSecretsTab.tsx",
+ "ui/src/pages/secrets/ProposalsTab.tsx",
+ "ui/src/pages/secrets/SecretPathName.tsx",
+ "ui/src/pages/secrets/SetMyUserSecretDialog.tsx",
+ "ui/src/pages/secrets/UserSecretDefinitionsTab.tsx",
+ "ui/src/pages/secrets/proposal-review.tsx",
+ "ui/src/pages/secrets/user-secret-presentation.tsx"
+ ]
+ },
+ {
+ "id": "plugins-and-tools",
+ "title": "Plugins, gateways, and tool profiles",
+ "status": "partial",
+ "features": [
+ "plugins.md",
+ "gateways-profiles.md",
+ "app-permissions.md",
+ "execution-environments.md"
+ ],
+ "gap": "Host plugin/gateway/profile lifecycles are mapped. Third-party plugin behaviors and every client transport/provider combination are outside host-wide coverage.",
+ "paths": [
+ "ui/src/pages/CompanySettingsPluginPage.tsx",
+ "ui/src/pages/PluginManager.tsx",
+ "ui/src/pages/PluginPage.tsx",
+ "ui/src/pages/PluginSettings.tsx",
+ "ui/src/pages/apps/gateways/ConnectClientDialog.tsx",
+ "ui/src/pages/apps/gateways/CopyableGatewayUrl.tsx",
+ "ui/src/pages/apps/gateways/EditGatewayDialog.tsx",
+ "ui/src/pages/apps/gateways/GatewayDetail.tsx",
+ "ui/src/pages/apps/gateways/GatewaysList.tsx",
+ "ui/src/pages/apps/gateways/NewGatewayDialog.tsx",
+ "ui/src/pages/apps/gateways/panels/AppsToolsPanel.tsx",
+ "ui/src/pages/apps/gateways/panels/GatewayActivityPanel.tsx",
+ "ui/src/pages/apps/gateways/panels/GatewayAdvancedPanel.tsx",
+ "ui/src/pages/apps/gateways/panels/OverviewPanel.tsx",
+ "ui/src/pages/apps/gateways/panels/TokensPanel.tsx",
+ "ui/src/pages/tools/AdvancedToolsRoute.tsx",
+ "ui/src/pages/tools/AuditTab.tsx",
+ "ui/src/pages/tools/GatewaysTab.tsx",
+ "ui/src/pages/tools/McpConfigHelpDialog.tsx",
+ "ui/src/pages/tools/PasteConfigTab.tsx",
+ "ui/src/pages/tools/ProfilesTab.tsx",
+ "ui/src/pages/tools/SmokeLabTab.tsx",
+ "ui/src/pages/tools/ToolsAccess.tsx",
+ "ui/src/pages/tools/connection-dialogs.tsx",
+ "ui/src/pages/tools/profiles/ProfileActionDialog.tsx",
+ "ui/src/pages/tools/profiles/ProfileDetail.tsx",
+ "ui/src/pages/tools/profiles/ProfileDetailRoute.tsx",
+ "ui/src/pages/tools/profiles/ProfileWizard.tsx",
+ "ui/src/pages/tools/profiles/ProfileWizardRoute.tsx",
+ "ui/src/pages/tools/profiles/ProfilesIndex.tsx",
+ "ui/src/pages/tools/profiles/ToolsAdminGate.tsx",
+ "ui/src/pages/tools/profiles/WizardToolsStep.tsx",
+ "ui/src/pages/tools/shared.tsx"
+ ]
+ },
+ {
+ "id": "labs-and-fallbacks",
+ "title": "Developer labs and fallback pages",
+ "status": "partial",
+ "features": [
+ "developer-labs.md",
+ "navigation-preferences.md"
+ ],
+ "gap": "Developer and fallback surfaces are identified. Each synthetic fixture and performance budget is not a production journey and needs its own measurement.",
+ "paths": [
+ "ui/src/pages/BootstrapSetupUxLab.tsx",
+ "ui/src/pages/CrossIssueCollaborationUxLab.tsx",
+ "ui/src/pages/DesignGuide.tsx",
+ "ui/src/pages/InviteUxLab.tsx",
+ "ui/src/pages/IssueChatLongThreadPerf.tsx",
+ "ui/src/pages/IssueChatUxLab.tsx",
+ "ui/src/pages/NotFound.tsx",
+ "ui/src/pages/ResponsibleUserDenialUxLab.tsx",
+ "ui/src/pages/RunTranscriptUxLab.tsx",
+ "ui/src/pages/SystemNoticeUxLab.tsx",
+ "ui/src/pages/TaskChatLab.tsx"
+ ]
+ }
+ ]
+}
diff --git a/feature-map/developer-labs.md b/feature-map/developer-labs.md
new file mode 100644
index 00000000000..dc9a7fbec05
--- /dev/null
+++ b/feature-map/developer-labs.md
@@ -0,0 +1,43 @@
+# Developer previews and diagnostic labs
+
+Contributors can inspect design examples, interaction labs, and performance fixtures. These are development surfaces and do not count as production feature verification.
+
+Implementation: [route registration](../ui/src/App.tsx), [design guide](../ui/src/pages/DesignGuide.tsx), [long-thread fixture](../ui/src/pages/IssueChatLongThreadPerf.tsx).
+
+## Sub-features
+
+- `design`: inspect shared components and layout examples in the design guide or Storybook.
+- `interaction-labs`: exercise synthetic bootstrap, task-chat, denial, and collaboration states.
+- `performance`: measure the provided long-thread fixture with known data and environment.
+- `route-gates`: distinguish dev-only, experimental, historical, and fallback surfaces.
+
+## How to get to it (user POV)
+
+### `preview-lab`
+
+Use `/design-guide`, registered `/ux-lab/...` routes, or Storybook; consult `ui/src/App.tsx` for the current gated set.
+
+### `performance-fixture`
+
+Open `/tests/perf/long-thread` only in an appropriate development environment.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a development/test environment. Confirm the route is registered for the current build before claiming the page is available.
+
+### `preview-lab`
+
+Automated: [onboarding variant](../ui/src/components/OnboardingWizardVariant.test.tsx) is an example component contract. There is no claim of full automated acceptance coverage for every lab page.
+
+Manual: Open the specific fixture state, inspect controls and layout, then repeat the affected interaction in the actual product host. Report fixture results separately from persisted task/company results.
+
+### `performance-fixture`
+
+Automated: [task thread component](../ui/src/components/IssueChatThread.test.tsx) does not establish a performance budget. Timing/scroll measurements need a dedicated browser run.
+
+Manual: Record browser/build/data size, exercise scrolling and composing in the fixture, and retain timing or trace evidence. Confirm a representative real task does not regress before extrapolating fixture measurements.
+
+## Gotchas
+
+- An unmounted or obsolete lab file remains in the conservative page inventory but is not a shipped entry point.
+- Screenshots of a lab do not prove live provider behavior, persistence, or authorization.
diff --git a/feature-map/documents-artifacts.md b/feature-map/documents-artifacts.md
new file mode 100644
index 00000000000..39d96ade8bd
--- /dev/null
+++ b/feature-map/documents-artifacts.md
@@ -0,0 +1,55 @@
+# Documents, attachments, and work products
+
+People read and revise task documents, annotate specific content, open attached files, and inspect the outputs an agent hands back. The artifact library provides another route to the same work.
+
+Implementation: [task documents](../ui/src/components/IssueDocumentsSection.tsx), [artifact library](../ui/src/pages/Artifacts.tsx), [document panel](../ui/src/components/task-side-panel/TaskDocumentPanel.tsx).
+
+## Sub-features
+
+- `documents`: edit versioned task documents and inspect or restore revisions.
+- `annotations`: attach feedback to document content and inspect resolution state.
+- `attachments`: upload, preview, and download allowed files with company access checks.
+- `work-products`: link deliverables to their source task, resource, and review context.
+- `library`: search, filter, group, and open artifact stacks.
+
+## How to get to it (user POV)
+
+### `task-document`
+
+Open a document from the task thread or document side panel.
+
+### `task-output`
+
+Open an attachment, output card, or file link from a task.
+
+### `artifact-library`
+
+Open `/artifacts` and its grouping, search, and media controls.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a task with a text document, a small attachment, and a generated work product. Use nonsensitive fixture files.
+
+### `task-document`
+
+Automated: [documents service](../server/src/__tests__/documents-service.test.ts), [annotations](../server/src/__tests__/document-annotations-service.test.ts), and [revision restore](../server/src/__tests__/issue-document-restore-routes.test.ts) cover server contracts.
+
+Manual: Edit a paragraph, save, reload, and compare revisions. Add an annotation to a specific selection and inspect it after another edit. Resolve it through the supported action. Restore a disposable revision and confirm the new current document and history agree.
+
+### `task-output`
+
+Automated: [attachment routes](../server/src/__tests__/issue-attachment-routes.test.ts) and [work products](../server/src/__tests__/work-products.test.ts) cover data/access behavior; [artifact arrival browser suite](../tests/e2e/artifact-tab-arrival.spec.ts) targets the arrival experience.
+
+Manual: Upload a fixture and have the test task produce an output. Preview and download each, compare the contents, and follow the source task link. Reload and test an inaccessible user/company; verify missing workspace-only resources have an explicit state.
+
+### `artifact-library`
+
+Automated: [artifact page](../ui/src/pages/Artifacts.test.tsx) covers grouping, search requests, and pagination using mocks.
+
+Manual: Find the task’s output through search and grouping, open its stack, page through results, and reload a direct stack link. Confirm the same file/content appears as from the task.
+
+## Gotchas
+
+- A local path is not automatically an uploaded artifact accessible to another user.
+- A preview screenshot is not proof that download bytes or revision references are correct.
+- Version conflicts and stale annotations must stay visible rather than silently targeting different content.
diff --git a/feature-map/execution-environments.md b/feature-map/execution-environments.md
new file mode 100644
index 00000000000..feb89f353d7
--- /dev/null
+++ b/feature-map/execution-environments.md
@@ -0,0 +1,45 @@
+# Local, SSH, and sandbox environments
+
+Operators configure where agents execute, probe readiness, select an environment for work, and inspect remote provisioning or custom-image state when the installed provider supports it.
+
+Implementation: [environment settings](../ui/src/pages/CompanyEnvironments.tsx), [environment runtime](../server/src/services/environment-runtime.ts).
+
+## Sub-features
+
+- `configuration`: inspect local environments and configure available SSH/sandbox targets.
+- `capabilities`: select only drivers/providers that advertise the required execution capability.
+- `probe`: test reachability and runtime prerequisites in the actual target.
+- `assignment`: bind the intended agent/project/workspace to its execution target.
+- `images`: inspect supported sandbox custom-image preparation and terminal workflows.
+
+## How to get to it (user POV)
+
+### `environment-settings`
+
+Open Settings → Environments, then create/edit a supported target.
+
+### `remote-execution`
+
+Choose the environment in agent/project/workspace configuration, then inspect the resulting task/run and workspace.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use an owned disposable target and a supported provider plugin. Record provider, target identity, account, and spending constraints before a live remote run.
+
+### `environment-settings`
+
+Automated: [environment UI](../ui/src/pages/CompanyEnvironments.test.tsx), [driver configuration UI](../ui/src/pages/CompanySettings.test.tsx), and [environment service](../server/src/__tests__/environment-service.test.ts) cover configuration behavior.
+
+Manual: Save a disposable target, reload it, and run its available probe. Verify both success and missing-credential/reachability errors identify the target. Confirm unavailable providers are not offered as working run targets.
+
+### `remote-execution`
+
+Automated: [execution target](../server/src/__tests__/environment-execution-target.test.ts) and [custom images](../server/src/__tests__/environment-custom-images-service.test.ts) cover contracts; [SSH live test](../server/src/__tests__/environment-live-ssh.test.ts) requires its own external setup.
+
+Manual: Run a bounded command in the intended target, inspect its output and workspace, and verify execution did not silently fall back to the server host. For custom-image changes, build/probe the disposable image before assigning it. Inspect cleanup and shutdown after the run.
+
+## Gotchas
+
+- A probe is narrower evidence than a complete task with tools, files, and resumption.
+- The local option may appear only when editing an existing local environment; availability follows current UI/provider capabilities.
+- Workspace service reachability and environment reachability are separate checks.
diff --git a/feature-map/gateways-profiles.md b/feature-map/gateways-profiles.md
new file mode 100644
index 00000000000..616c73d8c33
--- /dev/null
+++ b/feature-map/gateways-profiles.md
@@ -0,0 +1,45 @@
+# Tool gateways and access profiles
+
+Administrators expose selected tools through gateways and reusable access profiles, connect clients, manage tokens, and inspect gateway activity.
+
+Implementation: [gateways](../ui/src/pages/apps/gateways/GatewaysList.tsx), [gateway detail](../ui/src/pages/apps/gateways/GatewayDetail.tsx), [profiles](../ui/src/pages/tools/profiles/ProfileWizard.tsx).
+
+## Sub-features
+
+- `gateway`: create/edit an endpoint and select its exposed apps/tools.
+- `profiles`: define reusable tool access configuration and inspect draft/detail state.
+- `client-connect`: copy the intended endpoint/configuration to an authorized test client.
+- `tokens`: create/revoke client credentials and verify their scope.
+- `activity`: inspect tool discovery/calls and explicit errors.
+
+## How to get to it (user POV)
+
+### `gateway-client`
+
+Open `/apps/gateways`, then a gateway’s Overview, Apps/Tools, Tokens, and Activity tabs.
+
+### `access-profile`
+
+Open `/apps/advanced/profiles`, create a profile, or follow its detail/edit route.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a fixture tool connection and test client. Record gateway/profile, token owner, transport, and selected company.
+
+### `gateway-client`
+
+Automated: [gateway service](../server/src/__tests__/tool-gateway-service.test.ts), [connect client dialog](../ui/src/pages/apps/gateways/ConnectClientDialog.test.tsx), and [token panel](../ui/src/pages/apps/gateways/panels/TokensPanel.test.tsx) cover service/UI contracts.
+
+Manual: Create a disposable gateway with one harmless tool, connect a client using its provided configuration, discover/call that tool, and inspect activity. Revoke the client token and confirm the same call fails. Test a tool outside the allowed set.
+
+### `access-profile`
+
+Automated: [profile wizard](../ui/src/pages/tools/profiles/ProfileWizard.test.tsx) and [profile detail](../ui/src/pages/tools/profiles/ProfileDetail.test.tsx) cover component behavior with mocks.
+
+Manual: Create a bounded profile, choose its offered tools and options, save or resume its draft, and reload the detail. Apply/connect it through the offered flow and inspect the actual client-visible tool set. Verify cancellation and invalid selections retain an understandable draft.
+
+## Gotchas
+
+- A copied endpoint is not proof of client authentication or tool discovery.
+- Gateway access cannot replace underlying connection/action permission checks.
+- Advanced tool routes require the appropriate admin gate; legacy tool URLs may redirect.
diff --git a/feature-map/goals.md b/feature-map/goals.md
new file mode 100644
index 00000000000..a282d353454
--- /dev/null
+++ b/feature-map/goals.md
@@ -0,0 +1,42 @@
+# Goals and work alignment
+
+People define company and lower-level goals and connect projects and tasks to the outcome they serve.
+
+Implementation: [goals](../ui/src/pages/Goals.tsx), [goal detail](../ui/src/pages/GoalDetail.tsx).
+
+## Sub-features
+
+- `hierarchy`: create and inspect goal level, parent, owner, and status.
+- `alignment`: associate work with a valid goal in the same company.
+- `navigation`: follow goal/project/task context to understand why work exists.
+
+## How to get to it (user POV)
+
+### `goal-detail`
+
+Open `/goals`, create a goal, and enter `/goals/:goalId`.
+
+### `task-goal-context`
+
+Inspect the goal context from a project or task and compare explicit versus inherited context.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Prepare two goals and a disposable project/task in the selected company.
+
+### `goal-detail`
+
+Automated: [project-goal validation](../server/src/__tests__/project-goal-validation.test.ts) covers relationship validation; [goal detail control](../ui/src/pages/GoalDetail.test.tsx) only tests the properties toggle, not the whole creation journey.
+
+Manual: Create a parent and child goal, save owner/status changes, and reload. Link a project and task through the offered controls, follow their goal context, and verify a cross-company or invalid relationship is rejected.
+
+### `task-goal-context`
+
+Automated: [task goal routes](../server/src/__tests__/issues-goal-context-routes.test.ts) and [goal fallback](../server/src/__tests__/issue-goal-fallback.test.ts) cover the server rules.
+
+Manual: Compare a task with an explicit goal to one relying on project context. Change the allowed association, reload, and verify the displayed/injected context follows the documented server rule rather than retaining an unrelated goal.
+
+## Gotchas
+
+- A goal status is not an independently measured proof of business success.
+- Do not infer a complete goal browser test from the small properties-toggle suite.
diff --git a/feature-map/inbox-search.md b/feature-map/inbox-search.md
new file mode 100644
index 00000000000..2ef31ac7c7d
--- /dev/null
+++ b/feature-map/inbox-search.md
@@ -0,0 +1,54 @@
+# Inbox, decisions, and search
+
+People find work that needs their attention, distinguish unread activity from required decisions, archive handled items, and search across the company.
+
+Implementation: [inbox](../ui/src/pages/Inbox.tsx), [decisions](../ui/src/pages/WhatNeedsMe.tsx), [search](../ui/src/pages/Search.tsx).
+
+## Sub-features
+
+- `views`: use Mine, Recent, Unread, Blocked, and broader task views.
+- `triage`: read or archive attention items without pretending the underlying task is complete.
+- `decisions`: open the source of a decision and act in the right context.
+- `search`: query company work and follow a result to its original record.
+
+## How to get to it (user POV)
+
+### `inbox`
+
+Use Inbox links or the corresponding task views when the combined list is enabled.
+
+### `decisions`
+
+Open `/decisions`, then a queue at `/decisions/queues/:key` and its source item.
+
+### `search`
+
+Open `/search` or the navigation search entry.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Seed assigned, unread, blocked, and resolved tasks plus a pending decision. Record the combined Inbox/Tasks experimental setting.
+
+### `inbox`
+
+Automated: [archive routes](../server/src/__tests__/inbox-archive-routes.test.ts) cover server mutations. [Task-list helpers](../ui/src/pages/Issues.test.tsx) cover search URLs, pagination, and presentation constants; they do not render the combined Inbox/Tasks page. Reading, archiving, and navigating that page remain manual checks.
+
+Manual: Read an unread task, return to Unread, archive a handled item, and reload. Verify personal triage state changes while task status stays correct. Switch users and companies to check isolation.
+
+### `decisions`
+
+Automated: [decision queues](../server/src/__tests__/decision-queues-routes.test.ts) covers route behavior. End-to-end queue-to-source navigation is manual.
+
+Manual: Open a pending decision, follow its source, resolve it through the supported control, and reload the queue. Confirm it retires only after the decision persisted and unrelated pending items remain.
+
+### `search`
+
+Automated: [search page](../ui/src/pages/Search.test.tsx) and [company search service](../server/src/__tests__/company-search-service.test.ts) cover UI and server search separately.
+
+Manual: Search a unique task title and content phrase, open the result, and compare the actual record. Test filters, no results, and a second company. Verify stale results do not expose inaccessible data.
+
+## Gotchas
+
+- Personal archival is not task cancellation or completion.
+- Legacy Inbox routes can redirect to the combined task view; record which host actually rendered.
+- Search service tests do not establish the relevance quality of every query.
diff --git a/feature-map/instance-operations.md b/feature-map/instance-operations.md
new file mode 100644
index 00000000000..dbed2230885
--- /dev/null
+++ b/feature-map/instance-operations.md
@@ -0,0 +1,45 @@
+# Installation, configuration, updates, and backups
+
+An operator can install and run Paperclip, diagnose the instance, configure supported deployment settings, manage its service, and produce a recoverable database backup.
+
+Implementation: [CLI entry point](../cli/src/index.ts), [instance settings](../ui/src/pages/InstanceExperimentalSettings.tsx), [backup command](../cli/src/commands/db-backup.ts).
+
+## Sub-features
+
+- `install-update`: inspect install channel/version and apply supported update or rollback operations.
+- `server-service`: start/stop the intended instance and inspect its service health.
+- `configuration`: configure database, server binding, storage, secrets, and available experimental settings.
+- `diagnostics`: use doctor/health output to distinguish readiness from a listening port.
+- `backup`: create and inspect backups and verify restore only into a separate disposable target.
+
+## How to get to it (user POV)
+
+### `operator-cli`
+
+Use `paperclipai install`, `run`, `service`, `doctor`, `configure`, `channels`, or `update --help` for the intended operation.
+
+### `settings-backup`
+
+Use currently visible instance settings for experiments/access and `paperclipai db:backup --help` for one-off backup. Some legacy general-settings URLs redirect.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a disposable data directory/service identity. Do not update, restart, or restore over an unrelated live instance as a documentation test.
+
+### `operator-cli`
+
+Automated: [doctor](../cli/src/__tests__/doctor.test.ts), [update command](../cli/src/__tests__/update-command.test.ts), and [service manager](../cli/src/__tests__/service-manager.test.ts) cover command contracts.
+
+Manual: Inspect the selected installation/channel and configuration, start the isolated instance, confirm health and browser access, then stop that instance. For update changes, use the dry-run/check path first and verify installed version and rollback state on an owned disposable installation.
+
+### `settings-backup`
+
+Automated: [experimental settings](../ui/src/pages/InstanceExperimentalSettings.test.tsx) and [database backup routes](../server/src/__tests__/instance-database-backups-routes.test.ts) cover their UI/API contracts.
+
+Manual: Change a harmless experimental setting, reload, and confirm the affected route honors it. Back up a disposable instance, inspect the reported file and metadata, and restore using the documented procedure into a second isolated target. Verify a known record after restoration.
+
+## Gotchas
+
+- A successful backup write does not prove restoration works.
+- Settings visibility and mutability differ for cloud-managed and self-hosted instances.
+- Keep the three data paths distinct: first-party Telemetry, operator-configured OpenTelemetry, and local run logs.
diff --git a/feature-map/navigation-preferences.md b/feature-map/navigation-preferences.md
new file mode 100644
index 00000000000..66794028f8f
--- /dev/null
+++ b/feature-map/navigation-preferences.md
@@ -0,0 +1,45 @@
+# Navigation, profile, and announcements
+
+People organize their sidebar, move between company resources, maintain their profile, and dismiss product announcements with the correct persistence and identity scope.
+
+Implementation: [sidebar](../ui/src/components/Sidebar.tsx), [profile](../ui/src/pages/ProfileSettings.tsx), [announcements](../ui/src/components/AnnouncementWell.tsx).
+
+## Sub-features
+
+- `navigation`: use current sidebar links, favorites, recents, and available layout controls.
+- `preferences`: persist supported ordering/collapse choices for the intended user/company.
+- `profile`: edit personal identity and inspect public profile links.
+- `announcements`: inspect and dismiss an announcement with its intended instance-wide user scope.
+- `fallbacks`: handle missing resources and old deep links without presenting another resource as the target.
+
+## How to get to it (user POV)
+
+### `sidebar-deep-links`
+
+Use starred/recent/sidebar links and direct company-prefixed URLs.
+
+### `profile-announcements`
+
+Use Settings → Profile, `/u/:userSlug`, and the announcement well when a publication is available.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use two test users and companies; record the selected UI shell and any client-local preference storage.
+
+### `sidebar-deep-links`
+
+Automated: [sidebar](../ui/src/components/Sidebar.test.tsx) and [sidebar preference routes](../server/src/__tests__/sidebar-preferences-routes.test.ts) cover UI/server behavior.
+
+Manual: Star and reorder supported resources, collapse a section, navigate and reload. Switch company/user and inspect the intended preference scope. Open an unavailable resource and a legacy route; verify clear fallback or correct redirect without leaking another company’s state.
+
+### `profile-announcements`
+
+Automated: [profile page](../ui/src/pages/ProfileSettings.test.tsx), [announcement hook](../ui/src/hooks/useAnnouncement.test.tsx), and [announcement routes](../server/src/__tests__/announcements-routes.test.ts) cover separate UI/persistence layers.
+
+Manual: Change a disposable user’s display details, reload, and inspect an attributed profile link. Dismiss a fixture announcement, switch companies, and verify it remains dismissed for that user; check another user still has their own dismissal state.
+
+## Gotchas
+
+- Announcement dismissals are intentionally instance-wide user preferences, unlike company-scoped domain data.
+- Legacy/production shells need their own navigation check when affected.
+- A route redirect is part of the journey; do not document a removed screen as if it still renders.
diff --git a/feature-map/onboarding.md b/feature-map/onboarding.md
new file mode 100644
index 00000000000..4a47e0a9fd4
--- /dev/null
+++ b/feature-map/onboarding.md
@@ -0,0 +1,45 @@
+# Onboarding and first work
+
+An operator can start an instance, create a company, configure its first agent, and reach a real first task. Instance setup and company onboarding are separate steps.
+
+Implementation: [web wizard](../ui/src/components/OnboardingWizard.tsx), [CLI setup](../cli/src/commands/onboard.ts).
+
+## Sub-features
+
+- `instance`: choose local instance configuration and start the server.
+- `company`: create a company with its identity and initial agent.
+- `adapter`: choose an available harness, model, account, and execution environment.
+- `first-task`: leave setup with a task whose execution or missing prerequisite is visible.
+- `resume`: return to an incomplete wizard without losing saved state.
+
+## How to get to it (user POV)
+
+### `web-wizard`
+
+Open `/onboarding` or the onboarding launcher in an empty company context.
+
+### `cli-setup`
+
+Use `paperclipai onboard --help` or `paperclipai run --help` to select an isolated data directory before setup.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a new isolated data directory and record deployment mode. A configured adapter may still need account authentication.
+
+### `web-wizard`
+
+Automated: [wizard tests](../ui/src/components/OnboardingWizard.test.tsx) cover mocked wizard behavior; [onboarding browser suite](../tests/e2e/onboarding.spec.ts) supplies its own test environment. Live model execution is a separate check.
+
+Manual: Create a disposable company and first agent. Save and leave midway, reopen, and finish. Follow the created first task, verify the selected agent and company, and inspect its output or explicit authentication gate. Reload both company and task.
+
+### `cli-setup`
+
+Automated: [CLI onboarding](../cli/src/__tests__/onboard.test.ts) and [isolated test drive](../cli/src/__tests__/test-drive.test.ts) cover their setup contracts; they do not establish that every model account is usable.
+
+Manual: Run setup in the disposable directory, open the URL it prints, and confirm the instance identity and company. Restart using that same configuration and verify saved state. Exercise an unavailable adapter and confirm an actionable error.
+
+## Gotchas
+
+- An empty company, an empty instance, and an unauthenticated browser are different states.
+- Creating an agent does not prove its provider login or first execution succeeded.
+- See [access](./access.md) for authenticated deployments and [agents](./agents.md) for later hiring.
diff --git a/feature-map/pipelines.md b/feature-map/pipelines.md
new file mode 100644
index 00000000000..ac0bd5d48bf
--- /dev/null
+++ b/feature-map/pipelines.md
@@ -0,0 +1,44 @@
+# Pipelines, review queues, and learnings
+
+With the pipeline experiment enabled, people move structured work through configured stages, inspect stage automation, review outputs, and retain learning records.
+
+Implementation: [pipeline board and item hosts](../ui/src/pages/Pipelines.tsx), [pipeline configuration](../ui/src/pages/PipelineSettings.tsx).
+
+## Sub-features
+
+- `stages`: configure stage order, behavior, and automation assignees.
+- `items`: create or inspect items, grouping, stage state, and work references.
+- `review`: act on the pipeline review queue and inspect the resulting transition.
+- `learnings`: inspect the separate learning view and its source context.
+
+## How to get to it (user POV)
+
+### `pipeline-board`
+
+Open `/pipelines`, `/pipelines/:pipelineId`, and its Settings route.
+
+### `item-review-learning`
+
+Open `/pipelines/:pipelineId/items/:caseId`, `/review-queue`, or `/learnings`.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Enable pipelines and prepare a disposable pipeline with at least two stages and a fixture agent. Record any associated case type.
+
+### `pipeline-board`
+
+Automated: [pipeline UI helpers](../ui/src/pages/Pipelines.test.tsx) cover grouping and presentation helpers; [pipeline service](../server/src/__tests__/pipelines-service.test.ts) covers service behavior.
+
+Manual: Configure stages and a harmless automation, add an item, and inspect its stage. Follow its task/work references and observe the resulting transition. Reload grouping and settings; verify rejected or failed transitions leave the item in an intelligible state.
+
+### `item-review-learning`
+
+Automated: [pipeline tutorial browser suite](../tests/e2e/pipelines-tutorial-flow.spec.ts) targets a fixture journey; it does not qualify arbitrary stage automation or learning quality.
+
+Manual: Open a pending review, inspect its source output and revision, accept or reject, and verify the persisted stage outcome. Follow a learning record to its source context and confirm it belongs to the intended pipeline/company.
+
+## Gotchas
+
+- These routes are experimental and may redirect or deny access when disabled.
+- ReviewQueue and Learnings are hosted from the pipeline module; a page-file inventory alone misses them.
+- Pipeline items and free-standing [cases](./cases.md) share records but have different navigation contexts.
diff --git a/feature-map/plugins.md b/feature-map/plugins.md
new file mode 100644
index 00000000000..b97f79758e2
--- /dev/null
+++ b/feature-map/plugins.md
@@ -0,0 +1,44 @@
+# Plugins and contributed product surfaces
+
+Operators install and configure plugins, inspect their status and errors, and use their contributed pages, tools, and managed resources within the plugin’s granted capabilities.
+
+Implementation: [plugin manager](../ui/src/pages/PluginManager.tsx), [plugin settings](../ui/src/pages/PluginSettings.tsx), [plugin page](../ui/src/pages/PluginPage.tsx).
+
+## Sub-features
+
+- `installation`: install a trusted test package or local development plugin through supported controls.
+- `configuration`: save validated configuration and inspect activation/failure state.
+- `contributions`: open plugin routes, settings, tools, and contributed resource tabs.
+- `lifecycle`: disable/remove or reload a disposable plugin and observe cleanup.
+
+## How to get to it (user POV)
+
+### `plugin-administration`
+
+Open Settings → Plugins where permitted, or the CLI plugin commands.
+
+### `plugin-contribution`
+
+Open `/plugins/:pluginId`, a registered plugin route, or its contributed company/project settings surface.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a known local fixture plugin with bounded capabilities. Record installed version and any declared external dependencies.
+
+### `plugin-administration`
+
+Automated: [install authorization](../server/src/__tests__/plugin-install-route-security.test.ts) and [plugin settings](../ui/src/pages/PluginSettings.test.tsx) cover route/UI contracts.
+
+Manual: Install the fixture, supply its configuration, activate it, and inspect status. Save an invalid configuration and verify a useful error. Disable/remove the disposable plugin and check its tools and managed resources no longer behave as active.
+
+### `plugin-contribution`
+
+Automated: [static plugin UI](../server/src/__tests__/plugin-ui-static.test.ts) and [company settings contribution](../ui/src/pages/CompanySettingsPluginPage.test.tsx) cover serving/host behavior.
+
+Manual: Open the contributed page by navigation and cold deep link, perform a harmless plugin action, and inspect its real outcome. Switch company and test an actor without the capability. Reload with the plugin unavailable and verify the host reports that state.
+
+## Gotchas
+
+- Installing a plugin does not authorize every host capability or external action.
+- Plugin-provided routes are dynamic; this map covers the host lifecycle, not every third-party feature.
+- Environment-driver plugins also need the [environment](./execution-environments.md) checks.
diff --git a/feature-map/projects.md b/feature-map/projects.md
new file mode 100644
index 00000000000..f2c7f455913
--- /dev/null
+++ b/feature-map/projects.md
@@ -0,0 +1,44 @@
+# Projects and repositories
+
+People group tasks into projects, attach goals and repositories, and configure the context and defaults used by project work.
+
+Implementation: [project list](../ui/src/pages/Projects.tsx), [project detail](../ui/src/pages/ProjectDetail.tsx).
+
+## Sub-features
+
+- `lifecycle`: create, name, organize, and archive projects.
+- `task-context`: inspect project tasks and create work in the selected project.
+- `repositories`: configure repository/workspace sources and verify usable checkouts.
+- `defaults`: maintain project instructions, environment, goal, and budget context where offered.
+
+## How to get to it (user POV)
+
+### `project-list`
+
+Open `/projects`, create a project, and enter its overview or Issues view.
+
+### `repository-settings`
+
+Open `/projects/:projectId/configuration` and its repository/workspace settings.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a disposable project and a small repository you can access; record checkout and credential ownership.
+
+### `project-list`
+
+Automated: [projects UI](../ui/src/pages/Projects.test.tsx) and [project detail](../ui/src/pages/ProjectDetail.test.tsx) are component tests.
+
+Manual: Create a project, add a task from its view, and reload. Verify the task belongs to that project, list counts are plausible, and links preserve company scope. Archive only the disposable project and inspect list/task behavior.
+
+### `repository-settings`
+
+Automated: [repository persistence](../server/src/__tests__/project-repositories-persistence.test.ts) and [repository browser suite](../tests/e2e/project-repositories.spec.ts) cover configured repository workflows.
+
+Manual: Attach a small repository, save, and create a project task. Inspect the actual checkout/revision used by its run. Test an invalid repository and missing credentials without treating a saved URL as a working workspace.
+
+## Gotchas
+
+- Project repository configuration and a provisioned execution workspace are different records.
+- See [workspaces](./workspaces.md), [goals](./goals.md), and [budgets](./budgets-costs.md) for those features.
+- Do not assume a deleted or archived project should erase its historical task evidence.
diff --git a/feature-map/questions-and-approvals.md b/feature-map/questions-and-approvals.md
new file mode 100644
index 00000000000..0446cd11c30
--- /dev/null
+++ b/feature-map/questions-and-approvals.md
@@ -0,0 +1,182 @@
+# Questions and approvals
+
+People answer an agent's questions and decide requests without losing the task's
+history. A question, plan confirmation, governance approval, and app-tool review
+can look similar but have different authority and continuation rules. Each
+decision must stay attached to its original request and survive reload.
+
+## Sub-features
+
+- `questions`: single-choice, multiple-choice, custom, and free-text answers;
+ paged forms retain answers until submission and show validation failures.
+- `dismiss-and-reopen`: unanswered questions remain in the feed after dismissal
+ or a newer message; reopening restores the form without inventing an answer.
+- `confirmations`: accept, decline, or request changes; stale, expired, resolved,
+ and withdrawn requests cannot be acted on again.
+- `plan-review`: inspect the requested plan revision before accepting or asking
+ for changes. An ordinary planning task can proceed to execution; Agent Chat
+ hands work to linked tasks and remains a conversation.
+- `audience`: the current actor, company, named audience, and review policy govern
+ resolution. A visible request is not necessarily actionable by that viewer.
+- `governance`: pending/history views, approve/reject, revision request, and
+ resubmission for formal board approvals.
+- `tool-review`: approve once, always allow the displayed scope, or decline;
+ decision status and provider execution outcome remain distinct.
+- `continuation`: one recorded response leads to the eligible waiting run or
+ continuation; repeated clicks, reloads, and competing tabs do not repeat work.
+
+## How to get to it (user POV)
+
+### `task-thread`
+
+Open a task from Tasks, search, a project, or its direct `/issues/:issueId` link.
+Answer the question near the composer, or reopen its compact unanswered entry
+in the history. Open the plan preview before using the confirmation controls.
+Exercise both available task presentations when a change affects shared cards.
+
+### `agent-chat`
+
+With Agent Chat enabled, choose Chat and an agent (`/chats/:agentRef`). Answer,
+dismiss, or reopen requests in this persistent conversation. A plan handoff here
+creates linked work rather than turning the conversation into implementation.
+
+### `attention`
+
+Open Decisions (`/decisions`, including a saved queue) or an Inbox attention row.
+Expand an actionable interaction inline; follow its task link to inspect context.
+With combined Inbox/Tasks enabled, open the corresponding Tasks view instead.
+
+### `board-approval`
+
+Open Approvals → Pending or All (`/approvals/pending`, `/approvals/all`). Use the
+card action or open `/approvals/:approvalId` for details, comments, revision
+request, and resubmission. These are formal approvals, not ordinary questions.
+
+### `app-review`
+
+In a task, open **Review request** for an Ask first app call. The same request
+appears in Apps → Review (`/apps/review`) and the connection's Review tab.
+Use **Approve & run**, **Always allow**, or **Decline** on the surface under test.
+
+### `skill-test`
+
+Open Skill Studio, run a skill test that produces an interaction, and inspect
+its output card. Skill-test authority is narrower than an ordinary company run.
+
+### `external-channel`
+
+In a configured chat channel, answer a published question or confirmation as a
+linked sender. Open the associated Paperclip task to inspect the saved outcome.
+Channel-specific forms and identity linking require separate provider evidence.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey).
+Use separate disposable requests for accept, decline, and revision paths. Record
+the actor and request revision. Prepare a waiting question through a test agent;
+a component fixture alone cannot prove live response delivery.
+
+### `task-thread`
+
+Automated: [interaction cards](../ui/src/components/IssueThreadInteractionCard.test.tsx),
+[paged task cards](../ui/src/components/task-chat/TaskChatInteractionCard.test.tsx),
+and [task thread](../ui/src/components/TaskChatThread.test.tsx) cover form,
+receipt, and dismissal behavior. [Resolution routes](../server/src/__tests__/issue-thread-interaction-routes.test.ts)
+and [response delivery](../server/src/__tests__/question-response-delivery.test.ts)
+cover authority and durable continuation. Run a targeted set with:
+
+```sh
+pnpm exec vitest run ui/src/components/TaskChatThread.test.tsx server/src/__tests__/question-response-delivery.test.ts
+```
+
+Manual: answer a multi-page question, go back, edit, then submit. Reload and
+confirm the saved answers and one agent continuation. On a fresh request,
+dismiss, reload, reopen, and verify the draft. Send a new comment while a
+question remains unanswered; it must stay reopenable in history. Try a denied
+actor and a request already resolved in another tab; expect an explicit error
+or settled receipt, never a second decision. For plans, change the plan revision
+before trying the old approval, then review the current revision.
+
+### `agent-chat`
+
+Automated: the [task thread suite](../ui/src/components/TaskChatThread.test.tsx)
+parameterizes unanswered-question history for conversation mode on and off.
+This proves component parity, not a model's plan handoff.
+
+Manual: repeat dismissal, reload, reopening, and answer submission in Chat.
+Approve a plan and inspect the linked execution task and copied plan. The chat
+history remains and the conversation does not close as a completed task.
+
+### `attention`
+
+Automated: [attention resolver](../ui/src/components/AttentionInteractionResolver.test.tsx)
+covers preparing-request refresh without accepting it. The resolution-route
+tests above cover the API, not every Decisions or Inbox navigation path.
+
+Manual: open the same pending request in an attention row and task tab. Resolve
+from the row; both surfaces must settle after refresh. Check an empty queue,
+loading, permission denial, and a stale request. Repeat with combined Inbox/Tasks
+on when that surface is part of the change. Full navigation parity remains a
+manual coverage gap.
+
+### `board-approval`
+
+Automated: [approval service](../server/src/__tests__/approvals-service.test.ts)
+and [idempotency routes](../server/src/__tests__/approval-routes-idempotency.test.ts)
+cover persistence and duplicate decisions. They do not drive the approval pages.
+
+Manual: create disposable formal approval requests; approve one from the list,
+reject another from details, and request revision on a third. Resubmit that
+third request and verify Pending/All and detail history after reload. Confirm
+the recorded decision and its governed effect, not just a success toast.
+
+### `app-review`
+
+Automated: [connection reviews](../tests/e2e/connection-reviews.spec.ts) drives
+task/queue synchronization, approve, decline, remembered permission, provider
+failure, and restart with a scripted process agent and local MCP provider:
+
+```sh
+pnpm exec playwright test -c tests/e2e/connection-reviews.config.ts
+```
+
+Manual: dismiss and reopen a review, decide it from each entry point using fresh
+requests, and inspect the continuation's useful result. Always allow must show
+its scope; a future action with changed arguments should obey the saved rule.
+Provider failure must remain an approved decision with a failed execution.
+Real provider and model checks follow [Task reviews](../doc/connections/TASK-REVIEWS.md#verification-workflows).
+
+### `skill-test`
+
+Automated: [read-only interaction contract](../server/src/__tests__/issue-interactions-read-only-contract.test.ts)
+checks that fetching interactions does not mutate them. Shared card suites cover
+rendering. Neither proves the complete Skill Studio host or its permission matrix.
+
+Manual: run a skill test with a question, answer through its visible output,
+and inspect the test result. Attempt a governed action outside the test's scope;
+expect denial. The complete Skill Studio browser journey is not covered by the
+referenced unit tests.
+
+### `external-channel`
+
+Automated: [chat question forms](../server/src/services/chat-question-forms.test.ts),
+[Discord forms](../server/src/services/chat-discord-question-forms.test.ts),
+and [interaction publications](../server/src/__tests__/chat-interaction-publications.test.ts)
+cover serialization and delivery logic with fixtures.
+
+Manual: use a disposable provider conversation, answer as the linked sender,
+and check the task's persisted result and one continuation. Repeat from an
+unlinked or wrong sender and with an expired card. A browser answer does not
+qualify Slack, Discord, Telegram, email, or iMessage; record each as not run
+unless its actual provider journey was driven.
+
+## Gotchas
+
+- Dismissing a question does not answer it. Dismissing an app review neither
+ grants permission nor resumes the agent. Ordinary comments cannot approve it.
+- A resolved request and a successful tool execution are separate facts.
+- Do not reuse an accepted request to test rejection; use another request.
+- Agent Chat and skill tests have distinct lifecycle/authority rules despite
+ sharing UI. A watchdog cannot acquire board authority by resolving a card.
+- An answer to an old question can queue behind a successor run; it does not
+ automatically steer that run. See [steering](./steering.md).
diff --git a/feature-map/recovery.md b/feature-map/recovery.md
new file mode 100644
index 00000000000..3e8a8564678
--- /dev/null
+++ b/feature-map/recovery.md
@@ -0,0 +1,159 @@
+# Recovery
+
+People can see why a task stopped, who owns the next action, and whether a safe
+continuation is available. Recovery retains task context and ownership, honors
+pause and budget gates, and distinguishes confirmed failure from an uncertain
+external outcome. A retry acknowledgement alone is not proof that work resumed.
+
+## Sub-features
+
+- `diagnosis`: a task/run exposes the recorded cause, evidence, owner, attempt
+ progress, and next action without requiring a raw-log interpretation.
+- `bounded-continuation`: supported interrupted work continues with preserved
+ conversation context and bounded attempts, without blindly replaying tools.
+- `source-action`: source-scoped recovery actions remain attached to the task;
+ independent repair work may have its own issue and return owner.
+- `exhaustion`: exhausted or overdue recovery exposes the current gate and
+ permitted operator action; it does not claim an automatic path is still live.
+- `workspace`: workspace divergence/export failures show the applicable repair,
+ reconcile, or isolated reissue action with evidence and authority checks.
+- `unknown-outcome`: uncertain external side effects require inspection and
+ an explicit decision, not automatic replay.
+- `user-continuation`: saved user messages after a stop are reconsidered once
+ cleanup proves the old execution is stopped; duplicate wakes are avoided.
+- `reconnect`: browser stream recovery refreshes persisted state without claiming
+ the agent itself restarted or that a failed run succeeded.
+
+## How to get to it (user POV)
+
+### `source-task`
+
+Open the affected task from Tasks, Inbox/Blocked, search, or a direct task link.
+Inspect the recovery notice/card in its history, expand details if needed, and
+use the currently offered action. Follow any linked repair task and return owner.
+
+### `run-detail`
+
+Open the agent's run (`/agents/:agentId/runs/:runId`) from activity or the task's
+run link. The run page hosts workspace recovery controls only for a failed run
+with error code `workspace_validation_failed` and a linked source task that still
+has a live `workspace_validation` recovery action. Use the source task for other
+stopped-run recovery checks.
+
+### `operator-retry`
+
+On an exhausted disposition or workspace recovery card, inspect the current
+reason and use the permitted retry/repair/reconcile action. Some repairs require
+confirmation; unavailable actions must explain the gate or remain absent.
+
+### `post-stop-message`
+
+After a stop, send a new instruction on the same task or inspect one already
+saved while cleanup was pending. Observe the waiting message, continuation, and
+eventual result rather than manually changing the task status to look complete.
+
+### `browser-reconnect`
+
+While viewing an active or recovering task, interrupt the browser connection
+and restore it, or suspend and return to the tab. Reload is a separate check.
+The current task and run state should reconcile with the server.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey).
+Use a disposable instance and reproducible failure. Record source task/run,
+adapter/runtime mode, cause, attempt count, current owner, and verified stop
+evidence. Do not kill an unrelated server or induce provider side effects just
+to get a failure screen. Use the existing deterministic recovery suite first.
+
+### `source-task`
+
+Automated: [recovery actions](../server/src/__tests__/issue-recovery-actions.test.ts)
+covers source scoping, bounded attempts, operator stops, quota monitoring,
+ownership, stale action retirement, and continuation deduplication.
+[Recovery cards](../ui/src/components/IssueRecoveryActionCard.test.tsx) cover
+diagnosis, retry progress, exhaustion, and action availability. The fixture-backed
+[execution-recovery journeys](../tests/e2e/execution-recovery/recovery.spec.ts)
+start their own test-drive instances and exercise safe, uncertain, restart,
+manager-lineage, and legacy-unknown paths:
+
+```sh
+pnpm exec vitest run server/src/__tests__/issue-recovery-actions.test.ts ui/src/components/IssueRecoveryActionCard.test.tsx
+pnpm exec playwright test -c tests/e2e/execution-recovery/playwright.config.ts recovery.spec.ts
+```
+
+Manual: open a stopped task through each affected navigation path. Confirm its
+explanation, original owner, recovery owner if different, and next action. Follow
+the supported recovery until the source task produces a useful result or a
+specific escalation. Reload and verify that resolved notices retire and attempt
+history remains. A fixture pass does not qualify every live harness/provider.
+
+### `run-detail`
+
+Automated: [run workspace recovery](../ui/src/components/RunWorkspaceRecoverySurface.test.tsx)
+tests this host; it is component coverage, not an end-to-end repair.
+
+Manual: prepare a failed run with error code `workspace_validation_failed`, a
+linked source task, and a live `workspace_validation` recovery action on that
+task. Open that exact run and compare its recovery diagnosis to the source task.
+Use an eligible action from the run surface, return to the task,
+and verify the same action state, persisted outcome, and restored execution.
+Repeat with an actor who lacks authority. Verify that the run-page controls are
+absent for other error codes or after the source action retires; continue other
+recovery checks on the source task. Full run-detail navigation remains a manual
+gap.
+
+### `operator-retry`
+
+Automated: [disposition notices](../ui/src/components/DispositionRecoveryNotice.test.tsx)
+tests pending/error/gated states and waiting for the real retry acknowledgement.
+The recovery-card suite covers workspace divergence, reissue, reconcile, and
+confirmation. [Workspace export](../ui/src/components/WorkspaceExportRecovery.test.tsx)
+covers its separate repair surface.
+
+Manual: reproduce an exhausted disposable action. Click once, verify pending
+state prevents repeated clicks, and inspect a successful continuation or an
+explicit rejection. Reload to confirm the durable outcome. For a workspace
+repair, record the compared branches/revisions and preserve uncommitted work;
+confirm the repair's actual result before resuming. Check the denied and stale
+action paths. A changed card label is insufficient proof of workspace integrity.
+
+### `post-stop-message`
+
+Automated: [legacy continuation](../server/src/services/recovery/legacy-continuation.test.ts),
+[queue routes](../server/src/__tests__/issue-queued-comments-routes.test.ts), and
+[native restart recovery](../server/src/services/native-runtime/native-restart-recovery.test.ts)
+cover their respective recovery paths. [Legacy failure continuation](../tests/e2e/legacy-failure-continuation.spec.ts)
+adds a browser journey; it is not native runtime proof.
+
+Manual: stop a disposable run, submit a distinguishable follow-up, and observe
+any cleanup wait. After confirmed stop, verify the follow-up reaches one eligible
+continuation and produces the requested answer. Repeat with a task/ancestor
+pause and a budget hold: recovery must not bypass the gate. For unknown external
+outcomes, inspect the provider before authorizing another operation.
+
+### `browser-reconnect`
+
+Automated: [live-update recovery](../ui/src/context/LiveUpdatesProvider.recovery.test.tsx)
+covers client transport recovery with mocks. It does not prove runner restart.
+
+Manual: go offline during a disposable run, let the server reach a new state,
+then reconnect. Confirm task/run/attention data refresh without duplicate
+comments or decisions; reload and compare. A healthy websocket proves transport
+only. Separately inspect the underlying execution if it is still stuck.
+
+## Gotchas
+
+- Legacy and native runtimes have different ownership and restart paths. Record
+ which one was exercised instead of inferring coverage from the adapter name.
+- A process disappearance, elapsed timeout, or successful API retry does not
+ prove an external tool operation never happened. Unknown outcomes stay unknown
+ until corroborated; automatic replay can duplicate a side effect.
+- Active-run watchdogs, task watchdogs, reviewers, and recovery owners have
+ different authority. No recovery card grants board permission by itself.
+- Idle Agent Chat is not stranded work. An intentional operator stop must not
+ silently trigger recovery that fights the user's instruction.
+- Source inspection and mocked component tests do not qualify real server
+ restart continuity. Use the appropriate runtime suite for that claim.
+- See [execution semantics](../doc/execution-semantics.md) for the governing
+ recovery contract and [steering](./steering.md) for saved follow-ups.
diff --git a/feature-map/routines.md b/feature-map/routines.md
new file mode 100644
index 00000000000..c951e170912
--- /dev/null
+++ b/feature-map/routines.md
@@ -0,0 +1,45 @@
+# Routines, schedules, and triggers
+
+Operators define repeatable work, configure its inputs and triggers, run it on demand or automatically, and inspect the execution history and resulting tasks.
+
+Implementation: [routine list](../ui/src/pages/Routines.tsx), [routine detail](../ui/src/pages/RoutineDetail.tsx), [trigger editor](../ui/src/components/routine-triggers/TriggerWizard.tsx).
+
+## Sub-features
+
+- `definition`: save the request, agent, project, variables, and execution context.
+- `triggers`: configure supported schedules/webhooks or other offered triggers.
+- `run-now`: supply inputs and create an observable routine execution.
+- `history`: inspect resulting tasks and past outcomes.
+- `management`: organize, pause/disable, archive, and distinguish plugin-managed routines.
+
+## How to get to it (user POV)
+
+### `routine-editor`
+
+Open `/routines`, create one, and inspect `/routines/:routineId` and its edit sections.
+
+### `trigger-history`
+
+Use the routine’s trigger controls and History/Audit links; lists also offer Run now.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a disposable routine, deterministic test agent, and harmless target. Record schedule timezone and enabled state.
+
+### `routine-editor`
+
+Automated: [routine detail helper](../ui/src/pages/RoutineDetail.test.tsx) tests project-selector options, not the rendered editor. [Routine service](../server/src/__tests__/routines-service.test.ts) covers server contracts. Saving and running through the editor remain manual checks.
+
+Manual: Save an agent, request, project, and a required variable. Reload and inspect the saved definition. Run now with a distinguishable input, follow the resulting task, and verify its output and history entry. Check a missing required input.
+
+### `trigger-history`
+
+Automated: [trigger wizard](../ui/src/components/routine-triggers/TriggerWizard.test.tsx) is component coverage; [routine integration](../server/src/__tests__/routines-e2e.test.ts) is server integration rather than a provider-wide browser proof.
+
+Manual: Set a near-term disposable schedule or authorized test webhook, verify one eligible execution and its source trigger, then disable it and confirm further invocations stop. Inspect a failed execution without losing its history. Remove the temporary trigger after testing.
+
+## Gotchas
+
+- Saving a schedule does not prove the scheduler invoked it.
+- Timezone, overlap/concurrency rules, and plugin ownership affect behavior.
+- A routine run’s task must still respect pause, access, and budget gates.
diff --git a/feature-map/runs-adapters.md b/feature-map/runs-adapters.md
new file mode 100644
index 00000000000..6b1f1a4f1e1
--- /dev/null
+++ b/feature-map/runs-adapters.md
@@ -0,0 +1,44 @@
+# Runs, harnesses, and model accounts
+
+Operators choose an agent harness and model account, inspect execution history and transcripts, and distinguish a working configuration from a successful task result.
+
+Implementation: [adapter manager](../ui/src/pages/AdapterManager.tsx), [run host](../ui/src/pages/AgentDetail.tsx), [configuration](../ui/src/components/AgentConfigForm.tsx).
+
+## Sub-features
+
+- `availability`: discover installed adapters and available models/accounts.
+- `validation`: test an adapter in the selected execution environment and surface authentication failures.
+- `runs`: inspect run status, events, output, costs, and the source task.
+- `session`: preserve or reset execution context through supported lifecycle actions.
+
+## How to get to it (user POV)
+
+### `adapter-setup`
+
+Open an agent’s model/adapter configuration or the instance adapter settings page when permitted.
+
+### `run-history`
+
+Open an agent run at `/agents/:agentId/runs/:runId` from the agent or task activity.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Record adapter, model, account, native/legacy runtime, and environment. Capabilities vary; one harness result is not a matrix-wide qualification.
+
+### `adapter-setup`
+
+Automated: [adapter validation routes](../server/src/__tests__/agent-adapter-validation-routes.test.ts) and [model refresh](../server/src/__tests__/adapter-model-refresh-routes.test.ts) cover server behavior.
+
+Manual: Select the intended adapter and account, refresh model choices, and run its environment test. Save, reload, then execute a small task. Repeat with a deliberately unavailable account and verify the failure remains visible.
+
+### `run-history`
+
+Automated: [live run routes](../server/src/__tests__/agent-live-run-routes.test.ts) and [run event sequencing](../server/src/__tests__/heartbeat-run-event-sequencing.test.ts) cover run data contracts.
+
+Manual: Start a disposable task, open its running transcript, and follow it to a terminal outcome. Reload and compare task/run IDs, status, output, and cost. Verify a failed run remains distinguishable from a completed run with useful output.
+
+## Gotchas
+
+- The run log is instance database data; it is not the opt-out first-party Telemetry system or operator-configured OpenTelemetry tracing.
+- Authentication/model discovery does not establish tool, image, steering, or resumption capability parity.
+- Use [recovery](./recovery.md) for interrupted runs and [execution environments](./execution-environments.md) for local/SSH/sandbox differences.
diff --git a/feature-map/secrets.md b/feature-map/secrets.md
new file mode 100644
index 00000000000..71dcfb7c262
--- /dev/null
+++ b/feature-map/secrets.md
@@ -0,0 +1,45 @@
+# Secrets, personal credentials, and proposals
+
+Operators manage company secret references, users supply their own credentials where required, and reviewers decide proposed secret changes without exposing secret values in ordinary UI evidence.
+
+Implementation: [secrets page](../ui/src/pages/Secrets.tsx), [personal secrets](../ui/src/pages/secrets/MyUserSecretsTab.tsx), [proposals](../ui/src/pages/secrets/ProposalsTab.tsx).
+
+## Sub-features
+
+- `company-secrets`: create/update secret references and control their bindings.
+- `user-secrets`: define required user credentials and set a value for the current user.
+- `proposals`: review proposed changes with the appropriate authority.
+- `vault-import`: import eligible external-vault references through the offered flow.
+- `runtime-delivery`: deliver only the secret references authorized for the run/actor.
+
+## How to get to it (user POV)
+
+### `secret-management`
+
+Open company Settings → Secrets and the company/personal secret views.
+
+### `proposal-import`
+
+Use the Proposals tab or Import from vault where available.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use dummy credentials in an isolated company, two user identities, and a test agent. Never print actual secret values in evidence.
+
+### `secret-management`
+
+Automated: [secrets service](../server/src/__tests__/secrets-service.test.ts) and [user ownership](../server/src/__tests__/secrets-service-user-secret-owner-scoped.test.ts) cover storage/access contracts.
+
+Manual: Create a dummy secret reference, bind it through a supported field, and verify its use in a harmless run without logging the value. Update it and reload. Switch users and confirm personal values remain owner-scoped and missing credentials produce an actionable state.
+
+### `proposal-import`
+
+Automated: [proposal routes](../server/src/__tests__/secret-proposals-routes.test.ts) and [vault import dialog](../ui/src/pages/secrets/ImportFromVaultDialog.test.tsx) cover route/UI layers; a real vault integration needs live validation.
+
+Manual: Review a dummy proposal, reject one and accept another, then inspect the resulting reference state and history. Preview a vault import, select only disposable entries, and verify imported references and denied-access errors after reload.
+
+## Gotchas
+
+- A displayed reference name is not proof that the actor can resolve its value at runtime.
+- Company secrets and user-specific values have different ownership.
+- Redaction needs verification in errors, activity, and run logs as well as the form.
diff --git a/feature-map/skills.md b/feature-map/skills.md
new file mode 100644
index 00000000000..c8565f2b2a7
--- /dev/null
+++ b/feature-map/skills.md
@@ -0,0 +1,55 @@
+# Skill discovery, authoring, and policy
+
+Operators discover or import skills, author and test them in Skill Studio, manage source versions, and decide which agents may use them.
+
+Implementation: [skill library](../ui/src/pages/CompanySkills.tsx), [studio](../ui/src/pages/SkillStudio.tsx), [sources](../ui/src/pages/SkillSources.tsx), [agent skills](../ui/src/pages/agent-skills/AgentSkillsTab.tsx).
+
+## Sub-features
+
+- `discovery`: browse installed/discover views and import a skill or source.
+- `authoring`: create/edit a writable skill or fork a read-only source.
+- `versions`: inspect revisions, source updates, diffs, and selected releases.
+- `policy`: apply agent enablement and skill usage policy independently from installation.
+- `testing`: run a bounded Studio test and inspect its result and interactions.
+
+## How to get to it (user POV)
+
+### `library-sources`
+
+Open `/skills`, Discover, or `/skills/sources`; project import is available through the library’s import flow.
+
+### `studio`
+
+Use New skill or `/skills/studio/:skillId`; writable copies and source-backed originals differ.
+
+### `agent-enablement`
+
+Use skill policy/agent selection in the library or an agent’s Skills tab.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a harmless skill fixture and test agent with skill support. Record whether the source is local, bundled, project, or remote.
+
+### `library-sources`
+
+Automated: [library UI](../ui/src/pages/CompanySkills.test.tsx) and [source service](../server/src/__tests__/skill-sources.test.ts) cover their respective layers.
+
+Manual: Install a fixture, locate it in Installed, inspect its source and files, and reload. Import a source update and compare versions before accepting it. Check a source requiring unavailable repository access and verify the failure is explicit.
+
+### `studio`
+
+Automated: [Studio](../ui/src/pages/SkillStudio.test.tsx) covers UI behavior; model-driven skill testing remains a separate manual result.
+
+Manual: Create or fork a disposable skill, edit instructions, save, and reload. Run a bounded test, respond to any question, and inspect the output. Verify the saved version matches what was tested and failed saves retain the draft.
+
+### `agent-enablement`
+
+Automated: [policy service](../server/src/__tests__/company-skill-policy-service.test.ts) and [agent skills state](../ui/src/pages/agent-skills/AgentSkillsTab.test.ts) cover policy/state contracts.
+
+Manual: Enable the skill for one test agent and leave another without access. Run a small task on each, inspect the available skill context, then change the release/policy and verify the next eligible run uses the intended version.
+
+## Gotchas
+
+- Installed does not mean enabled for every agent.
+- Read-only GitHub/bundled skills may require a writable copy rather than an in-place edit.
+- Studio interaction coverage is in [questions and approvals](./questions-and-approvals.md); a passing mock is not a live harness test.
diff --git a/feature-map/status-cards.md b/feature-map/status-cards.md
new file mode 100644
index 00000000000..ec0b2b240c4
--- /dev/null
+++ b/feature-map/status-cards.md
@@ -0,0 +1,44 @@
+# Status cards and refreshed summaries
+
+The status-card experiment turns a saved prompt/query into an inspectable summary of watched work, with refresh history, configuration, and archive/restore controls.
+
+Implementation: [status page](../ui/src/pages/StatusCards/index.tsx), [card detail](../ui/src/pages/StatusCards/StatusCardDetailDrawer.tsx).
+
+## Sub-features
+
+- `authoring`: create a card and configure its prompt, refresh behavior, and summarizer.
+- `generation`: observe compilation/refresh tasks and their successful or failed output.
+- `inspection`: read the summary, watched work, history, and available query debugging.
+- `archive`: archive and restore without confusing a stale summary with a current result.
+
+## How to get to it (user POV)
+
+### `status-board`
+
+Open `/status`, choose New card, and follow a card at `/status/:cardId`.
+
+### `card-settings`
+
+Open the card detail’s settings/query-debug controls and archive/restore actions.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Enable status cards, use a configured summarizer and disposable tasks, and record whether summary generation is simulated or live.
+
+### `status-board`
+
+Automated: [status-card service/routes](../server/src/__tests__/status-cards.test.ts) covers gated lifecycle and generation contracts; [tile UI](../ui/src/pages/StatusCards/StatusCardTile.test.tsx) covers rendering.
+
+Manual: Create a bounded card, inspect its generation task, and wait for a saved summary. Change a watched task, refresh, and verify both the summary and update history reflect the source change. Exercise a failed generation and confirm it is not presented as fresh.
+
+### `card-settings`
+
+Automated: [settings form](../ui/src/pages/StatusCards/StatusCardSettingsForm.test.tsx) and [update engine](../server/src/__tests__/status-card-update-engine.test.ts) cover separate UI/engine layers.
+
+Manual: Change a disposable card’s prompt or summarizer, run the offered rebuild/refresh, and inspect the resulting query and summary. Archive and restore it, reload its direct link, and check the actual new generation outcome.
+
+## Gotchas
+
+- Summary quality needs comparison against source work, not just a successful task status.
+- A saved old summary must not be counted as a successful new refresh.
+- Experimental visibility, author permissions, and agent ownership constrain mutation.
diff --git a/feature-map/steering.md b/feature-map/steering.md
new file mode 100644
index 00000000000..02d1cfa91bc
--- /dev/null
+++ b/feature-map/steering.md
@@ -0,0 +1,135 @@
+# Steering and queued messages
+
+People can send follow-ups while an agent works, manage saved messages that have
+not been consumed, and choose when to steer or interrupt. Stopping a run and
+pausing a task are separate controls. The UI must preserve the message, explain
+why it is waiting, and only claim delivery after an authoritative acknowledgement.
+
+## Sub-features
+
+- `queue`: a busy task saves follow-ups and shows their order and wait reason.
+- `edit-order-discard`: edit full Markdown, reorder, and discard eligible saved
+ messages; ownership, revision conflicts, and already-dispatched states matter.
+- `steer`: explicit user action sends a queued message into a compatible active
+ run; unavailable capabilities and provider rejection remain visible.
+- `interrupt`: stop the current execution and carry accepted follow-ups into
+ the eligible continuation without delivering them twice.
+- `stop-and-pause`: distinguish stop-in-flight, confirmed stop, task/ancestor
+ pause, agent pause, and budget hold. Resume must respect the actual gate.
+- `drafts`: switching tasks, reloading, and uncertain submission retain the
+ correct task's draft and attachment receipts.
+- `approval-queue`: answered questions and accepted approvals have durable
+ delivery distinct from editable ordinary comments.
+
+## How to get to it (user POV)
+
+### `task-composer`
+
+Open an assigned task (`/issues/:issueId`). Start work, then send follow-ups while
+the agent runs. Use the queued-message controls to edit, reorder, discard,
+steer, or interrupt when offered. Use the composer stop/pause control separately.
+Both task presentations need attention when changing their shared behavior.
+
+### `agent-chat`
+
+Enable Agent Chat and open an agent conversation. Send another message during
+a reply and inspect the shared queue. `/new` starts fresh provider context in
+the same conversation; it is an ordered boundary, not a normal model prompt.
+
+### `request-response`
+
+Answer an earlier question or accept a confirmation while successor work is
+active on the task. Inspect the resulting queued response and its available
+steer/interrupt control instead of assuming acceptance interrupted execution.
+
+### `external-channel`
+
+Send a follow-up from a linked external chat conversation while its task is
+running. Use that provider's supported stop/control affordance where available;
+inspect the resulting task and run in Paperclip.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey).
+Use an agent that stays busy long enough to inspect the queue. Record the adapter,
+native/legacy mode, and advertised steering capability. Test supported and
+unsupported steering without treating an absent capability as a product failure.
+
+### `task-composer`
+
+Automated: [queued-message UI](../ui/src/components/task-chat/TaskChatQueuedMessages.test.tsx)
+covers order, failure restoration, unavailable steering, stale revisions, and
+discard acknowledgements. [Queue routes](../server/src/__tests__/issue-queued-comments-routes.test.ts)
+cover durable ordering, authorization, steering acknowledgements, interrupt
+recovery, and concurrent dispatch. [Composer](../ui/src/components/task-chat/TaskChatComposer.test.tsx)
+covers drafts and uncertain saves.
+
+```sh
+pnpm exec vitest run ui/src/components/task-chat/TaskChatQueuedMessages.test.tsx server/src/__tests__/issue-queued-comments-routes.test.ts
+```
+
+Automated stop coverage is separate:
+[composer stop](../tests/e2e/composer-stop.spec.ts) with
+[its configuration](../tests/e2e/playwright-composer-stop.config.ts) and
+[ACP stop/continuation](../tests/e2e/acp-stop-continuation.spec.ts). Inspect their
+fixture and opt-in prerequisites; skipped native cases are not native proof.
+
+Manual: queue three distinguishable messages. Edit one, reorder them, reload,
+and confirm the saved order. Discard one and confirm it never reaches execution.
+Steer one while busy and verify the agent receives that exact message once.
+Repeat with a rejected steer and a stale second-tab edit; the UI must preserve
+retryable content and explain the conflict. On a fresh run, interrupt with a
+queued follow-up and verify confirmed stop followed by one continuation. Pause
+the task (and separately its ancestor), preserve a draft, then resume the actual
+hold; no hidden send should occur while paused. Check both task presentations
+when available; the named component tests do not prove every host integration.
+
+### `agent-chat`
+
+Automated: [agent chat sessions](../tests/e2e/agent-chat-sessions.spec.ts) covers
+persistent conversation/session behavior with deterministic harness fixtures;
+shared composer tests cover the controls. These do not qualify live steering
+for every harness.
+
+Manual: queue two follow-ups while the conversation replies. Reload, edit or
+discard one, then let the other run. Verify one reply and unchanged conversation
+identity. Send `/new`, then a new prompt; old history remains visible, and the
+new turn uses fresh provider context. Verify a useful answer rather than only
+the session-divider UI. Repeat the queue operations with a live capable harness
+when the change touches delivery.
+
+### `request-response`
+
+Automated: [response delivery](../server/src/__tests__/question-response-delivery.test.ts)
+proves queueing/coalescing and retry-safe receipts. The queue-route suite tests
+separate comment and approval queues, explicit steering, and fresh-session
+restrictions on plan approvals.
+
+Manual: answer an old question during a new run, confirm that it is saved and
+queued, and let the active run end. Verify exactly one continuation with the
+answer. Repeat an eligible approval with explicit steer; another approval that
+requires a fresh session must not offer same-turn delivery. Do not edit an
+approval outcome through an ordinary queued-message editor.
+
+### `external-channel`
+
+Automated: [chat interaction arbitration](../server/src/services/chat-interaction-arbitration.test.ts)
+covers backend arbitration with simulated requests. It is not a provider UI test.
+
+Manual: send two distinguishable messages through one disposable linked
+conversation while busy. Inspect their saved task order, run delivery, and
+external reply. Check a duplicate provider event and unauthorized sender.
+Provider-specific control semantics and real transport timing remain a manual
+gap; do not assume browser queue controls are available in every channel.
+
+## Gotchas
+
+- Paperclip's queue is server-owned once saved; it is not Omnigent's unsent
+ browser draft buffer. A stale edit must not overwrite a consumed message.
+- Steer availability depends on the active runtime's capability, not its brand
+ name. A UI row disappearing optimistically does not prove provider receipt.
+- Interrupt, stop, task pause, agent pause, and budget pause have different
+ effects. A running indicator disappearing does not prove remote work stopped.
+- An interrupted run may need verified cleanup before a saved follow-up can
+ start. Preserve and inspect the wait reason; see [recovery](./recovery.md).
+- A healthy idle Agent Chat is waiting for input, not stranded unfinished work.
diff --git a/feature-map/task-coordination.md b/feature-map/task-coordination.md
new file mode 100644
index 00000000000..9549f7606d3
--- /dev/null
+++ b/feature-map/task-coordination.md
@@ -0,0 +1,44 @@
+# Delegation, dependencies, and signoff
+
+A larger task can coordinate child work, dependencies, reviewers, and execution controls while preserving a clear owner and a traceable completion decision.
+
+Implementation: [task thread](../ui/src/pages/IssueDetail.tsx), [execution policy](../server/src/services/issues.ts).
+
+## Sub-features
+
+- `delegation`: inspect parent/child tasks and the original request behind delegated work.
+- `dependencies`: show blocking tasks and wake eligible work when prerequisites resolve.
+- `signoff`: apply the configured implementation/review completion policy.
+- `tree-control`: pause or resume a task tree without bypassing its gates.
+
+## How to get to it (user POV)
+
+### `task-relationships`
+
+Open the task’s parent/child and dependency links in task detail.
+
+### `review-and-controls`
+
+Inspect the task’s execution policy and available review, pause, resume, or stop controls.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Prepare a parent, child, and dependent task plus implementer/reviewer agents. Record execution policy and use a disposable tree.
+
+### `task-relationships`
+
+Automated: [dependency wakeups](../server/src/__tests__/issue-dependency-wakeups-routes.test.ts) checks server behavior; visual relationship navigation remains a manual check.
+
+Manual: Block one task on another, finish the prerequisite, and observe the dependent task’s eligible continuation. Follow parent/child links back to the source request. Verify no duplicate run or false parent completion occurs.
+
+### `review-and-controls`
+
+Automated: [execution policy](../server/src/__tests__/issue-execution-policy.test.ts), [tree control](../server/src/__tests__/issue-tree-control-service.test.ts), and [signoff browser suite](../tests/e2e/signoff-policy.spec.ts) target these layers. A linked suite is not a claim that its current run is green.
+
+Manual: Complete implementation under a review-required policy and confirm it waits for the required review outcome. Exercise rejection and later approval. Pause the parent while child work is pending, then verify resumption respects budget and ownership gates.
+
+## Gotchas
+
+- Review completion and task completion are different events under some policies.
+- Pausing a tree must not be “tested” by changing statuses until the screen looks quiet.
+- Use [questions and approvals](./questions-and-approvals.md) for decision forms and [recovery](./recovery.md) for interrupted work.
diff --git a/feature-map/tasks.md b/feature-map/tasks.md
new file mode 100644
index 00000000000..a2a7e42bc39
--- /dev/null
+++ b/feature-map/tasks.md
@@ -0,0 +1,55 @@
+# Task creation and lifecycle
+
+People create, assign, organize, discuss, and finish tasks. A task retains its owner, project, priority, history, and outputs as it moves through the work lifecycle.
+
+Implementation: [new task](../ui/src/components/NewIssueDialog.tsx), [task list](../ui/src/pages/Issues.tsx), [task detail](../ui/src/pages/IssueDetail.tsx).
+
+## Sub-features
+
+- `create`: capture a title/request with the intended agent, project, and attachments.
+- `organize`: filter, sort, group, and navigate tasks without losing the selected context.
+- `properties`: change status, priority, assignee, project, and relationships where authorized.
+- `discussion`: persist comments, references, and files on the task.
+- `completion`: distinguish backlog, active work, review, blocked, done, and cancelled outcomes.
+
+## How to get to it (user POV)
+
+### `new-task`
+
+Use New task from the global launcher, task list, or project task view.
+
+### `task-list`
+
+Open `/issues` or a project’s Issues view; legacy `/tasks` links redirect.
+
+### `task-detail`
+
+Open `/issues/:issueId` from a row, mention, or direct link.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use an invokable test agent and a project; record whether a real or simulated harness handles the request.
+
+### `new-task`
+
+Automated: [creation dialog](../ui/src/components/NewIssueDialog.test.tsx) is component coverage with mocked requests.
+
+Manual: Create a uniquely named task with an agent and project. Open its resulting link and reload. Confirm text, attachment, assignment, and project persisted, and verify execution started only when the task and agent are eligible.
+
+### `task-list`
+
+Automated: [task-list helpers](../ui/src/pages/Issues.test.tsx) cover search URLs, pagination, deduplication, and presentation constants. The suite does not render the page or exercise filtering, grouping, opening a task, and returning; those interactions still need a running-browser check.
+
+Manual: Filter by status and assignee, change grouping/sort, open a task, and return. Verify the correct records and selected view survive navigation and reload. Include an empty result and a failed request.
+
+### `task-detail`
+
+Automated: [task detail](../ui/src/pages/IssueDetail.test.tsx) covers component behavior, while [issue service](../server/src/__tests__/issues-service.test.ts) covers server contracts.
+
+Manual: Add a comment and edit authorized properties. Reload and verify history, actor, and values. Complete a disposable task and inspect its deliverable; reopen through an available action and confirm the next execution follows current policy.
+
+## Gotchas
+
+- A status label alone does not prove that the requested work exists.
+- Single-assignee and atomic checkout rules still apply when tasks are created from different hosts.
+- Use [coordination](./task-coordination.md), [steering](./steering.md), and [documents](./documents-artifacts.md) for their distinct workflows.
diff --git a/feature-map/teams.md b/feature-map/teams.md
new file mode 100644
index 00000000000..a1370c75ebd
--- /dev/null
+++ b/feature-map/teams.md
@@ -0,0 +1,44 @@
+# Team packages and catalog installation
+
+Operators can preview and install a team package with its agents and related resources. Catalog/package installation is available through the CLI/API; the repository also contains catalog UI components that are not a current top-level route.
+
+Implementation: [CLI teams](../cli/src/commands/client/teams.ts), [catalog components](../ui/src/pages/TeamCatalog.tsx).
+
+## Sub-features
+
+- `discovery`: list available team catalog entries and inspect package contents.
+- `preview`: inspect proposed resources and installation options before mutation.
+- `install`: install into the intended company and inspect resulting agents and resources.
+- `configuration`: supply required adapters/accounts and verify installed agents can work.
+
+## How to get to it (user POV)
+
+### `catalog-cli`
+
+Use the CLI teams catalog/preview/install operations in the selected context.
+
+### `catalog-components`
+
+The catalog components and install wizard are available in developer tests/design surfaces. No top-level `/teams` route is registered; use the CLI/API for the current installation workflow.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a disposable company, a small catalog entry, and explicit company context. Check `paperclipai teams --help` for current subcommands.
+
+### `catalog-cli`
+
+Automated: [team commands](../cli/src/__tests__/teams.test.ts) and [catalog service](../server/src/__tests__/teams-catalog-service.test.ts) cover command and service contracts.
+
+Manual: List an entry, preview its proposed agents and resources, install it into the disposable company, and inspect each created resource. Run a small task after configuring accounts. Retry preview/install as supported and inspect duplicate/conflict behavior.
+
+### `catalog-components`
+
+Automated: [catalog component](../ui/src/pages/TeamCatalog.test.tsx) and [install hook](../ui/src/pages/useInstallTeamCatalogEntry.test.tsx) cover preview and install UI logic with mocks.
+
+Manual: When changing or mounting these components, exercise preview, manager/source options, cancellation, failed install, and success. Follow created agents in the actual company. Record whether this was a component harness or a real product entry point.
+
+## Gotchas
+
+- Source files do not prove that a screen is reachable in the current app.
+- Installed team configuration may still need credentials or environment setup.
+- Company package import is a separate [portability](./companies.md) workflow.
diff --git a/feature-map/workspaces.md b/feature-map/workspaces.md
new file mode 100644
index 00000000000..d7b24fca7c1
--- /dev/null
+++ b/feature-map/workspaces.md
@@ -0,0 +1,45 @@
+# Execution workspaces, services, and files
+
+A project or task can use a managed workspace with inspectable files, Git state, services, and runtime controls. Operators can follow its lifecycle through provisioning, use, and closure.
+
+Implementation: [workspace list](../ui/src/pages/Workspaces.tsx), [execution workspace](../ui/src/pages/ExecutionWorkspaceDetail.tsx), [project workspace](../ui/src/pages/ProjectWorkspaceDetail.tsx).
+
+## Sub-features
+
+- `binding`: identify the workspace actually bound to a task/run.
+- `provisioning`: observe readiness and failures instead of inferring readiness from a created record.
+- `services`: start/stop supported services and inspect logs and exposed endpoints.
+- `files-git`: inspect workspace files and repository state used for the deliverable.
+- `closure`: close/reopen or reconcile through permitted controls without losing work.
+
+## How to get to it (user POV)
+
+### `task-workspace`
+
+Use the task’s workspace card or Files panel and follow its workspace link.
+
+### `workspace-management`
+
+Open `/workspaces`, a project workspace, or `/execution-workspaces/:workspaceId` and its Services/Configuration/Runtime logs views.
+
+## Driving it
+
+Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Enable isolated-workspace UI where needed. Use an owned disposable repository and environment; record workspace ID and branch.
+
+### `task-workspace`
+
+Automated: [workspace card](../ui/src/components/IssueWorkspaceCard.test.tsx) and [task binding](../server/src/__tests__/issue-runtime-workspace-binding.test.ts) cover host/binding contracts.
+
+Manual: Run a task that writes a small file, follow the bound workspace, and inspect the file and revision. Reload and verify links still refer to the same workspace, not another checkout or a stale run.
+
+### `workspace-management`
+
+Automated: [workspace detail](../ui/src/pages/ExecutionWorkspaceDetail.test.tsx) and [runtime service](../server/src/__tests__/workspace-runtime.test.ts) cover UI and runtime contracts separately.
+
+Manual: Provision a disposable workspace, wait for readiness, start an available service, open its endpoint, and inspect a real response and logs. Stop it and verify it actually stops. Exercise close/reopen only after inspecting pending changes and active runs.
+
+## Gotchas
+
+- A link or running badge does not prove the service is reachable from the user’s browser.
+- Workspace IDs, runtime leases, and repository paths are not interchangeable.
+- Use [recovery](./recovery.md) for divergence/export repair and [CLI operations](./cli-operations.md) for local worktree tooling.
diff --git a/package.json b/package.json
index c437659952d..3eeb3a955d2 100644
--- a/package.json
+++ b/package.json
@@ -75,7 +75,8 @@
"test:runner-recovery": "vitest run server/src/services/native-runtime/native-replacement-evidence.test.ts server/src/services/native-runtime/stopped-codex-turn.test.ts server/src/services/native-runtime/native-safe-replacement.test.ts",
"test:e2e:browser-context": "playwright test --config tests/e2e/playwright-company-context.config.ts",
"test:e2e:runner:browser-support": "playwright test --config tests/runner-e2e/playwright-support.config.ts",
- "test:e2e:runner:unit": "vitest run --config tests/runner-e2e/vitest.config.ts",
+ "test:e2e:runner:unit": "vitest run --config tests/runner-e2e/vitest.config.ts && node --test tests/runner-e2e/native-completion-checks.test.mjs tests/runner-e2e/native-completion-git-source.test.mjs tests/runner-e2e/native-completion-source-contract.test.mjs",
+ "test:e2e:runner:stock-harness": "node tests/runner-e2e/stock-harness-checks.mjs",
"test:e2e:runner:typecheck": "tsc -p tests/runner-e2e/tsconfig.json",
"test:e2e:runner:report": "node cli/node_modules/tsx/dist/cli.mjs tests/runner-e2e/report.ts",
"test:runner-workflow-evals": "pnpm --filter @paperclipai/paperclip-eval-kernel build && pnpm --filter @paperclipai/paperclip-runner test:runner-workflow-evals",
@@ -100,7 +101,7 @@
"cross-env": "^10.1.0",
"esbuild": "^0.28.2",
"typescript": "^7.0.2",
- "vitest": "^4.1.11"
+ "vitest": "^5.0.3"
},
"engines": {
"node": ">=24.11.0"
@@ -122,8 +123,8 @@
"postgres@3.4.9": "patches/postgres@3.4.9.patch"
},
"overrides": {
- "@agentclientprotocol/codex-acp@1.6.2>@openai/codex": "0.156.0",
- "@agentclientprotocol/claude-agent-acp@0.73.0>@anthropic-ai/claude-agent-sdk": "0.3.280",
+ "@agentclientprotocol/codex-acp@1.6.2>@openai/codex": "0.160.0",
+ "@agentclientprotocol/claude-agent-acp@0.73.0>@anthropic-ai/claude-agent-sdk": "0.3.286",
"rollup": ">=4.59.0",
"react": "^19.2.8",
"react-dom": "^19.2.8",
diff --git a/packages/adapter-utils/README.md b/packages/adapter-utils/README.md
index a51b3ebef9d..b1e77d207d9 100644
--- a/packages/adapter-utils/README.md
+++ b/packages/adapter-utils/README.md
@@ -9,6 +9,19 @@ For the adapter-author guide see
[`docs/adapters/creating-an-adapter.md`](../../docs/adapters/creating-an-adapter.md)
and the in-repo notes at [`packages/adapters/AUTHORING.md`](../adapters/AUTHORING.md).
+## Sandbox bridge deadlines
+
+Command-managed bridge control operations (queue reads, input delivery, setup,
+and cleanup) have a host-enforced deadline of at most 30 seconds per shell
+command. A shorter configured timeout still applies. These operations cannot
+inherit the agent run's hours-long lifetime or wait forever on a provider that
+ignores its timeout. Long-lived agent session commands keep their own limits.
+
+A control timeout reports a transport failure. It does not prove that the
+remote command stopped and does not replay an uncertain write. The process
+session closes failed input delivery and uses its existing shutdown path;
+normal execution settlement must still verify termination.
+
## No-remote-git contract
The local execution-workspace cwd is the only persistence boundary across
diff --git a/packages/adapter-utils/src/acpx-engine/ephemeral-session-environment.test.ts b/packages/adapter-utils/src/acpx-engine/ephemeral-session-environment.test.ts
new file mode 100644
index 00000000000..40d13e7b403
--- /dev/null
+++ b/packages/adapter-utils/src/acpx-engine/ephemeral-session-environment.test.ts
@@ -0,0 +1,165 @@
+import { mkdtemp, readFile, rm } from "node:fs/promises";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { createRuntimeStore, type AcpSessionRecord, type AcpSessionStore } from "acpx/runtime";
+import { afterEach, describe, expect, it, vi } from "vitest";
+import { createEphemeralSessionEnvironmentStore } from "./ephemeral-session-environment.js";
+
+const currentEnvironment = Object.freeze({
+ PAPERCLIP_API_KEY: "current-credential-fixture",
+ PAPERCLIP_RUN_ID: "current-run-fixture",
+ PATH: "/fixture/current-bin",
+});
+const oldEnvironment = { PAPERCLIP_API_KEY: "old-credential-fixture", OLD_RUN_PATH: "/fixture/old-run" };
+
+function record(): AcpSessionRecord {
+ return {
+ schema: "acpx.session.v1",
+ acpxRecordId: "fixture-record",
+ acpSessionId: "fixture-session",
+ agentSessionId: "fixture-agent-session",
+ agentCommand: "fixture-provider",
+ cwd: "/fixture/project",
+ name: "fixture-name",
+ createdAt: "2026-10-03T00:00:00.000Z",
+ lastUsedAt: "2026-10-03T00:00:01.000Z",
+ lastSeq: 3,
+ eventLog: { active_path: "/fixture/events.jsonl", segment_count: 1, max_segment_bytes: 1024, max_segments: 2 },
+ messages: [{ User: { id: "message-1", content: [{ Text: "Retained conversation" }] } }],
+ updated_at: "2026-10-03T00:00:01.000Z",
+ cumulative_token_usage: { input_tokens: 11, output_tokens: 7 },
+ request_token_usage: { request_1: { input_tokens: 11 } },
+ importedFrom: { recordId: "origin-record", cwdOriginal: "/fixture/origin", exportedBy: "fixture-caller", exportedAt: "2026-10-03T00:00:00.000Z" },
+ acpx: {
+ current_mode_id: "code",
+ desired_config_options: { effort: "high" },
+ session_options: { model: "fixture-model", allowed_tools: ["Read", "Write"], max_turns: 4, system_prompt: { append: "Retained caller option" }, env: { ...currentEnvironment } },
+ },
+ };
+}
+function freeze(value: T): T {
+ for (const child of Object.values(value)) if (typeof child === "object" && child !== null) freeze(child);
+ return Object.freeze(value);
+}
+function stubStore(loaded: AcpSessionRecord | undefined) {
+ const load = vi.fn().mockResolvedValue(loaded);
+ const save = vi.fn().mockResolvedValue(undefined);
+ return { load, save };
+}
+const directories: string[] = [];
+afterEach(async () => { await Promise.all(directories.splice(0).map(directory => rm(directory, { recursive: true, force: true }))); });
+async function diskStore() {
+ const stateDir = await mkdtemp(join(tmpdir(), "paperclip-session-env-")); directories.push(stateDir);
+ return { store: createRuntimeStore({ stateDir }), file: join(stateDir, "sessions", "fixture-record.json") };
+}
+
+describe("ephemeral ACPX session environment", () => {
+ it("saves a fresh session to the actual file store without persisting its live environment", async () => {
+ const disk = await diskStore(), input = freeze(record());
+ const wrapper = createEphemeralSessionEnvironmentStore(disk.store, currentEnvironment);
+ await wrapper.save(input);
+ const text = await readFile(disk.file, "utf8"), saved = JSON.parse(text);
+ expect(saved.acpx.session_options).not.toHaveProperty("env");
+ for (const value of Object.values(currentEnvironment)) expect(text).not.toContain(value);
+ expect(input.acpx?.session_options?.env).toEqual(currentEnvironment);
+ expect(saved.acpx.current_mode_id).toBe("code");
+ expect(saved.acpx.desired_config_options).toEqual(input.acpx?.desired_config_options);
+ expect(saved.acpx.session_options).toEqual({ model: "fixture-model", allowed_tools: ["Read", "Write"], max_turns: 4, system_prompt: { append: "Retained caller option" } });
+ expect(saved.messages).toEqual(input.messages);
+ expect(saved.imported_from.record_id).toBe("origin-record");
+ const loaded = await wrapper.load(input.acpxRecordId);
+ expect(loaded?.acpx?.session_options?.env).toEqual(currentEnvironment);
+ expect(loaded?.messages).toEqual(input.messages);
+ });
+
+ it("loads an old env-bearing file with rotated credentials without writing, then saves neither environment", async () => {
+ const disk = await diskStore(), legacy = record(); legacy.acpx!.session_options!.env = { ...oldEnvironment };
+ await disk.store.save(legacy);
+ const before = await readFile(disk.file, "utf8");
+ const wrapper = createEphemeralSessionEnvironmentStore(disk.store, currentEnvironment);
+ const loaded = await wrapper.load(legacy.acpxRecordId);
+ expect(loaded?.acpx?.session_options?.env).toEqual(currentEnvironment);
+ expect(loaded?.acpx?.session_options?.env).not.toHaveProperty("OLD_RUN_PATH");
+ expect(await readFile(disk.file, "utf8")).toBe(before);
+ expect(legacy.acpx?.session_options?.env).toEqual(oldEnvironment);
+ await wrapper.save(loaded!);
+ const after = await readFile(disk.file, "utf8");
+ for (const value of [...Object.values(oldEnvironment), ...Object.values(currentEnvironment)]) expect(after).not.toContain(value);
+ expect(JSON.parse(after).acpx.session_options).not.toHaveProperty("env");
+ expect(loaded?.acpx?.session_options?.env).toEqual(currentEnvironment);
+ });
+
+ it("loads an env-free persisted session into the current environment without writing", async () => {
+ const disk = await diskStore(), input = record(); delete input.acpx!.session_options!.env;
+ await disk.store.save(input);
+ const before = await readFile(disk.file, "utf8");
+ const loaded = await createEphemeralSessionEnvironmentStore(disk.store, currentEnvironment).load(input.acpxRecordId);
+ expect(loaded?.acpx?.session_options?.env).toEqual(currentEnvironment);
+ expect(loaded?.acpx?.session_options?.model).toBe("fixture-model");
+ expect(await readFile(disk.file, "utf8")).toBe(before);
+ });
+
+ it("copies loaded records, options and current env without mutating stored or caller-owned objects", async () => {
+ const stored = record(); stored.acpx!.session_options!.env = { ...oldEnvironment }; freeze(stored);
+ const backing = stubStore(stored), wrapper = createEphemeralSessionEnvironmentStore(backing, currentEnvironment);
+ const loaded = await wrapper.load("fixture-record");
+ expect(backing.load).toHaveBeenCalledWith("fixture-record"); expect(backing.save).not.toHaveBeenCalled();
+ expect(loaded).not.toBe(stored); expect(loaded?.acpx).not.toBe(stored.acpx);
+ expect(loaded?.acpx?.session_options).not.toBe(stored.acpx?.session_options);
+ expect(loaded?.acpx?.session_options?.env).not.toBe(currentEnvironment);
+ expect(stored.acpx?.session_options?.env).toEqual(oldEnvironment);
+ loaded!.acpx!.session_options!.env!.PAPERCLIP_API_KEY = "isolated-loaded-fixture";
+ expect(currentEnvironment.PAPERCLIP_API_KEY).toBe("current-credential-fixture");
+ });
+
+ it("saves only a copied env-free projection, preserving unrelated and caller metadata", async () => {
+ const input = freeze(Object.assign(record(), { caller_metadata: { keep: "caller-state", env: { preserve: "unrelated caller metadata" } } }));
+ const backing = stubStore(undefined), wrapper = createEphemeralSessionEnvironmentStore(backing, currentEnvironment);
+ await wrapper.save(input);
+ const saved = backing.save.mock.calls[0]![0];
+ const { env: _environment, ...expectedOptions } = input.acpx!.session_options!;
+ expect(saved).toEqual({ ...input, acpx: { ...input.acpx, session_options: expectedOptions } });
+ expect(saved).not.toBe(input); expect(saved.acpx).not.toBe(input.acpx);
+ expect(saved.acpx?.session_options).not.toBe(input.acpx?.session_options);
+ expect(saved.acpx?.session_options).not.toHaveProperty("env");
+ expect(input.acpx?.session_options?.env).toEqual(currentEnvironment);
+ });
+
+ for (const [name, acpx] of [
+ ["absent acpx", undefined],
+ ["explicit undefined acpx", undefined],
+ ["absent session options", { current_mode_id: "code" }],
+ ["undefined session options", { session_options: undefined }],
+ ["empty session options", { session_options: {} }],
+ ["undefined env", { session_options: { env: undefined, model: "fixture-model" } }],
+ ] as const) it(`preserves ${name} when saving and retains existing load injection semantics`, async () => {
+ const input = record();
+ if (name === "absent acpx") delete input.acpx; else input.acpx = acpx;
+ freeze(input);
+ const backing = stubStore(input), wrapper = createEphemeralSessionEnvironmentStore(backing, currentEnvironment);
+ await wrapper.save(input);
+ const saved = backing.save.mock.calls[0]![0];
+ if (name === "undefined env") expect(saved.acpx?.session_options).toEqual({ model: "fixture-model" });
+ else expect(saved).toEqual(input);
+ expect(Object.hasOwn(saved, "acpx")).toBe(Object.hasOwn(input, "acpx"));
+ if (saved.acpx && input.acpx) expect(Object.hasOwn(saved.acpx, "session_options")).toBe(Object.hasOwn(input.acpx, "session_options"));
+ const loaded = await wrapper.load(input.acpxRecordId);
+ expect(loaded?.acpx?.session_options?.env).toEqual(currentEnvironment);
+ expect(backing.save).toHaveBeenCalledTimes(1);
+ });
+
+ it("returns a missing record without saving or creating conversation state", async () => {
+ const backing = stubStore(undefined);
+ expect(await createEphemeralSessionEnvironmentStore(backing, currentEnvironment).load("missing")).toBeUndefined();
+ expect(backing.save).not.toHaveBeenCalled();
+ });
+
+ it("propagates load and save errors unchanged", async () => {
+ const failure = new Error("fixture store failure"), backing = stubStore(undefined);
+ backing.load.mockRejectedValue(failure); backing.save.mockRejectedValue(failure);
+ const wrapper = createEphemeralSessionEnvironmentStore(backing, currentEnvironment);
+ await expect(wrapper.load("fixture-record")).rejects.toBe(failure);
+ const input = freeze(record()); await expect(wrapper.save(input)).rejects.toBe(failure);
+ expect(input.acpx?.session_options?.env).toEqual(currentEnvironment);
+ });
+});
diff --git a/packages/adapter-utils/src/acpx-engine/ephemeral-session-environment.ts b/packages/adapter-utils/src/acpx-engine/ephemeral-session-environment.ts
new file mode 100644
index 00000000000..3bd59942ec9
--- /dev/null
+++ b/packages/adapter-utils/src/acpx-engine/ephemeral-session-environment.ts
@@ -0,0 +1,32 @@
+import type { AcpSessionStore } from "acpx/runtime";
+
+/** Keep the current run's environment in memory, outside persisted conversation state. */
+export function createEphemeralSessionEnvironmentStore(
+ persistedStore: AcpSessionStore,
+ currentEnvironment: Readonly>,
+): AcpSessionStore {
+ return {
+ async load(id) {
+ const record = await persistedStore.load(id);
+ if (!record) return undefined;
+ return {
+ ...record,
+ acpx: {
+ ...record.acpx,
+ session_options: {
+ ...record.acpx?.session_options,
+ env: { ...currentEnvironment },
+ },
+ },
+ };
+ },
+ save(record) {
+ const persisted = { ...record };
+ if (record.acpx?.session_options !== undefined) {
+ const { env: _environment, ...sessionOptions } = record.acpx.session_options;
+ persisted.acpx = { ...record.acpx, session_options: sessionOptions };
+ }
+ return persistedStore.save(persisted);
+ },
+ };
+}
diff --git a/packages/adapter-utils/src/acpx-engine/execute.test.ts b/packages/adapter-utils/src/acpx-engine/execute.test.ts
index e5762316d2a..571d07b81bf 100644
--- a/packages/adapter-utils/src/acpx-engine/execute.test.ts
+++ b/packages/adapter-utils/src/acpx-engine/execute.test.ts
@@ -2,7 +2,7 @@ import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
-import type { AcpRuntimeOptions } from "acpx/runtime";
+import { createRuntimeStore, type AcpRuntimeOptions, type AcpSessionRecord, type AcpSessionStore } from "acpx/runtime";
import type { AdapterExecutionContext, AdapterRuntimeMcpAccess } from "@paperclipai/adapter-utils";
import {
DEFAULT_REMOTE_SANDBOX_ADAPTER_TIMEOUT_SEC,
@@ -37,9 +37,12 @@ import {
type AcpxEngineExecutorOptions,
} from "./execute.js";
import { ACPX_HANDSHAKE_TIMEOUT_MS } from "./constants.js";
+import { sessionCodec } from "./session-codec.js";
import { runChildProcess } from "../server-utils.js";
import { createPromptContextFixture } from "../test-fixtures/prompt-context.js";
import { setExpensiveWorkspaceGitExecutor } from "../git-workspace-sync.js";
+import { createWorkspaceRestoreTeardown } from "../workspace-restore-teardown.js";
+import { withWorkspaceRestoreDiagnostics, withWorkspaceRestoreStep } from "../workspace-restore-diagnostics.js";
import { resolveReferencedSourceIgnore } from "../sandbox-managed-runtime.js";
import {
getActiveStepContext,
@@ -49,6 +52,7 @@ import {
const tempRoots: string[] = [];
+let defaultGeminiTestHome: string | undefined;
async function makeTempRoot() {
const root = await fs.mkdtemp(path.join(os.tmpdir(), "paperclip-acpx-skills-"));
@@ -57,6 +61,7 @@ async function makeTempRoot() {
}
afterEach(async () => {
+ defaultGeminiTestHome = undefined;
// A remote run stages a process-session bridge whose detached event writer can
// still be flushing a trailing event file into `.../process-sessions//events`
// when the run's own best-effort `client.remove(sessionDir)` (which production
@@ -169,12 +174,20 @@ async function runExecutor(
runtime?: Record;
executionTransport?: Record;
authToken?: string;
+ agentIdentity?: AdapterExecutionContext["agentIdentity"];
executionTarget?: Record;
runtimeMcp?: AdapterRuntimeMcpAccess;
prepareRemoteManagedHome?: AcpxEngineExecutorOptions["prepareRemoteManagedHome"];
startupTraceContext?: AdapterExecutionContext["startupTraceContext"];
} = {},
) {
+ // Skill reconciliation must never inspect or modify the developer's real
+ // Gemini home. Keep one private home across this test's resumed turns.
+ const configuredEnv = config.env as Record | undefined;
+ if (config.agent === "gemini" && !(typeof configuredEnv?.HOME === "string" && configuredEnv.HOME.trim())) {
+ defaultGeminiTestHome ??= await makeTempRoot();
+ config = { ...config, env: { ...configuredEnv, HOME: defaultGeminiTestHome } };
+ }
const runtimeOptions: Record[] = [];
const configOptions: Array<{ key: string; value: string }> = [];
const sessionInputs: Record[] = [];
@@ -207,6 +220,7 @@ async function runExecutor(
context: options.context ?? {},
executionTransport: options.executionTransport,
authToken: options.authToken,
+ agentIdentity: options.agentIdentity,
executionTarget: options.executionTarget,
runtimeMcp: options.runtimeMcp,
startupTraceContext: options.startupTraceContext,
@@ -376,6 +390,42 @@ const ALLOWED_TURN_SPAN_ATTRIBUTE_KEYS = new Set([
]);
describe("shared ACPX engine runtime behavior", () => {
+ it("integrates the env-free store while delivering current credentials and options to the provider", async () => {
+ const root = await makeTempRoot();
+ const stateDir = path.join(root, "state");
+ const first = await runExecutor({ agent: "claude", agentCommand: "node ./fake-acp.js", cwd: root, stateDir,
+ env: { ANTHROPIC_API_KEY: "first-fixture-credential" } });
+ const liveEnvironment = (first.sessionInputs[0]!.sessionOptions as { env: Record }).env;
+ expect(liveEnvironment.ANTHROPIC_API_KEY).toBe("first-fixture-credential");
+ const store = first.runtimeOptions[0]!.sessionStore as AcpSessionStore;
+ const record: AcpSessionRecord = {
+ schema: "acpx.session.v1", acpxRecordId: "integration-record", acpSessionId: "integration-session",
+ agentCommand: "fixture-provider", cwd: root, name: "fixture", createdAt: "2026-10-03T00:00:00.000Z",
+ lastUsedAt: "2026-10-03T00:00:01.000Z", lastSeq: 0,
+ eventLog: { active_path: path.join(stateDir, "fixture.jsonl"), segment_count: 1, max_segment_bytes: 1024, max_segments: 2 },
+ messages: [], updated_at: "2026-10-03T00:00:01.000Z", cumulative_token_usage: {}, request_token_usage: {},
+ acpx: { session_options: { env: { ...liveEnvironment }, model: "retained-model", max_turns: 4 } },
+ };
+ await store.save(record);
+ const file = path.join(stateDir, "sessions", "integration-record.json");
+ const saved = await fs.readFile(file, "utf8");
+ expect(saved).not.toContain("first-fixture-credential");
+ expect(JSON.parse(saved).acpx.session_options).toEqual({ model: "retained-model", max_turns: 4 });
+ expect(record.acpx?.session_options?.env).toEqual(liveEnvironment);
+ // A file written by the prior engine is loaded with the current run's env,
+ // without altering the provider launch or deleting unrelated options.
+ record.acpx!.session_options!.env = { ANTHROPIC_API_KEY: "legacy-fixture-credential" };
+ await createRuntimeStore({ stateDir }).save(record);
+ const second = await runExecutor({ agent: "claude", agentCommand: "node ./fake-acp.js", cwd: root, stateDir,
+ env: { ANTHROPIC_API_KEY: "rotated-fixture-credential" } }, { runtime: { sessionParams: first.result.sessionParams } });
+ expect((second.sessionInputs[0]!.sessionOptions as { env: Record }).env.ANTHROPIC_API_KEY).toBe("rotated-fixture-credential");
+ const rotatedStore = second.runtimeOptions[0]!.sessionStore as AcpSessionStore;
+ const loaded = await rotatedStore.load(record.acpxRecordId);
+ expect(loaded?.acpx?.session_options).toMatchObject({ env: { ANTHROPIC_API_KEY: "rotated-fixture-credential" }, model: "retained-model", max_turns: 4 });
+ await rotatedStore.save(loaded!);
+ const resaved = await fs.readFile(file, "utf8");
+ for (const value of ["first-fixture-credential", "legacy-fixture-credential", "rotated-fixture-credential"]) expect(resaved).not.toContain(value);
+ });
it.each(["claude", "codex", "gemini", "kimi", "custom"])("defaults the legacy %s engine to full auto on fresh and resumed runs", async (agent) => {
const root = await makeTempRoot();
const config = {
@@ -509,6 +559,20 @@ describe("shared ACPX engine runtime behavior", () => {
);
});
+ it("keeps identity and scoped API access without exposing configured service tokens to Codex shells", async () => {
+ const { meta } = await runExecutor({ agent: "codex", env: { MY_SERVICE_TOKEN: "assigned-tool-token" } }, {
+ authToken: "assigned-run-token",
+ agentIdentity: { keyId: "sha256:test", publicKeyPem: "public", privateKeyPem: "private" },
+ });
+ const config = JSON.parse(String((meta[0]?.env as Record).CODEX_CONFIG));
+ expect(config.shell_environment_policy.include_only).toEqual(expect.arrayContaining([
+ "PAPERCLIP_API_KEY", "PAPERCLIP_AGENT_PRIVATE_KEY",
+ ]));
+ expect(config.shell_environment_policy.include_only).not.toContain("MY_SERVICE_TOKEN");
+ expect(JSON.stringify(config)).not.toContain("assigned-run-token");
+ expect(JSON.stringify(config)).not.toContain("assigned-tool-token");
+ });
+
it("forwards arbitrary Codex model IDs verbatim without picker-dependent session config", async () => {
const arbitraryModel = "gpt-999-test-does-not-exist";
const { configOptions, meta } = await runExecutor({
@@ -564,7 +628,7 @@ describe("shared ACPX engine runtime behavior", () => {
});
});
- it("keeps Claude startup model handling and Gemini session config handling unchanged", async () => {
+ it("sets Claude and Gemini models at startup without unsupported picker calls", async () => {
const claude = await runExecutor({ agent: "claude", model: "claude-opus-4-7" });
expect((claude.meta[0]?.env as Record).ANTHROPIC_MODEL).toBe(
"claude-opus-4-7",
@@ -575,9 +639,10 @@ describe("shared ACPX engine runtime behavior", () => {
agent: "gemini",
model: "gemini-2.5-pro",
thinkingEffort: "high",
+ env: { GEMINI_MODEL: "stale-model" },
});
+ expect((gemini.meta[0]?.env as Record).GEMINI_MODEL).toBe("gemini-2.5-pro");
expect(gemini.configOptions).toEqual([
- { key: "model", value: "gemini-2.5-pro" },
{ key: "effort", value: "high" },
]);
});
@@ -596,6 +661,9 @@ describe("shared ACPX engine runtime behavior", () => {
const fresh = await runExecutor(config, { context });
expect(fresh.turnInputs).toHaveLength(1);
const prompt = String(fresh.turnInputs[0]?.text ?? "");
+ expect(prompt).toContain("You are agent agent-1");
+ expect(prompt).toContain("Connection tools:");
+ expect(prompt).not.toContain("Execution contract:");
expect(prompt).toContain(context.paperclipTaskMarkdownAssignment);
expect(prompt).toContain(context.paperclipTaskCommunicationGuidance);
expect(prompt).not.toContain('"objective":');
@@ -609,10 +677,18 @@ describe("shared ACPX engine runtime behavior", () => {
const resumed = await runExecutor(config, { context, runtime: { sessionParams: fresh.result.sessionParams } });
expect(resumed.sessionInputs[0]?.resumeSessionId).toBe(fresh.result.sessionId);
const resumedPrompt = String(resumed.turnInputs[0]?.text ?? "");
+ expect(resumedPrompt).not.toContain("Execution contract:");
expect(resumedPrompt).toContain(context.paperclipTaskMarkdownAssignmentCompact);
expect(resumedPrompt).not.toContain(context.paperclipTaskCommunicationGuidance);
expect(resumedPrompt).not.toContain('"id":"comment-first"');
expect(resumedPrompt).toContain('"id":"comment-second"');
+ const reset = await runExecutor(config, { context });
+ expect(reset.sessionInputs[0]?.resumeSessionId).toBeUndefined();
+ const resetPrompt = String(reset.turnInputs[0]?.text ?? "");
+ expect(resetPrompt).toContain("You are agent agent-1");
+ expect(resetPrompt).toContain("Connection tools:");
+ expect(resetPrompt).toContain(context.paperclipTaskMarkdownAssignment);
+ expect(resetPrompt).not.toContain("Execution contract:");
});
it("includes Paperclip env and API access notes in the ACPX prompt without leaking the token", async () => {
@@ -746,10 +822,10 @@ describe("shared ACPX engine runtime behavior", () => {
expect(prompt).not.toContain("Create child issues");
expect(prompt).not.toContain("Use child issues");
}
- expect(String(fresh.meta[0]?.prompt)).toContain(custom ? "Custom agent instructions." : "Continue your Paperclip conversation");
- expect(String(reset.meta[0]?.prompt)).toContain(custom ? "Custom agent instructions." : "Continue your Paperclip conversation");
+ expect(String(fresh.meta[0]?.prompt)).toContain(custom ? "Custom agent instructions." : "You are agent agent-1");
+ expect(String(reset.meta[0]?.prompt)).toContain(custom ? "Custom agent instructions." : "You are agent agent-1");
const ordinary = await runExecutor({ ...config, promptTemplate: "" }, { context: { ...context, conversationMode: false } });
- expect(String(ordinary.meta[0]?.prompt)).toContain("Execution contract:");
+ expect(String(ordinary.meta[0]?.prompt)).not.toContain("Execution contract:");
expect(String(ordinary.meta[0]?.prompt)).toContain("Create child issues from the approved plan");
});
@@ -1534,6 +1610,29 @@ describe("shared ACPX engine runtime behavior", () => {
expect(await pathExists(path.join(codexHome, "skills", operational.runtimeName, "SKILL.md"))).toBe(true);
});
+ it.each(["codex", "gemini"])("refreshes the %s skill root when a connection home changes between turns", async (agent) => {
+ const root = await makeTempRoot();
+ const operational = {
+ ...await createSkill(path.join(root, "skills"), "paperclip"),
+ key: "paperclipai/paperclip/paperclip",
+ };
+ const homes = [path.join(root, "first-home"), path.join(root, "next-home")];
+ for (const home of homes) {
+ const { meta } = await runExecutor({
+ agent,
+ stateDir: path.join(root, "state"),
+ env: agent === "codex" ? { CODEX_HOME: home } : { HOME: home },
+ paperclipRuntimeSkills: [operational],
+ paperclipSkillSync: { desiredSkills: [] },
+ });
+ const skillsHome = agent === "codex" ? path.join(home, "skills") : path.join(home, ".gemini", "skills");
+ expect(String(meta[0]?.prompt ?? "")).toContain(`Skill root for this run: ${skillsHome}`);
+ expect(String(meta[0]?.prompt ?? "")).toContain("Resolve referenced scripts and files relative to that skill");
+ if (home === homes[1]) expect(String(meta[0]?.prompt ?? "")).not.toContain(homes[0]!);
+ await fs.rm(home, { recursive: true, force: true });
+ }
+ });
+
it.skipIf(process.platform === "win32")("removes legacy ACPX Codex skill symlinks when a skill is no longer desired", async () => {
const root = await makeTempRoot();
const skillRoot = path.join(root, "skills");
@@ -2713,6 +2812,24 @@ describe("shared ACPX engine runtime behavior", () => {
expect(first.result.sessionParams?.configFingerprint).not.toBe(second.result.sessionParams?.configFingerprint);
});
+ it.each(["claude", "codex", "grok", "gemini", "kimi"])("resumes %s with added and removed MCP servers and current credentials", async (agent) => {
+ const root = await makeTempRoot();
+ const config = { agent, cwd: root, stateDir: path.join(root, "state"), paperclipRuntimeSkills: [], paperclipSkillSync: { desiredSkills: [] } };
+ const first = await runExecutor(config);
+ const server = { name: "github", url: "https://example.test/github/mcp", connectionId: "github", token: "current-token" };
+ const second = await runExecutor(config, {
+ runtime: { sessionParams: sessionCodec.deserialize(first.result.sessionParams), taskKey: "default" },
+ runtimeMcp: { getServers: () => [server] }, context: { refreshTools: true },
+ });
+ expect(second.sessionInputs[0]?.resumeSessionId).toBe("backend-session");
+ expect(second.result.sessionParams?.configFingerprint).toBe(first.result.sessionParams?.configFingerprint);
+ expect(second.runtimeOptions[0]?.mcpServers).toEqual([{ type: "http", name: "github", url: server.url, headers: [{ name: "Authorization", value: "Bearer current-token" }] }]);
+ expect(JSON.stringify(sessionCodec.serialize(second.result.sessionParams ?? null))).not.toContain("current-token");
+ const third = await runExecutor(config, { runtime: { sessionParams: sessionCodec.deserialize(second.result.sessionParams) }, context: { refreshTools: true } });
+ expect(third.sessionInputs[0]?.resumeSessionId).toBe("backend-session");
+ expect(third.runtimeOptions[0]?.mcpServers).toEqual([]);
+ });
+
it("injects runtime MCP servers and fingerprints their identity without persisting bearer tokens", async () => {
const root = await makeTempRoot();
const baseConfig = {
@@ -2802,6 +2919,21 @@ describe("findAncestorBin", () => {
});
describe("gemini ACP flag selection", () => {
+ it("uses the canonical local Gemini workspace for ACP filesystem requests", async () => {
+ const root = await makeTempRoot();
+ const workspace = path.join(root, "workspace");
+ const alias = path.join(root, "workspace-alias");
+ await fs.mkdir(workspace);
+ await fs.symlink(workspace, alias, process.platform === "win32" ? "junction" : "dir");
+ const { runtimeOptions, sessionInputs } = await runExecutor({
+ agent: "gemini", agentCommand: "node ./fake-acp.js", cwd: alias,
+ stateDir: path.join(root, "state"),
+ });
+ const canonical = await fs.realpath(workspace);
+ expect(runtimeOptions[0]!.cwd).toBe(canonical);
+ expect(sessionInputs[0]!.cwd).toBe(canonical);
+ });
+
it("parses semantic version parts from gemini --version output", () => {
expect(parseGeminiVersionParts("0.30.0")).toEqual([0, 30, 0]);
expect(parseGeminiVersionParts("gemini-cli v1.2.3\n")).toEqual([1, 2, 3]);
@@ -2955,6 +3087,9 @@ describe("gemini ACP flag selection", () => {
expect(explicitZero.runtimeOptions[0]?.timeoutMs).toBe(
DEFAULT_REMOTE_SANDBOX_ADAPTER_TIMEOUT_SEC * 1000,
);
+ expect(explicitZero.result.resultJson?.adapterExecutionTimeout).toEqual({
+ timeoutSec: DEFAULT_REMOTE_SANDBOX_ADAPTER_TIMEOUT_SEC, source: "sandbox_default",
+ });
// A negative timeoutSec is the documented opt-out from any adapter
// wall-clock timeout, sandbox targets included.
@@ -2963,6 +3098,7 @@ describe("gemini ACP flag selection", () => {
sandboxContext,
);
expect(negativeOptOut.runtimeOptions[0]?.timeoutMs).toBeUndefined();
+ expect(negativeOptOut.result.resultJson?.adapterExecutionTimeout).toEqual({ timeoutSec: 0, source: "configured" });
const startLine = negativeOptOut.logs.find(
(entry) => entry.stream === "stderr" && entry.text.includes("Adapter execution timeout:"),
);
@@ -3028,6 +3164,7 @@ describe("gemini ACP flag selection", () => {
"Set adapterConfig.timeoutSec to raise it.";
expect(result.timedOut).toBe(true);
expect(result.errorCode).toBe("acpx_timeout");
+ expect(result.resultJson?.adapterExecutionTimeout).toEqual({ timeoutSec: 1, source: "configured" });
expect(result.errorMessage).toBe(expectedMessage);
expect(cancelReasons).toContain(expectedMessage);
expect(result.resultJson).toMatchObject({ acpObservedEventCount: 0, acpPendingToolCount: 0, acpToolInventoryComplete: true });
@@ -3453,6 +3590,16 @@ describe("ACPX engine remote sandbox staging seam (PR 1: workspace + cwd)", () =
expect(sessionInputs[0]?.cwd).not.toBe(localCwd);
});
+ it("preserves Gemini's in-sandbox workspace without host canonicalization", async () => {
+ const { stateDir, localCwd, remoteCwd, executionTarget } = await setupRemoteSandbox();
+ const { sessionInputs, runtimeOptions } = await runExecutor(
+ { agent: "gemini", agentCommand: "node ./fake-acp.js", stateDir, cwd: localCwd },
+ { authToken: "real-run-jwt", executionTarget },
+ );
+ expect(runtimeOptions[0]?.cwd).toBe(remoteCwd);
+ expect(sessionInputs[0]?.cwd).toBe(remoteCwd);
+ });
+
it("test_remote_warm_handle_reused_after_cwd_change", async () => {
const { stateDir, localCwd, remoteCwd, executionTarget } = await setupRemoteSandbox();
const ensureInputs: Array> = [];
@@ -3632,6 +3779,33 @@ describe("ACPX engine remote managed-home seam (PR 2: per-adapter home seed)", (
expect(path.isAbsolute(remoteAssetDir)).toBe(true);
});
+ it("retains bounded restore diagnostics through real settlement and result reproduction", async () => {
+ const { stateDir, localCwd, executionTarget } = await setupRemoteSandbox();
+ const failure = Object.assign(new Error("private-restore-path and command"), { code: 1, stderr: "private-restore-stderr" });
+ const { result } = await runExecutor(
+ { agent: "custom", agentCommand: "node ./fake-acp.js", stateDir, cwd: localCwd },
+ {
+ authToken: "real-run-jwt", executionTarget,
+ prepareRemoteManagedHome: async (input) => {
+ const stagedRuntime = await input.stage([]);
+ return {
+ stagedRuntime,
+ teardown: createWorkspaceRestoreTeardown({
+ stagedRuntime: { restoreWorkspace: () => withWorkspaceRestoreDiagnostics("workspace", () =>
+ withWorkspaceRestoreStep("git_integration", async () => { throw failure; })) },
+ onLog: async () => {}, startMessage: "Restoring workspace", failurePrefix: "Restore failed",
+ }),
+ };
+ },
+ },
+ );
+ expect(result.resultJson).toMatchObject({
+ workspaceRestoreFailure: "restore_failed",
+ workspaceRestoreDiagnostic: { phase: "workspace", step: "git_integration", errorCode: "unknown", exitCode: 1 },
+ });
+ expect(JSON.stringify(result)).not.toContain("private-restore-");
+ });
+
it("test_remote_seam_teardown_fires_once_on_exit", async () => {
const { stateDir, localCwd, executionTarget } = await setupRemoteSandbox();
let teardownCalls = 0;
@@ -3749,9 +3923,54 @@ describe("ACPX engine Claude skill bundle staging (remote ACP lane)", () => {
};
}
+ it("advertises folded routing metadata and exact staged paths without injecting skill bodies", async () => {
+ const root = await makeTempRoot();
+ const cwd = path.join(root, "worktree");
+ const stateDir = path.join(root, "state");
+ await fs.mkdir(cwd, { recursive: true });
+ const skill = await createSkill(path.join(root, "sources"), "paperclip--versioned", [
+ "---", "description: >-", " Use for Paperclip-managed tasks", " and durable task documents.",
+ "---", "PRIVATE_SKILL_BODY_RECIPE", "",
+ ].join("\n"));
+ const { meta, result } = await runExecutor({
+ agent: "claude", agentCommand: "node ./fake-acp.js", stateDir, cwd,
+ paperclipRuntimeSkills: [skill], paperclipSkillSync: { desiredSkills: [skill.key] },
+ });
+ const bundle = await onlyChildDir(path.join(stateDir, "runtime-skills", "claude"));
+ const stagedFile = path.join(bundle, ".claude", "skills", skill.runtimeName, "SKILL.md");
+ const prompt = String(meta[0]?.prompt ?? "");
+ expect(prompt).toContain(`- ${skill.runtimeName}: Use for Paperclip-managed tasks and durable task documents. (file: ${stagedFile})`);
+ expect(prompt).not.toContain("PRIVATE_SKILL_BODY_RECIPE");
+ expect(prompt).not.toContain(skill.source);
+ expect(result.sessionParams?.skills).toMatchObject({ selectedSkills: [skill.runtimeName] });
+ await expect(fs.readFile(stagedFile, "utf8")).resolves.toContain("PRIVATE_SKILL_BODY_RECIPE");
+ });
+
+ it("bounds routing descriptions and keeps files discoverable when metadata is absent or malformed", async () => {
+ const root = await makeTempRoot();
+ const cwd = path.join(root, "worktree");
+ const stateDir = path.join(root, "state");
+ await fs.mkdir(cwd, { recursive: true });
+ const sources = path.join(root, "sources");
+ const bounded = await createSkill(sources, "bounded", `---\ndescription: ${"x".repeat(600)}\n---\nBOUNDED_BODY\n`);
+ const absent = await createSkill(sources, "absent", "# ABSENT_BODY\n");
+ const malformed = await createSkill(sources, "malformed", "---\ndescription: incomplete header\nMALFORMED_BODY\n");
+ const skills = [bounded, absent, malformed];
+ const { meta } = await runExecutor({
+ agent: "claude", agentCommand: "node ./fake-acp.js", stateDir, cwd,
+ paperclipRuntimeSkills: skills, paperclipSkillSync: { desiredSkills: skills.map((skill) => skill.key) },
+ });
+ const prompt = String(meta[0]?.prompt ?? "");
+ expect(prompt).toContain(`- bounded: ${"x".repeat(512)} (file: `);
+ expect(prompt).not.toContain("x".repeat(513));
+ expect(prompt).toMatch(/- absent \(file: .*\/absent\/SKILL\.md\)/);
+ expect(prompt).toMatch(/- malformed \(file: .*\/malformed\/SKILL\.md\)/);
+ for (const body of ["BOUNDED_BODY", "ABSENT_BODY", "MALFORMED_BODY"]) expect(prompt).not.toContain(body);
+ });
+
it("rewrites the prompt and skill identity onto the in-sandbox skill root once the bundle is staged", async () => {
const { stateDir, localCwd, executionTarget } = await setupRemoteSandbox();
- const skill = await createSkill(path.join(localCwd, "skills"), "review");
+ const skill = await createSkill(path.join(localCwd, "skills"), "review", "---\ndescription: Review requested task documents.\n---\n# review\nREMOTE_BODY_ONLY\n");
const { meta, result } = await runExecutor(
{
@@ -3774,6 +3993,8 @@ describe("ACPX engine Claude skill bundle staging (remote ACP lane)", () => {
const inSandboxSkillsRoot = prompt.match(/Skill root: (\S+)/)![1]!;
expect(inSandboxSkillsRoot).not.toBe(hostSkillsHome);
+ expect(prompt).toContain(`- review: Review requested task documents. (file: ${path.join(inSandboxSkillsRoot, "review", "SKILL.md")})`);
+ expect(prompt).not.toContain("REMOTE_BODY_ONLY");
await expect(
fs.readFile(path.join(inSandboxSkillsRoot, skill.runtimeName, "SKILL.md"), "utf8"),
).resolves.toContain("# review");
diff --git a/packages/adapter-utils/src/acpx-engine/execute.ts b/packages/adapter-utils/src/acpx-engine/execute.ts
index b65db8efb35..c0474eccb38 100644
--- a/packages/adapter-utils/src/acpx-engine/execute.ts
+++ b/packages/adapter-utils/src/acpx-engine/execute.ts
@@ -1,4 +1,5 @@
import { cancellableSandboxStartup } from "./startup-cancellation.js";
+import { withAdapterExecutionPhase, type AdapterExecutionPhase } from "../execution-phase.js";
import fs from "node:fs/promises";
import fsSync from "node:fs";
import os from "node:os";
@@ -6,6 +7,7 @@ import path from "node:path";
import { execFile } from "node:child_process";
import { promisify } from "node:util";
import { createHash, randomUUID } from "node:crypto";
+import { parseFrontmatterMarkdown } from "@paperclipai/shared";
import { fileURLToPath } from "node:url";
import type {
AdapterBillingType,
@@ -48,6 +50,7 @@ import {
} from "./terminal-session-failure.js";
export type { AcpxTerminalSessionFailure } from "./terminal-session-failure.js";
import type { WorkspaceRestoreFailureCode, WorkspaceRestoreOutcome } from "../workspace-restore-merge.js";
+import type { WorkspaceRestoreDiagnostic } from "../workspace-restore-diagnostics.js";
import {
classifyWorkspaceRestoreFailure,
describeWorkspaceRestoreFailure,
@@ -74,6 +77,8 @@ import {
readPaperclipIssueWorkModeFromContext,
renderTemplate,
resolvePaperclipInstanceRootForAdapter,
+ hydrateFreshSessionHandoff,
+ selectInitialCommunicationGuidance,
selectPaperclipPromptSections,
resolveLegacyPaperclipDesiredSkillNames,
removeMaintainerOnlySkillSymlinks,
@@ -82,6 +87,7 @@ import {
type PaperclipSkillEntry,
} from "@paperclipai/adapter-utils/server-utils";
import { shellQuote } from "@paperclipai/adapter-utils/ssh";
+import { createEphemeralSessionEnvironmentStore } from "./ephemeral-session-environment.js";
import {
createAcpRuntime,
createAgentRegistry,
@@ -97,7 +103,6 @@ import {
type AcpRuntimeTurnResult,
type AcpRuntimeUsageBreakdown,
type AcpRuntimeUsageCost,
- type AcpSessionStore,
} from "acpx/runtime";
import {
ACPX_DUPLEX_LOSS_CANCEL_DEADLINE_MS,
@@ -1180,11 +1185,24 @@ async function prepareClaudeSkillRuntime(input: {
}
const selectedNames = materializedNames.sort();
+ const skillDescriptions = await Promise.all(selectedNames.map(async (name) => {
+ const file = path.join(skillsHome, name, "SKILL.md");
+ let description = "";
+ try {
+ const parsed = parseFrontmatterMarkdown(await fs.readFile(file, "utf8"));
+ description = asString(parsed.frontmatter.description, "").replace(/\s+/g, " ").trim().slice(0, 512);
+ } catch {
+ // A readable skill without valid routing metadata remains available.
+ // Do not substitute its body for a missing description.
+ }
+ return `- ${name}${description ? `: ${description}` : ""} (file: ${file})`;
+ }));
const promptInstructions = selectedNames.length > 0
? [
"Paperclip has materialized selected runtime skills for this ACPX Claude session.",
`Skill root: ${skillsHome}`,
`Selected skills: ${selectedNames.join(", ")}`,
+ ...skillDescriptions,
"When a task calls for one of these skills, read its SKILL.md from that root and follow it.",
].join("\n")
: "";
@@ -1473,9 +1491,10 @@ function buildCodexStartupConfig(input: {
requestedModel: string;
requestedThinkingEffort: string;
fastMode: boolean;
+ identityEnvironmentKeys?: string[];
}): { value: string | null; invalidExistingConfig: boolean } {
const hasRuntimeConfig = Boolean(
- input.requestedModel || input.requestedThinkingEffort || input.fastMode,
+ input.requestedModel || input.requestedThinkingEffort || input.fastMode || input.identityEnvironmentKeys,
);
if (!hasRuntimeConfig) return { value: null, invalidExistingConfig: false };
@@ -1506,6 +1525,11 @@ function buildCodexStartupConfig(input: {
},
}
: {}),
+ ...(input.identityEnvironmentKeys ? {
+ features: { ...parseObject(existing.features), ...(input.fastMode ? { fast_mode: true } : {}), shell_snapshot: false },
+ shell_environment_policy: { ...parseObject(existing.shell_environment_policy),
+ inherit: "all", ignore_default_excludes: true, include_only: input.identityEnvironmentKeys },
+ } : {}),
}),
invalidExistingConfig,
};
@@ -1541,6 +1565,7 @@ function buildSessionParams(input: {
mode: prepared.mode,
stateDir: prepared.stateDir,
configFingerprint: prepared.fingerprint,
+ mcpFingerprint: shortHash(prepared.mcpIdentity),
...(prepared.requestedModel ? { model: prepared.requestedModel } : {}),
...(prepared.requestedThinkingEffort ? { thinkingEffort: prepared.requestedThinkingEffort } : {}),
...(prepared.fastMode ? { fastMode: true } : {}),
@@ -1940,7 +1965,7 @@ async function buildRuntime(input: {
await fs.mkdir(stateDir, { recursive: true });
const envConfig = parseObject(config.env);
- const env: Record = { ...buildPaperclipEnv(agent), PAPERCLIP_RUN_ID: runId };
+ const env: Record = { ...buildPaperclipEnv(agent, input.ctx.agentIdentity), PAPERCLIP_RUN_ID: runId };
const wakeTaskId =
(typeof context.taskId === "string" && context.taskId.trim()) ||
(typeof context.issueId === "string" && context.issueId.trim()) ||
@@ -2020,9 +2045,22 @@ async function buildRuntime(input: {
if (requestedModel && acpxAgent === "claude" && !env.ANTHROPIC_MODEL) {
env.ANTHROPIC_MODEL = requestedModel;
}
+ // Gemini CLI reads GEMINI_MODEL when creating each ACP session. Its ACP
+ // implementation supports set_model, but not set_config_option; configure
+ // the selected model before startup without changing the transport.
+ if (requestedModel && acpxAgent === "gemini") {
+ env.GEMINI_MODEL = requestedModel;
+ }
if (acpxAgent === "codex") {
const codexStartupConfig = buildCodexStartupConfig({
existingConfig: env.CODEX_CONFIG,
+ ...(input.ctx.agentIdentity ? { identityEnvironmentKeys: [...new Set([
+ "PATH", "HOME", "LANG", "TMPDIR", "CODEX_HOME",
+ "PAPERCLIP_AGENT_KEY_ID", "PAPERCLIP_AGENT_PUBLIC_KEY", "PAPERCLIP_AGENT_PRIVATE_KEY",
+ // Preserve Codex's default secret-name exclusions. The short-lived
+ // Paperclip API token is required by the agent skill's Bash/curl calls.
+ ...Object.keys(env).filter(key => key === "PAPERCLIP_API_KEY" || !/key|secret|token/i.test(key)),
+ ])] } : {}),
requestedModel,
requestedThinkingEffort,
fastMode,
@@ -2165,8 +2203,9 @@ async function buildRuntime(input: {
// (fingerprint, compat, persist, ensureSession, error) bind to THIS single
// value so a warm/resumable session created with the in-sandbox cwd is reused
// — not invalidated — on the next run. Remote runner-backed → the in-sandbox
- // workspace dir; local and the runner-less fallback → the HOST cwd,
- // byte-identical to today.
+ // workspace dir; local and the runner-less fallback → the HOST cwd.
+ // Local Gemini resolves tool paths through realpath. Give its ACP filesystem
+ // client the same canonical root so workspace aliases stay within that root.
//
// PR 3: the staging transport derives the in-sandbox workspace dir
// deterministically from the target's `remoteCwd` (it is exactly `remoteCwd`
@@ -2179,11 +2218,14 @@ async function buildRuntime(input: {
const sessionCwd =
useRemoteProcessSession && executionTarget?.kind === "remote"
? executionTarget.remoteCwd
- : cwd;
+ : acpxAgent === "gemini" && !executionTargetIsRemote
+ ? await fs.realpath(cwd)
+ : cwd;
// The 17 fields the session fingerprint hashes. Company, agent, and task
// identifiers are NOT here; they scope the outer session key only (see
// `keyIdentity`). The fingerprint builder accepts only this identity.
const fingerprintIdentity: SessionFingerprintIdentity = {
+ ...(input.ctx.agentIdentity ? { agentIdentityKeyId: input.ctx.agentIdentity.keyId } : {}),
acpxAgent,
agentCommand: agentCommand ?? acpxAgent,
cwd: path.resolve(sessionCwd),
@@ -2208,7 +2250,9 @@ async function buildRuntime(input: {
defaultMode: paperclipClaudeSettings.defaultMode,
}
: null,
- mcpServers: mcpIdentity,
+ // Qualified built-in ACP harnesses reconnect to the supplied MCP servers
+ // on session/load. Keep their conversation identity independent of tools.
+ mcpServers: ["claude", "codex", "grok", "gemini", "kimi"].includes(acpxAgent) ? [] : mcpIdentity,
secretManifestHash: shortHash(secretManifest),
// Fold the resolved adapter env (all applied user-configured values —
// plain, secret_ref, and stable PAPERCLIP_* config such as an explicit
@@ -2521,6 +2565,28 @@ async function buildRuntime(input: {
await emitRunPhaseTiming(input.ctx, "start_transport", nowMs() - startTransportStart, "failed");
throw err;
}
+ const currentSkillRoot = acpxAgent === "codex" && runtimeEnv.CODEX_HOME
+ ? path.join(runtimeEnv.CODEX_HOME, "skills")
+ : acpxAgent === "gemini" && !executionTargetIsRemote && typeof skillsIdentity.skillsHome === "string"
+ ? skillsIdentity.skillsHome
+ : null;
+ if (currentSkillRoot && Array.isArray(skillsIdentity.selectedSkills) && skillsIdentity.selectedSkills.length > 0) {
+ // Managed connection homes are disposable. A resumed conversation may
+ // remember a previous home's skill paths; supply the current root on every
+ // turn, after the remote launch environment has rebased CODEX_HOME.
+ skillPromptInstructions = [
+ `Paperclip has materialized selected runtime skills for this ACPX ${acpxAgent === "codex" ? "Codex" : "Gemini"} run.`,
+ `Skill root for this run: ${currentSkillRoot}`,
+ `Selected skills: ${skillsIdentity.selectedSkills.join(", ")}`,
+ "When a task calls for one of these skills, read its SKILL.md from this root and follow it. Resolve referenced scripts and files relative to that skill. Use this run's root even when an earlier turn used a different path.",
+ ...(acpxAgent === "gemini" && skillsIdentity.selectedSkills.includes("paperclip")
+ ? [
+ "Before calling Paperclip APIs or delivering task artifacts, read the selected paperclip skill's SKILL.md and its referenced artifact workflow. A completion comment does not upload an artifact or change task status.",
+ "Gemini's shell tool rejects command substitution. Write JSON request bodies to a workspace file and use curl --data-binary @file, or use the selected skill's helpers, instead of constructing a body with command substitution.",
+ ]
+ : []),
+ ].join("\n");
+ }
// The relay runs on the host with the sanitized remote launch environment.
// Its /usr/bin/env node shebang cannot rely on that environment's PATH.
const overrideCommand = processSessionBridge?.agentCommand
@@ -2588,13 +2654,14 @@ async function buildRuntime(input: {
function sessionConfigOptions(prepared: AcpxPreparedRuntime): Array<{ key: string; value: string }> {
const options: Array<{ key: string; value: string }> = [];
- // Claude and Codex runtime config is pre-set via startup env vars; skip
+ // Claude, Codex and Gemini runtime config is pre-set via startup env vars; skip
// set_config_option to avoid ACP-server picker validation rejecting valid
// backend model IDs that are not advertised by the local ACP server.
if (
prepared.requestedModel &&
prepared.acpxAgent !== "claude" &&
- prepared.acpxAgent !== "codex"
+ prepared.acpxAgent !== "codex" &&
+ prepared.acpxAgent !== "gemini"
) {
options.push({ key: "model", value: prepared.requestedModel });
}
@@ -3021,7 +3088,8 @@ async function buildPrompt(ctx: AdapterExecutionContext, resumedSession: boolean
!resumedSession && bootstrapPromptTemplate.trim().length > 0
? renderTemplate(bootstrapPromptTemplate, templateData).trim()
: "";
- const { taskContextNote, wakePrompt } = selectPaperclipPromptSections(context, { resumedSession });
+ await hydrateFreshSessionHandoff(ctx, { resumedSession });
+ const { taskContextNote, wakePrompt } = selectPaperclipPromptSections(context, { resumedSession, includeCommunicationGuidance: false });
const externalChatTurn = isPaperclipExternalChatTurn(context.paperclipWake);
const shouldUseResumeDeltaPrompt = resumedSession && wakePrompt.length > 0;
const promptInstructionsPrefix = shouldUseResumeDeltaPrompt ? "" : instructionsPrefix;
@@ -3035,6 +3103,7 @@ async function buildPrompt(ctx: AdapterExecutionContext, resumedSession: boolean
const prompt = joinPromptSections([
promptInstructionsPrefix,
renderedBootstrapPrompt,
+ selectInitialCommunicationGuidance(context, { resumedSession }),
wakePrompt,
sessionHandoffNote,
taskContextNote,
@@ -4055,7 +4124,7 @@ export function createAcpxEngineExecutor(deps: AcpxEngineExecutorOptions = {}) {
// status stay exactly what the turn produced — this is a signal, not an
// outcome change.
let workspaceRestoreFailureField:
- | { workspaceRestoreFailure: WorkspaceRestoreFailureCode }
+ | { workspaceRestoreFailure: WorkspaceRestoreFailureCode; workspaceRestoreDiagnostic?: WorkspaceRestoreDiagnostic }
| Record = {};
// The one settlement step name whose error can be the same workspace-
// restore failure the adapter teardown closure already classifies (a
@@ -4072,9 +4141,9 @@ export function createAcpxEngineExecutor(deps: AcpxEngineExecutorOptions = {}) {
: teardownErr instanceof Error
? teardownErr.message
: String(teardownErr);
- await ctx
+ await withAdapterExecutionPhase(ctx, "phase_reporting", () => ctx
.onLog("stderr", `[paperclip] ACPX teardown step "${step}" failed: ${reason}\n`)
- .catch(() => {});
+ .catch(() => {}));
};
// Emit one per-phase timing run-log event. It is not an OpenTelemetry
// export and it is not a Telemetry event: it carries the phase name
@@ -4085,15 +4154,15 @@ export function createAcpxEngineExecutor(deps: AcpxEngineExecutorOptions = {}) {
emitRunPhaseTiming(ctx, phase, now() - startMs, outcome);
// Time a settlement step and emit its phase timing on every path. A step
// error still emits `failed` before it re-throws to the Phase 3 error policy.
- const timedPhase = async (phase: string, run: () => Promise | void): Promise => {
+ const timedPhase = async (phase: AdapterExecutionPhase, run: () => Promise | void): Promise => {
const start = now();
try {
- await run();
+ await withAdapterExecutionPhase(ctx, phase, run);
} catch (error) {
- await emitPhase(phase, start, "failed");
+ await withAdapterExecutionPhase(ctx, "phase_reporting", () => emitPhase(phase, start, "failed"));
throw error;
}
- await emitPhase(phase, start, "ok");
+ await withAdapterExecutionPhase(ctx, "phase_reporting", () => emitPhase(phase, start, "ok"));
};
// The turn the run started. It is hoisted to the run scope so the settlement
// `endSession` step can cancel a running turn before it closes the runtime
@@ -4221,7 +4290,14 @@ export function createAcpxEngineExecutor(deps: AcpxEngineExecutorOptions = {}) {
// same session still sees it. The borrow clears the entry's idle timer, so
// the reused runtime cannot expire under its own timer while this run uses
// it (today's `clearWarmHandleTimer(cached)` after the reuse decision).
- const cached = canResume ? hostStore.borrow(prepared.sessionKey) : undefined;
+ let cached = canResume ? hostStore.borrow(prepared.sessionKey) : undefined;
+ if (cached && (ctx.context.refreshTools === true
+ || asString(previousParams.mcpFingerprint, "") !== shortHash(prepared.mcpIdentity)
+ // MCP bearer credentials are run-scoped, even for an unchanged catalog.
+ || prepared.mcpServers.length > 0)) {
+ await hostStore.discard(prepared.sessionKey);
+ cached = undefined;
+ }
childStderrState = cached?.childStderrState ?? { logPath: null, pendingLiveLine: "" };
processIdentitySink = cached?.processIdentitySink ?? {
current: ctx.onSpawn,
@@ -4234,26 +4310,9 @@ export function createAcpxEngineExecutor(deps: AcpxEngineExecutorOptions = {}) {
flushChildStderr(childStderrState);
childStderrState.logPath = prepared.childStderrLogPath;
const persistedRuntimeStore = createRuntimeStore({ stateDir: prepared.stateDir });
- const runtimeStore: AcpSessionStore = {
- async load(id) {
- const record = await persistedRuntimeStore.load(id);
- if (!record) return undefined;
- // ACPX resumes from the stored session options rather than the
- // options passed to ensureSession. Keep conversation state, but
- // launch the provider with this run's credentials and scratch paths.
- return {
- ...record,
- acpx: {
- ...record.acpx,
- session_options: {
- ...record.acpx?.session_options,
- env: { ...prepared.env },
- },
- },
- };
- },
- save: (record) => persistedRuntimeStore.save(record),
- };
+ // Resume with this run's launch environment; keep it out of the saved
+ // conversation record without mutating the live runtime's options.
+ const runtimeStore = createEphemeralSessionEnvironmentStore(persistedRuntimeStore, prepared.env);
const runtimeOptions: PaperclipAcpRuntimeOptions = {
cwd: prepared.cwd,
// Host-only spawn cwd for the relay proxy on the remote process-session
@@ -4748,6 +4807,8 @@ export function createAcpxEngineExecutor(deps: AcpxEngineExecutorOptions = {}) {
? `Requested ACPX model: ${prepared.requestedModel} (set via ANTHROPIC_MODEL env at startup).`
: prepared.acpxAgent === "codex"
? `Requested ACPX model: ${prepared.requestedModel} (set via CODEX_CONFIG at startup).`
+ : prepared.acpxAgent === "gemini"
+ ? `Requested ACPX model: ${prepared.requestedModel} (set via GEMINI_MODEL at startup).`
: `Requested ACPX model: ${prepared.requestedModel}.`,
]
: []),
@@ -4846,7 +4907,7 @@ export function createAcpxEngineExecutor(deps: AcpxEngineExecutorOptions = {}) {
if (ctx.signal?.aborted) armStopDeadline();
return {
cancel: async (reason: string) => {
- await turn.cancel({ reason });
+ await withAdapterExecutionPhase(ctx, "cancel_turn", () => turn.cancel({ reason }));
},
};
};
@@ -5300,7 +5361,7 @@ export function createAcpxEngineExecutor(deps: AcpxEngineExecutorOptions = {}) {
: baseSettlement;
// Cancel a running turn before the close (the turn-error path).
if (settlement.cancelTurnReason && activeTurn) {
- await activeTurn.cancel({ reason: settlement.cancelTurnReason }).catch(() => {});
+ await withAdapterExecutionPhase(ctx, "cancel_turn", () => activeTurn!.cancel({ reason: settlement.cancelTurnReason! }).catch(() => {}));
}
const existing = warmHandles.get(prepared.sessionKey);
// Re-read the duplex control-channel disposition here, at the
@@ -5339,26 +5400,26 @@ export function createAcpxEngineExecutor(deps: AcpxEngineExecutorOptions = {}) {
) {
// A matching warm entry closes through the warm store, which also
// clears its idle timer and flushes its child stderr.
- runtimeStopConfirmed = await closeWarmHandle({
+ runtimeStopConfirmed = await withAdapterExecutionPhase(ctx, "close_session", () => closeWarmHandle({
handles: warmHandles,
key: prepared.sessionKey,
entry: existing,
reason: settlement.reason,
discardPersistentState: settlement.discardPersistentState,
- });
+ }));
return;
}
const onCloseError = settlement.recordCloseError || ctx.signal?.aborted
? (closeErr: unknown) => recordTeardownError("runtime-close", closeErr)
: () => {};
- await runtime
+ await withAdapterExecutionPhase(ctx, "close_session", () => runtime
.close({
handle: settlement.handle,
reason: settlement.reason,
discardPersistentState: settlement.discardPersistentState,
})
.then(() => { runtimeStopConfirmed = true; })
- .catch(onCloseError);
+ .catch(onCloseError));
if (settlement.dropWarmEntry && warmHandleMatches(existing, runtime, settlement.handle) && existing) {
clearWarmHandleTimer(existing);
warmHandles.delete(prepared.sessionKey);
@@ -5389,18 +5450,21 @@ export function createAcpxEngineExecutor(deps: AcpxEngineExecutorOptions = {}) {
// mutable provider files. Require the owned close or local OS handle.
const stopped = runtimeStopConfirmed || (!prepared.processSessionBridge && capturedProcessExited(processIdentitySink?.localProcess));
try {
- if (stopped) await ctx.onProviderStopped?.();
+ if (stopped) await withAdapterExecutionPhase(ctx, "instruction_collection", () => ctx.onProviderStopped?.());
} catch {
// Match ACP's fail-soft teardown policy without describing this as
// a workspace restore failure or exposing paths from a raw error.
await recordTeardownError("instruction-collection", new Error("Instruction collection failed after provider stop. No instruction save is claimed."));
} finally {
- await runRuntimeSpan("sandbox.syncBack", async () => {
+ await withAdapterExecutionPhase(ctx, "workspace_restore", () => runRuntimeSpan("sandbox.syncBack", async () => {
const restoreOutcome = await syncBackManagedHome(prepared);
if (!restoreOutcome.ok) {
- workspaceRestoreFailureField = { workspaceRestoreFailure: restoreOutcome.code };
+ workspaceRestoreFailureField = {
+ workspaceRestoreFailure: restoreOutcome.code,
+ ...(restoreOutcome.diagnostic ? { workspaceRestoreDiagnostic: restoreOutcome.diagnostic } : {}),
+ };
}
- });
+ }));
}
}),
// The staging lease releases as the run's final act, AFTER the coordinator
@@ -5469,6 +5533,15 @@ export function createAcpxEngineExecutor(deps: AcpxEngineExecutorOptions = {}) {
} },
};
}
+ // Preserve the policy resolved for this execution target. The server
+ // cannot reconstruct sandbox defaults from the stored agent config.
+ capturedResult = {
+ ...capturedResult,
+ resultJson: {
+ ...capturedResult.resultJson,
+ adapterExecutionTimeout: { ...prepared.timeoutResolution },
+ },
+ };
// The sync-back settlement step runs before this reproduces the result
// (settlement precedes reproduction), so a failed workspace restore is
// already recorded by the time we get here. Merge it into `resultJson`
diff --git a/packages/adapter-utils/src/acpx-engine/filesystem-protocol.test.ts b/packages/adapter-utils/src/acpx-engine/filesystem-protocol.test.ts
new file mode 100644
index 00000000000..44da2874807
--- /dev/null
+++ b/packages/adapter-utils/src/acpx-engine/filesystem-protocol.test.ts
@@ -0,0 +1,110 @@
+import fs from "node:fs/promises";
+import os from "node:os";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
+import { createRequire } from "node:module";
+import { afterEach, describe, expect, it } from "vitest";
+import { createAcpRuntime, createAgentRegistry, createRuntimeStore } from "acpx/runtime";
+
+const runnerRuntimePath = createRequire(new URL("../../../paperclip-runner/package.json", import.meta.url)).resolve("acpx/runtime");
+const nativeRuntime = await import(runnerRuntimePath) as typeof import("acpx/runtime");
+const runtimes = [
+ { version: "0.12.0", api: { createAcpRuntime, createAgentRegistry, createRuntimeStore } },
+ { version: "0.13.1", api: nativeRuntime },
+];
+const roots: string[] = [];
+const fixture = fileURLToPath(new URL("../../../../scripts/mcp-fixtures/servers/acp-filesystem-agent.mjs", import.meta.url));
+afterEach(async () => {
+ await Promise.all(roots.splice(0).map((root) => fs.rm(root, { recursive: true, force: true })));
+});
+
+async function workspace() {
+ const root = await fs.mkdtemp(path.join(os.tmpdir(), "paperclip-acp-filesystem-"));
+ roots.push(root);
+ const cwd = path.join(root, "workspace");
+ await fs.mkdir(cwd);
+ return { root, cwd: await fs.realpath(cwd) };
+}
+
+async function drive(api: (typeof runtimes)[number]["api"], input: {
+ cwd: string;
+ root: string;
+ permissionMode?: "approve-all" | "deny-all";
+ operations: Array<{ method: string; path: string; content?: string }>;
+}) {
+ let stderr = "";
+ const runtime = api.createAcpRuntime({
+ cwd: input.cwd,
+ sessionStore: api.createRuntimeStore({ stateDir: path.join(input.root, "state") }),
+ agentRegistry: api.createAgentRegistry({ overrides: { custom: `${JSON.stringify(process.execPath.replaceAll("\\", "/"))} ${JSON.stringify(fixture.replaceAll("\\", "/"))}` } }),
+ permissionMode: input.permissionMode ?? "approve-all",
+ nonInteractivePermissions: "deny",
+ inheritProcessEnv: false,
+ onAgentStderr: (chunk: string) => { stderr += chunk; },
+ });
+ const handle = await runtime.ensureSession({
+ sessionKey: "filesystem-protocol", agent: "custom", mode: "oneshot",
+ cwd: input.cwd, sessionOptions: { env: {} },
+ });
+ try {
+ for await (const _event of runtime.runTurn({
+ handle, text: JSON.stringify({ operations: input.operations }),
+ mode: "prompt", requestId: "filesystem-protocol", timeoutMs: 5_000,
+ })) { /* Drain the real ACP turn. */ }
+ return stderr.split("\n").filter((line) => line.startsWith("FS_RESULT "))
+ .map((line) => JSON.parse(line.slice("FS_RESULT ".length)));
+ } finally {
+ await runtime.close({ handle, reason: "done" });
+ }
+}
+
+describe.each(runtimes)("ACPX $version filesystem protocol", ({ api }) => {
+ it("reports a missing file as an ACP resource error and then creates and reads it", async () => {
+ const input = await workspace();
+ const file = path.join(input.cwd, "new.json");
+ const content = '{"proof":"synthetic"}\n';
+ const receipts = await drive(api, { ...input, operations: [
+ { method: "fs/read_text_file", path: file },
+ { method: "fs/write_text_file", path: file, content },
+ { method: "fs/read_text_file", path: file },
+ ] });
+ expect(receipts).toHaveLength(3);
+ expect(receipts[0].error).toMatchObject({ code: -32002, message: expect.stringContaining("Resource not found") });
+ expect(receipts[1].error).toBeUndefined();
+ expect(receipts[2].result.content).toBe(content);
+ expect(await fs.readFile(file, "utf8")).toBe(content);
+ });
+
+ it("keeps unrelated paths denied for both reads and writes", async () => {
+ const input = await workspace();
+ const outside = path.join(await fs.realpath(input.root), "outside.json");
+ await fs.writeFile(outside, "unchanged");
+ const receipts = await drive(api, { ...input, operations: [
+ { method: "fs/read_text_file", path: outside },
+ { method: "fs/write_text_file", path: outside, content: "changed" },
+ ] });
+ expect(receipts).toHaveLength(2);
+ expect(receipts.every((receipt) => receipt.error && receipt.error.code !== -32002)).toBe(true);
+ expect(await fs.readFile(outside, "utf8")).toBe("unchanged");
+ });
+
+ it("preserves deny-all permissions instead of converting denials into missing files", async () => {
+ const input = await workspace();
+ const file = path.join(input.cwd, "denied.json");
+ const receipts = await drive(api, { ...input, permissionMode: "deny-all", operations: [
+ { method: "fs/read_text_file", path: file },
+ { method: "fs/write_text_file", path: file, content: "denied" },
+ ] });
+ expect(receipts).toHaveLength(2);
+ expect(receipts.every((receipt) => receipt.error && receipt.error.code !== -32002)).toBe(true);
+ await expect(fs.stat(file)).rejects.toMatchObject({ code: "ENOENT" });
+ });
+
+ it.skipIf(process.platform === "win32")("keeps other filesystem failures distinct from missing files", async () => {
+ const input = await workspace();
+ const receipts = await drive(api, { ...input, operations: [{ method: "fs/read_text_file", path: input.cwd }] });
+ expect(receipts).toHaveLength(1);
+ expect(receipts[0].error.code).not.toBe(-32002);
+ });
+
+});
diff --git a/packages/adapter-utils/src/acpx-engine/run-contracts.ts b/packages/adapter-utils/src/acpx-engine/run-contracts.ts
index 173cb5db9aa..1610ed7d911 100644
--- a/packages/adapter-utils/src/acpx-engine/run-contracts.ts
+++ b/packages/adapter-utils/src/acpx-engine/run-contracts.ts
@@ -439,6 +439,7 @@ export interface PaperclipClaudeSettingsIdentity {
* or a resumable session and forces a fresh launch.
*/
export interface SessionFingerprintIdentity {
+ readonly agentIdentityKeyId?: string;
readonly acpxAgent: string;
readonly agentCommand: string;
readonly cwd: string;
diff --git a/packages/adapter-utils/src/acpx-engine/session-codec.ts b/packages/adapter-utils/src/acpx-engine/session-codec.ts
index 52f8083c906..218495df042 100644
--- a/packages/adapter-utils/src/acpx-engine/session-codec.ts
+++ b/packages/adapter-utils/src/acpx-engine/session-codec.ts
@@ -30,6 +30,7 @@ export const sessionCodec: AdapterSessionCodec = {
...(readString(record.mode) ? { mode: readString(record.mode) } : {}),
...(readString(record.stateDir) ? { stateDir: readString(record.stateDir) } : {}),
...(readString(record.configFingerprint) ? { configFingerprint: readString(record.configFingerprint) } : {}),
+ ...(readString(record.mcpFingerprint) ? { mcpFingerprint: readString(record.mcpFingerprint) } : {}),
...(readString(record.workspaceId) ? { workspaceId: readString(record.workspaceId) } : {}),
...(readString(record.repoUrl) ? { repoUrl: readString(record.repoUrl) } : {}),
...(readString(record.repoRef) ? { repoRef: readString(record.repoRef) } : {}),
diff --git a/packages/adapter-utils/src/acpx-engine/settlement-characterization.test.ts b/packages/adapter-utils/src/acpx-engine/settlement-characterization.test.ts
index 593fc644d31..ff74f3c8f3c 100644
--- a/packages/adapter-utils/src/acpx-engine/settlement-characterization.test.ts
+++ b/packages/adapter-utils/src/acpx-engine/settlement-characterization.test.ts
@@ -292,6 +292,110 @@ describe("ACP settlement — Layer A: engine teardown orchestration", () => {
vi.clearAllMocks();
});
+ it.each(["close_session", "stop_transport", "instruction_collection", "workspace_restore", "phase_reporting", "close_error_reporting"])(
+ "keeps %s visible while its real settlement await is stalled",
+ async (blockedPhase) => {
+ const { stateDir, localCwd, executionTarget } = await setupRemoteSandbox();
+ stubBridges();
+ let resume!: () => void;
+ let entered!: () => void;
+ const gate = new Promise((resolve) => { resume = resolve; });
+ const reached = new Promise((resolve) => { entered = resolve; });
+ const block = () => { entered(); return gate; };
+ const scopes = new Map();
+ if (blockedPhase === "stop_transport") {
+ vi.mocked(startAdapterExecutionTargetPaperclipBridge).mockImplementation(async () => ({ env: {}, stop: block }) as never);
+ }
+ const execute = createAcpxEngineExecutor({
+ createRuntime: () => ({
+ ensureSession: async () => okHandle,
+ startTurn: () => blockedPhase === "close_error_reporting" ? throwingTurn() : completedTurn(),
+ close: blockedPhase === "close_session" ? block : async () => {
+ if (blockedPhase === "close_error_reporting") throw new Error("close fixture failed");
+ },
+ }) as never,
+ prepareRemoteManagedHome: async (input) => ({
+ stagedRuntime: await input.stage([]),
+ teardown: async () => {
+ if (blockedPhase === "workspace_restore") await block();
+ return { ok: true };
+ },
+ }),
+ });
+ const execution = execute({
+ runId: "pending-settlement-fixture",
+ ...remoteArgs(stateDir, localCwd, executionTarget),
+ onProviderStopped: blockedPhase === "instruction_collection" ? block : async () => {},
+ onExecutionPhase: (phase: string) => {
+ const token = Symbol();
+ scopes.set(token, phase);
+ return () => { scopes.delete(token); };
+ },
+ onEvent: async (event: { eventType: string; payload?: Record }) => {
+ if (blockedPhase === "phase_reporting" && event.eventType === "run.phase.timing" && event.payload?.phase === "end_session") await block();
+ },
+ onLog: async (_stream: string, text: string) => {
+ if (blockedPhase === "close_error_reporting" && text.includes("close fixture failed")) await block();
+ },
+ } as never);
+ try {
+ await reached;
+ expect([...scopes.values()].at(-1)).toBe(blockedPhase === "close_error_reporting" ? "phase_reporting" : blockedPhase);
+ } finally {
+ resume();
+ expect((await execution).exitCode).toBe(blockedPhase === "close_error_reporting" ? 1 : 0);
+ }
+ expect(scopes.size).toBe(0);
+ },
+ );
+
+ it("keeps the primary Stop cancellation visible until its await settles", async () => {
+ const { stateDir, localCwd, executionTarget } = await setupRemoteSandbox();
+ stubBridges();
+ const controller = new AbortController();
+ let started!: () => void;
+ let cancelled!: () => void;
+ let resume!: () => void;
+ const turnStarted = new Promise((resolve) => { started = resolve; });
+ const cancellationStarted = new Promise((resolve) => { cancelled = resolve; });
+ const gate = new Promise((resolve) => { resume = resolve; });
+ const scopes = new Map();
+ const execute = createAcpxEngineExecutor({
+ createRuntime: () => ({
+ ensureSession: async () => okHandle,
+ startTurn: () => {
+ started();
+ return {
+ events: (async function* () { await gate; })(),
+ result: gate.then(() => ({ status: "cancelled", stopReason: "cancelled" })),
+ cancel: async () => { cancelled(); await gate; },
+ };
+ },
+ close: async () => {},
+ }) as never,
+ });
+ const execution = execute({
+ runId: "pending-cancel-fixture",
+ ...remoteArgs(stateDir, localCwd, executionTarget),
+ signal: controller.signal,
+ onExecutionPhase: (phase: string) => {
+ const token = Symbol();
+ scopes.set(token, phase);
+ return () => { scopes.delete(token); };
+ },
+ } as never);
+ try {
+ await turnStarted;
+ controller.abort();
+ await cancellationStarted;
+ expect([...scopes.values()].at(-1)).toBe("cancel_turn");
+ } finally {
+ resume();
+ expect((await execution).exitCode).toBe(1);
+ }
+ expect(scopes.size).toBe(0);
+ });
+
it("test_clean_completed_remote_teardown_runs_bridge_stop_then_sync_back_then_lease_release", async () => {
// cleanupRemoteBridges (execute.ts:2306-2326) fixes the sub-order for a clean
// exit: stop both bridges (allSettled) → run the managed-home sync-back
diff --git a/packages/adapter-utils/src/execution-phase.test.ts b/packages/adapter-utils/src/execution-phase.test.ts
new file mode 100644
index 00000000000..a90c2c81f13
--- /dev/null
+++ b/packages/adapter-utils/src/execution-phase.test.ts
@@ -0,0 +1,26 @@
+import { expect, it, vi } from "vitest";
+import { withAdapterExecutionPhase } from "./execution-phase.js";
+
+it("enters before a stalled await and releases only when that operation settles", async () => {
+ const release = vi.fn();
+ const enter = vi.fn(() => release);
+ let resolve!: (value: number) => void;
+ const operation = new Promise((done) => { resolve = done; });
+ const result = withAdapterExecutionPhase({ onExecutionPhase: enter }, "instruction_collection", () => operation);
+ expect(enter).toHaveBeenCalledWith("instruction_collection");
+ await Promise.resolve();
+ expect(release).not.toHaveBeenCalled();
+ resolve(7);
+ await expect(result).resolves.toBe(7);
+ expect(release).toHaveBeenCalledOnce();
+});
+
+it.each(["enter", "release"])("preserves values and errors when the %s diagnostic callback throws", async (where) => {
+ const context = { onExecutionPhase: () => {
+ if (where === "enter") throw new Error("diagnostic failure");
+ return () => { throw new Error("diagnostic failure"); };
+ } };
+ await expect(withAdapterExecutionPhase(context, "workspace_restore", () => 3)).resolves.toBe(3);
+ const failure = new Error("operation failure");
+ await expect(withAdapterExecutionPhase(context, "workspace_restore", () => { throw failure; })).rejects.toBe(failure);
+});
diff --git a/packages/adapter-utils/src/execution-phase.ts b/packages/adapter-utils/src/execution-phase.ts
new file mode 100644
index 00000000000..0ebc8447630
--- /dev/null
+++ b/packages/adapter-utils/src/execution-phase.ts
@@ -0,0 +1,28 @@
+/** Content-free, in-memory diagnostic scopes. These never establish stop proof. */
+export const ADAPTER_EXECUTION_PHASES = [
+ "host_execution", "adapter_execution", "end_session", "cancel_turn", "close_session",
+ "settle_reuse", "stop_transport", "sync_back", "instruction_collection",
+ "workspace_restore", "phase_reporting", "instruction_cleanup", "lease_release",
+] as const;
+
+export type AdapterExecutionPhase = (typeof ADAPTER_EXECUTION_PHASES)[number];
+export type AdapterExecutionPhaseSink = (phase: AdapterExecutionPhase) => (() => void) | void;
+
+export function isAdapterExecutionPhase(value: unknown): value is AdapterExecutionPhase {
+ return ADAPTER_EXECUTION_PHASES.some((phase) => phase === value);
+}
+
+/** A broken diagnostic sink must not change execution or teardown outcomes. */
+export async function withAdapterExecutionPhase(
+ context: { onExecutionPhase?: AdapterExecutionPhaseSink },
+ phase: AdapterExecutionPhase,
+ operation: () => T | Promise,
+): Promise {
+ let release: (() => void) | void = undefined;
+ try { release = context.onExecutionPhase?.(phase); } catch { /* diagnostics only */ }
+ try {
+ return await operation();
+ } finally {
+ try { release?.(); } catch { /* diagnostics only */ }
+ }
+}
diff --git a/packages/adapter-utils/src/execution-target-sandbox.test.ts b/packages/adapter-utils/src/execution-target-sandbox.test.ts
index bf600fdd74c..51ab309890f 100644
--- a/packages/adapter-utils/src/execution-target-sandbox.test.ts
+++ b/packages/adapter-utils/src/execution-target-sandbox.test.ts
@@ -1,3 +1,5 @@
+import { generateKeyPairSync, randomBytes, verify } from "node:crypto";
+import { buildAgentIdentityEnv } from "./server-utils.js";
import { createServer } from "node:http";
import http2 from "node:http2";
import net from "node:net";
@@ -50,7 +52,7 @@ import {
type StartupTracer,
} from "./acpx-engine/startup-timing.js";
import { createSandboxRunLogTailFactory, type SandboxRunLogTailFactory } from "./sandbox-run-log-stream.js";
-import { runChildProcess } from "./server-utils.js";
+import { runChildProcess, type RunProcessResult } from "./server-utils.js";
import { shellQuote } from "./ssh.js";
import type { CommandManagedDuplexChannel } from "./command-managed-runtime.js";
import {
@@ -308,6 +310,29 @@ describe("sandbox adapter execution targets", () => {
return events.filter((event) => event.stream === stream).map((event) => event.chunk).join("");
}
+ it("delivers cryptographic identity through a remote sandbox process transport", async () => {
+ const rootDir = await mkdtemp(path.join(os.tmpdir(), "identity-remote-process-"));
+ cleanupDirs.push(rootDir);
+ const keys = generateKeyPairSync("ed25519");
+ const identity = {
+ keyId: "sha256:remote-identity",
+ publicKeyPem: keys.publicKey.export({ type: "spki", format: "pem" }).toString(),
+ privateKeyPem: keys.privateKey.export({ type: "pkcs8", format: "pem" }).toString(),
+ };
+ const target: AdapterSandboxExecutionTarget = {
+ kind: "remote", transport: "sandbox", providerKey: "local-test", remoteCwd: rootDir,
+ timeoutMs: 30_000, runner: createLocalSandboxRunner(),
+ };
+ const challenge = randomBytes(32);
+ const result = await runAdapterExecutionTargetProcess("identity-remote", target, process.execPath,
+ ["-e", `const {sign}=require('node:crypto');process.stdout.write(sign(null,Buffer.from(process.argv[1],'hex'),process.env.PAPERCLIP_AGENT_PRIVATE_KEY).toString('base64'));`, challenge.toString("hex")], {
+ cwd: rootDir, env: buildAgentIdentityEnv(identity), timeoutSec: 5, graceSec: 1, onLog: async () => {},
+ });
+ expect(result.exitCode).toBe(0);
+ expect(verify(null, challenge, keys.publicKey, Buffer.from(result.stdout, "base64"))).toBe(true);
+ expect((await readRuntimeTextFiles(rootDir)).join("\n")).not.toContain(identity.privateKeyPem.split("\n")[1]);
+ });
+
it("executes through the provider-neutral runner without a remote spec", async () => {
const runner = {
execute: vi.fn(async () => ({
@@ -1815,7 +1840,7 @@ describe("sandbox adapter execution targets", () => {
);
const delegate = createLocalSandboxRunner();
- const execs: Array<{ useSession?: boolean; bypassSession?: boolean; script: string }> = [];
+ const execs: Array<{ useSession?: boolean; bypassSession?: boolean; timeoutMs?: number; script: string }> = [];
const runner = {
execute: vi.fn(
async (
@@ -1827,6 +1852,7 @@ describe("sandbox adapter execution targets", () => {
execs.push({
useSession: input.useSession,
bypassSession: input.bypassSession,
+ timeoutMs: input.timeoutMs,
script: input.args?.[1] ?? "",
});
return delegate.execute(input);
@@ -1851,7 +1877,7 @@ describe("sandbox adapter execution targets", () => {
args: [childPath],
cwd: rootDir,
env: {},
- timeoutSec: 5,
+ timeoutSec: 4 * 60 * 60,
onLog: async () => {},
streamOutputViaSession: true,
});
@@ -1872,6 +1898,7 @@ describe("sandbox adapter execution targets", () => {
const sessionExecs = execs.filter((exec) => exec.useSession === true);
expect(sessionExecs).toHaveLength(1);
expect(sessionExecs[0]!.bypassSession).not.toBe(true);
+ expect(sessionExecs[0]!.timeoutMs).toBe(4 * 60 * 60 * 1000);
expect(sessionExecs[0]!.script).toContain("node ");
// Every other exec is bridge control-plane plumbing. Each must force
@@ -1881,6 +1908,7 @@ describe("sandbox adapter execution targets", () => {
expect(controlExecs.length).toBeGreaterThan(0);
for (const exec of controlExecs) {
expect(exec.bypassSession).toBe(true);
+ expect(exec.timeoutMs).toBe(30_000);
}
} finally {
await bridge?.stop();
@@ -1888,6 +1916,43 @@ describe("sandbox adapter execution targets", () => {
});
});
+ it.each(["launch", "payload setup"])("bounds a hung process-session %s", async (stage) => {
+ vi.useFakeTimers();
+ try {
+ const runner = {
+ execute: vi.fn(async (input: { args?: string[] }) => {
+ const script = input.args?.[1] ?? "";
+ if ((stage === "launch" && script.includes("nohup")) ||
+ (stage === "payload setup" && script.startsWith("chmod 600"))) {
+ return new Promise(() => {});
+ }
+ return {
+ exitCode: 0, signal: null, timedOut: false, stdout: '{"uploaded":true}', stderr: "",
+ pid: null, startedAt: new Date().toISOString(),
+ };
+ }),
+ };
+ let error: unknown;
+ const operation = startAdapterExecutionTargetProcessSessionBridge({
+ runId: "run-hung-setup",
+ runtimeRootDir: "/workspace/runtime",
+ target: { kind: "remote", transport: "sandbox", remoteCwd: "/workspace", runner },
+ adapterKey: "acpx", command: "cat", args: [], cwd: "/workspace",
+ env: stage === "payload setup" ? { LARGE_VALUE: "x".repeat(70_000) } : {},
+ timeoutSec: 4 * 60 * 60,
+ }).catch((caught) => { error = caught; });
+ await vi.advanceTimersByTimeAsync(30_000);
+ expect(error).toEqual(new Error("Sandbox bridge control command timed out after 30000ms."));
+ await operation;
+ expect(runner.execute.mock.calls.filter(([input]) => input.args?.[1]?.includes("nohup")))
+ .toHaveLength(stage === "launch" ? 1 : 0);
+ expect(runner.execute).toHaveBeenLastCalledWith(expect.objectContaining({ timeoutMs: 30_000 }));
+ expect(vi.getTimerCount()).toBe(0);
+ } finally {
+ vi.useRealTimers();
+ }
+ });
+
it("applies the remote sandbox fallback when adapter timeoutSec is unset", () => {
const sandboxTarget: AdapterSandboxExecutionTarget = {
kind: "remote",
@@ -1896,9 +1961,8 @@ describe("sandbox adapter execution targets", () => {
runner: createLocalSandboxRunner(),
};
- // The sandbox default is a 4h wall-clock backstop matching the recovery
- // watchdog critical threshold (ACTIVE_RUN_OUTPUT_CRITICAL_THRESHOLD_MS);
- // the output-inactivity monitor remains the primary hang detector.
+ // The sandbox default stays at four hours independently of the earlier
+ // informational output-silence warnings and bridge control deadlines.
expect(DEFAULT_REMOTE_SANDBOX_ADAPTER_TIMEOUT_SEC).toBe(4 * 60 * 60);
expect(resolveAdapterExecutionTargetTimeoutSec(sandboxTarget, 0)).toBe(
DEFAULT_REMOTE_SANDBOX_ADAPTER_TIMEOUT_SEC,
@@ -2697,7 +2761,7 @@ describe("sandbox adapter execution targets", () => {
}
});
- it("uses the effective adapter timeout when starting the sandbox callback bridge", async () => {
+ it("bounds callback bridge operations independently of the adapter run timeout", async () => {
const rootDir = await mkdtemp(path.join(os.tmpdir(), "paperclip-execution-target-bridge-timeout-"));
cleanupDirs.push(rootDir);
const remoteCwd = path.join(rootDir, "workspace");
@@ -2744,9 +2808,10 @@ describe("sandbox adapter execution targets", () => {
try {
expect(bridge).not.toBeNull();
expect(runner.execute).toHaveBeenCalled();
- expect(
- runner.execute.mock.calls.some(([input]) => input.timeoutMs === DEFAULT_REMOTE_SANDBOX_ADAPTER_TIMEOUT_SEC * 1000),
- ).toBe(true);
+ for (const [input] of runner.execute.mock.calls) {
+ expect(input.timeoutMs).toBeGreaterThan(0);
+ expect(input.timeoutMs).toBeLessThanOrEqual(30_000);
+ }
} finally {
await bridge?.stop();
await new Promise((resolve) => apiServer.close(() => resolve()));
diff --git a/packages/adapter-utils/src/execution-target-stdin-race.test.ts b/packages/adapter-utils/src/execution-target-stdin-race.test.ts
index a87deb0e89a..b92e4eb7d28 100644
--- a/packages/adapter-utils/src/execution-target-stdin-race.test.ts
+++ b/packages/adapter-utils/src/execution-target-stdin-race.test.ts
@@ -591,6 +591,7 @@ describe("stdin file race (parent PAP-4037)", () => {
["Remote command failed: Request failed with status code 502", 1],
["Cloudflare sandbox bridge request failed with HTTP 502. sensitive-input", 1],
["Remote command failed: sensitive-input", 1],
+ ["Provider never responds", 1],
] as const)("bounds input failure %s to %i attempts and stops later writes", async (failure, expectedAttempts) => {
const rootDir = await mkdtemp(path.join(os.tmpdir(), "paperclip-stdin-failed-"));
cleanupDirs.push(rootDir);
@@ -602,11 +603,13 @@ describe("stdin file race (parent PAP-4037)", () => {
if (script.includes("/stdin/000000000002.json")) laterWrite = true;
if (script.includes("/stdin/000000000001.json")) {
attempts += 1;
+ if (failure === "Provider never responds") await new Promise(() => {});
throw new Error(failure);
}
});
const bridge = await startAdapterExecutionTargetProcessSessionBridge({
runId: "run-stdin-failed",
+ timeoutSec: failure === "Provider never responds" ? 5 : undefined,
target: { kind: "remote", transport: "sandbox", remoteCwd: rootDir, runner },
runtimeRootDir: path.join(rootDir, "runtime"),
adapterKey: "acpx", command: "cat", args: [], cwd: rootDir, env: {},
diff --git a/packages/adapter-utils/src/execution-target.ts b/packages/adapter-utils/src/execution-target.ts
index 6b118011d43..aa66d00ddb8 100644
--- a/packages/adapter-utils/src/execution-target.ts
+++ b/packages/adapter-utils/src/execution-target.ts
@@ -38,6 +38,7 @@ import {
createSandboxCallbackBridgeToken,
DEFAULT_SANDBOX_CALLBACK_BRIDGE_MAX_BODY_BYTES,
HTTP2_SANDBOX_CALLBACK_BRIDGE_ROUTE_ALLOWLIST,
+ runSandboxBridgeControlCommand,
SANDBOX_CALLBACK_BRIDGE_ENTRYPOINT,
SANDBOX_CALLBACK_BRIDGE_HTTP2_MODE,
sandboxCallbackBridgeDirectories,
@@ -372,13 +373,9 @@ export interface AdapterExecutionTargetProcessSessionBridgeHandle {
export { sanitizeRemoteExecutionEnv } from "./remote-execution-env.js";
-// 4-hour wall-clock backstop for sandbox-backed adapter runs. This is a
-// last-resort kill switch, not the primary hang detector: genuinely hung runs
-// are caught much earlier by the adapters' output-inactivity monitors (e.g.
-// codex-local's 7-minute monitor). The value intentionally matches the
-// recovery watchdog's ACTIVE_RUN_OUTPUT_CRITICAL_THRESHOLD_MS (4h) in
-// server/src/services/recovery/service.ts so healthy long runs are never
-// killed by the adapter before the watchdog would even consider them stuck.
+// Four-hour wall-clock backstop for sandbox-backed adapter runs. Keep this
+// execution limit independent of the earlier informational silence warnings
+// and the short deadlines for bridge control operations.
export const DEFAULT_REMOTE_SANDBOX_ADAPTER_TIMEOUT_SEC = 14_400;
function parseObject(value: unknown): Record {
@@ -2068,7 +2065,7 @@ export async function startAdapterExecutionTargetProcessSessionBridge(input: {
} else {
const payloadPath = path.posix.join(sessionDir, "command.b64");
const runPayloadSetup = async (script: string) => {
- const result = await runner.execute({
+ const result = await runSandboxBridgeControlCommand(runner, {
command: shellCommand,
args: shellCommandArgs(script),
cwd: target.remoteCwd,
@@ -2097,7 +2094,7 @@ export async function startAdapterExecutionTargetProcessSessionBridge(input: {
// as one foreground session command further down instead, so skip this.
if (!streamOutput) {
await onLog("stdout", `[paperclip] Starting ACP process session bridge in sandbox (${target.providerKey ?? "provider"}).\n`);
- const startResult = await runner.execute({
+ const startResult = await runSandboxBridgeControlCommand(runner, {
command: shellCommand,
args: shellCommandArgs(
[
diff --git a/packages/adapter-utils/src/git-workspace-sync.test.ts b/packages/adapter-utils/src/git-workspace-sync.test.ts
index d72a24cd7c2..c1029239a18 100644
--- a/packages/adapter-utils/src/git-workspace-sync.test.ts
+++ b/packages/adapter-utils/src/git-workspace-sync.test.ts
@@ -6,6 +6,7 @@ import { promisify } from "node:util";
import { workspacePaths } from "./workspace-manifest.js";
import { runWorkspaceGitProcess } from "./workspace-git-stream.js";
import { afterEach, describe, expect, it } from "vitest";
+import { getWorkspaceRestoreDiagnostic, withWorkspaceRestoreDiagnostics, withWorkspaceRestoreStep, withWorkspaceRestoreGitCommand } from "./workspace-restore-diagnostics.js";
import {
buildRemoteGitDeltaBundleScript,
@@ -24,6 +25,7 @@ import {
REFERENCED_SOURCE_IGNORE_MAX_ENTRY_COUNT,
REFERENCED_SOURCE_IGNORE_MAX_TOTAL_BYTES,
runLocalGit,
+ resetLocalGitIndexToHead,
sanitizeGitRemoteUrl,
setExpensiveWorkspaceGitExecutor,
withShallowGitWorkspaceClone,
@@ -651,7 +653,9 @@ describe("git workspace sync", () => {
const savedEnv = new Map(identityEnvKeys.map((key) => [key, process.env[key]]));
for (const key of identityEnvKeys) delete process.env[key];
try {
- await integrateImportedGitHead({ localDir: repo, importedHead });
+ await integrateImportedGitHead({
+ localDir: repo, importedHead, baseline: { headCommit: baseHead, branchName: "main" },
+ });
} finally {
for (const [key, value] of savedEnv) {
if (value === undefined) delete process.env[key];
@@ -670,7 +674,161 @@ describe("git workspace sync", () => {
expect(mergedTree).toContain("imported.txt");
});
- it("grafts an imported head onto the current head when histories share no ancestor", async () => {
+ describe("sandbox history rewrites", () => {
+ async function rewrittenHistory() {
+ const repo = await mkdtemp(path.join(os.tmpdir(), "paperclip-git-rewrite-"));
+ cleanupDirs.push(repo);
+ await git(repo, ["init"]);
+ await git(repo, ["checkout", "-b", "host"]);
+ await git(repo, ["config", "user.name", "Paperclip Test"]);
+ await git(repo, ["config", "user.email", "test@paperclip.dev"]);
+ await writeFile(path.join(repo, "tracked.txt"), "base\n");
+ await git(repo, ["add", "."]);
+ await git(repo, ["commit", "-m", "base"]);
+ const ancestor = await git(repo, ["rev-parse", "HEAD"]);
+ await writeFile(path.join(repo, "tracked.txt"), "original change\n");
+ await git(repo, ["commit", "-am", "original change"]);
+ const baseline = { headCommit: await git(repo, ["rev-parse", "HEAD"]), branchName: "host" };
+ await git(repo, ["checkout", "-b", "sandbox"]);
+ await writeFile(path.join(repo, "tracked.txt"), "rewritten change\n");
+ await git(repo, ["commit", "-am", "rewritten change", "--amend"]);
+ const importedHead = await git(repo, ["rev-parse", "HEAD"]);
+ await git(repo, ["checkout", "host"]);
+ return { repo, ancestor, baseline, importedHead };
+ }
+
+ it("accepts rewritten history when the host still matches the starting snapshot", async () => {
+ const { repo, baseline, importedHead } = await rewrittenHistory();
+ // The old integration path attempts this conflicting merge even though
+ // the host has not changed since the run started.
+ await expect(git(repo, ["merge-tree", "--write-tree", baseline.headCommit, importedHead]))
+ .rejects.toMatchObject({ code: 1 });
+ await writeFile(path.join(repo, "local.txt"), "local work\n");
+ await git(repo, ["add", "local.txt"]);
+ const indexBefore = await git(repo, ["write-tree"]);
+
+ await integrateImportedGitHead({ localDir: repo, importedHead, baseline });
+
+ expect(await git(repo, ["rev-parse", "HEAD"])).toBe(importedHead);
+ expect(await git(repo, ["symbolic-ref", "--short", "HEAD"])).toBe("host");
+ expect(await git(repo, ["write-tree"])).toBe(indexBefore);
+ expect(await readFile(path.join(repo, "local.txt"), "utf8")).toBe("local work\n");
+ });
+
+ it("restores an intentional reset to an ancestor when the host has not changed", async () => {
+ const { repo, ancestor, baseline } = await rewrittenHistory();
+ await integrateImportedGitHead({ localDir: repo, importedHead: ancestor, baseline });
+ expect(await git(repo, ["rev-parse", "HEAD"])).toBe(ancestor);
+ });
+
+ it("does not replace host commits made after the starting snapshot", async () => {
+ const { repo, baseline, importedHead } = await rewrittenHistory();
+ await writeFile(path.join(repo, "local.txt"), "concurrent work\n");
+ await git(repo, ["add", "local.txt"]);
+ await git(repo, ["commit", "-m", "host advanced"]);
+ const hostHead = await git(repo, ["rev-parse", "HEAD"]);
+
+ await expect(integrateImportedGitHead({ localDir: repo, importedHead, baseline }))
+ .rejects.toThrow("Failed to merge concurrent remote git histories");
+
+ expect(await git(repo, ["rev-parse", "HEAD"])).toBe(hostHead);
+ expect(await readFile(path.join(repo, "local.txt"), "utf8")).toBe("concurrent work\n");
+ });
+
+ it("does not replace a different host branch at the same starting commit", async () => {
+ const { repo, baseline, importedHead } = await rewrittenHistory();
+ const tree = await git(repo, ["rev-parse", `${importedHead}^{tree}`]);
+ const fastForwardHead = await git(repo, ["commit-tree", tree, "-p", baseline.headCommit, "-m", "sandbox advance"]);
+ await git(repo, ["checkout", "-b", "other"]);
+ await expect(integrateImportedGitHead({ localDir: repo, importedHead: fastForwardHead, baseline }))
+ .rejects.toThrow("branch changed");
+ expect(await git(repo, ["rev-parse", "HEAD"])).toBe(baseline.headCommit);
+ expect(await git(repo, ["rev-parse", "host"])).toBe(baseline.headCommit);
+ });
+
+ it("keeps the conservative merge behavior without a starting snapshot", async () => {
+ const { repo, baseline, importedHead } = await rewrittenHistory();
+ await expect(integrateImportedGitHead({ localDir: repo, importedHead }))
+ .rejects.toThrow("Failed to merge concurrent remote git histories");
+ expect(await git(repo, ["rev-parse", "HEAD"])).toBe(baseline.headCommit);
+ });
+
+ it("refuses unrelated rewritten history after a concurrent host commit", async () => {
+ const { repo, baseline, importedHead } = await rewrittenHistory();
+ const tree = await git(repo, ["rev-parse", `${importedHead}^{tree}`]);
+ const unrelated = await git(repo, ["commit-tree", tree, "-m", "shallow rewrite"]);
+ await writeFile(path.join(repo, "local.txt"), "concurrent work\n");
+ await git(repo, ["add", "local.txt"]);
+ await git(repo, ["commit", "-m", "host advanced"]);
+ const hostHead = await git(repo, ["rev-parse", "HEAD"]);
+ await expect(integrateImportedGitHead({ localDir: repo, importedHead: unrelated, baseline }))
+ .rejects.toThrow("Cannot restore unrelated remote history after the host advanced");
+ expect(await git(repo, ["rev-parse", "HEAD"])).toBe(hostHead);
+ });
+
+ it("accepts a rewrite of an unchanged detached host without attaching a branch", async () => {
+ const { repo, baseline, importedHead } = await rewrittenHistory();
+ await git(repo, ["checkout", "--detach"]);
+ await integrateImportedGitHead({ localDir: repo, importedHead, baseline: { ...baseline, branchName: null } });
+ expect(await git(repo, ["rev-parse", "HEAD"])).toBe(importedHead);
+ await expect(git(repo, ["symbolic-ref", "--quiet", "HEAD"])).rejects.toMatchObject({ code: 1 });
+ });
+
+ it.each([false, true])("rejects a checkout during integration (initially detached: %s)", async (detached) => {
+ const { repo, baseline, importedHead } = await rewrittenHistory();
+ if (detached) await git(repo, ["checkout", "--detach"]);
+ const realGit = (await execFile("sh", ["-c", "command -v git"])).stdout.trim();
+ const bin = path.join(repo, "test-bin");
+ await mkdir(bin);
+ const quote = (value: string) => `'${value.replaceAll("'", "'\\''")}'`;
+ // Switch branches after the initial identity read, at the merge-base
+ // subprocess boundary. Both refs still point to the expected old OID.
+ await writeFile(path.join(bin, "git"), `#!/bin/sh
+if [ "$3" = merge-base ]; then
+ ${quote(realGit)} -C "$2" checkout -B other ${baseline.headCommit} >/dev/null 2>&1 || exit 1
+fi
+exec ${quote(realGit)} "$@"
+`, { mode: 0o755 });
+ const priorPath = process.env.PATH;
+ process.env.PATH = `${bin}${path.delimiter}${priorPath ?? ""}`;
+ try {
+ await expect(integrateImportedGitHead({
+ localDir: repo, importedHead, baseline: { ...baseline, branchName: detached ? null : "host" },
+ })).rejects.toThrow("branch changed");
+ } finally {
+ if (priorPath === undefined) delete process.env.PATH;
+ else process.env.PATH = priorPath;
+ }
+ expect(await git(repo, ["symbolic-ref", "--short", "HEAD"])).toBe("other");
+ expect(await git(repo, ["rev-parse", "host"])).toBe(baseline.headCommit);
+ expect(await git(repo, ["rev-parse", "other"])).toBe(baseline.headCommit);
+ expect(await stat(path.join(repo, ".git", "HEAD.lock")).catch(() => null)).toBeNull();
+ });
+
+ it.each([false, true])("holds the HEAD lock through commit (initially detached: %s)", async (detached) => {
+ const { repo, baseline, importedHead } = await rewrittenHistory();
+ await git(repo, ["branch", "other"]);
+ if (detached) await git(repo, ["checkout", "--detach"]);
+ await writeFile(path.join(repo, ".git", "hooks", "reference-transaction"), `#!/bin/sh
+if [ "$1" = prepared ]; then
+ if git symbolic-ref HEAD refs/heads/other 2>/dev/null; then exit 1; fi
+ printf blocked > checkout-attempt.txt
+fi
+exit 0
+`, { mode: 0o755 });
+ await integrateImportedGitHead({
+ localDir: repo, importedHead, baseline: { ...baseline, branchName: detached ? null : "host" },
+ });
+ expect(await readFile(path.join(repo, "checkout-attempt.txt"), "utf8")).toBe("blocked");
+ expect(await git(repo, ["rev-parse", "HEAD"])).toBe(importedHead);
+ expect(await git(repo, ["rev-parse", "other"])).toBe(baseline.headCommit);
+ if (detached) await expect(git(repo, ["symbolic-ref", "--quiet", "HEAD"])).rejects.toMatchObject({ code: 1 });
+ else expect(await git(repo, ["symbolic-ref", "--short", "HEAD"])).toBe("host");
+ expect(await stat(path.join(repo, ".git", "HEAD.lock")).catch(() => null)).toBeNull();
+ });
+ });
+
+ it.each([false, true])("grafts an unrelated imported head with an unchanged host (baseline supplied: %s)", async (withBaseline) => {
const rootDir = await mkdtemp(path.join(os.tmpdir(), "paperclip-git-graft-"));
cleanupDirs.push(rootDir);
const setupIdentity = ["-c", "user.name=Setup", "-c", "user.email=setup@paperclip.dev"];
@@ -693,7 +851,10 @@ describe("git workspace sync", () => {
const importedTree = await git(repo, ["rev-parse", `${baseHead}^{tree}`]);
const importedHead = await git(repo, [...setupIdentity, "commit-tree", importedTree, "-m", "sandbox rewrite"]);
- await integrateImportedGitHead({ localDir: repo, importedHead });
+ await integrateImportedGitHead({
+ localDir: repo, importedHead,
+ baseline: withBaseline ? { headCommit: currentHead, branchName: "main" } : undefined,
+ });
const parents = (await git(repo, ["rev-list", "--parents", "-1", "HEAD"])).split(" ");
expect(parents.slice(1)).toEqual([currentHead]);
@@ -705,7 +866,7 @@ describe("git workspace sync", () => {
expect(body).toContain("shares no ancestor");
});
- it("does not graft when merge-base fails for a reason other than missing ancestry", async () => {
+ it.each([false, true])("does not graft on a merge-base error other than missing ancestry (baseline supplied: %s)", async (withBaseline) => {
const rootDir = await mkdtemp(path.join(os.tmpdir(), "paperclip-git-no-graft-"));
cleanupDirs.push(rootDir);
const setupIdentity = ["-c", "user.name=Setup", "-c", "user.email=setup@paperclip.dev"];
@@ -722,11 +883,119 @@ describe("git workspace sync", () => {
// object error (exit 128), not the no-ancestor signal (exit 1). The graft
// must not fire, and the integration keeps its loud failure.
const missingHead = "0123456789abcdef0123456789abcdef01234567";
- await expect(integrateImportedGitHead({ localDir: repo, importedHead: missingHead }))
- .rejects.toThrow(/Failed to merge concurrent remote git histories/);
+ const expectedExit = await runLocalGit(repo, ["merge-tree", "--write-tree", currentHead, missingHead])
+ .catch((error: { code: number }) => error.code);
+ const error = await withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("git_integration", () =>
+ integrateImportedGitHead({
+ localDir: repo, importedHead: missingHead,
+ baseline: withBaseline ? { headCommit: currentHead, branchName: "main" } : undefined,
+ }))).catch((error: unknown) => error);
+ expect(error).toBeInstanceOf(Error);
+ expect((error as Error).message).toMatch(/Failed to merge concurrent remote git histories/);
+ expect(error).not.toHaveProperty("cause");
+ expect(getWorkspaceRestoreDiagnostic(error)).toEqual({ phase: "workspace", step: "git_integration", errorCode: "unknown", exitCode: expectedExit,
+ gitCommand: "merge_tree", gitFailureKind: "invalid_object" });
expect(await git(repo, ["rev-parse", "HEAD"])).toBe(currentHead);
});
+ it("identifies a real merge conflict without changing the host tip or copying Git output", async () => {
+ const repo = await mkdtemp(path.join(os.tmpdir(), "paperclip-git-conflict-diagnostic-"));
+ cleanupDirs.push(repo);
+ await git(repo, ["init", "-b", "host"]);
+ await git(repo, ["config", "user.name", "Test"]);
+ await git(repo, ["config", "user.email", "test@paperclip.dev"]);
+ await writeFile(path.join(repo, "private-filename.txt"), "base\n");
+ await git(repo, ["add", "."]);
+ await git(repo, ["commit", "-m", "base"]);
+ const base = await git(repo, ["rev-parse", "HEAD"]);
+ await writeFile(path.join(repo, "private-filename.txt"), "host change\n");
+ await git(repo, ["commit", "-am", "host"]);
+ const currentHead = await git(repo, ["rev-parse", "HEAD"]);
+ await git(repo, ["checkout", "-b", "imported", base]);
+ await writeFile(path.join(repo, "private-filename.txt"), "remote change\n");
+ await git(repo, ["commit", "-am", "remote"]);
+ const importedHead = await git(repo, ["rev-parse", "HEAD"]);
+ await git(repo, ["checkout", "host"]);
+ const logs: string[] = [];
+ const error = await withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("directory_merge", () =>
+ withWorkspaceRestoreStep("git_integration", () => integrateImportedGitHead({ localDir: repo, importedHead }))),
+ async (line) => { logs.push(line); }).catch(error => error);
+ expect(error).toBeInstanceOf(Error);
+ expect(error.message).toContain("Failed to merge concurrent remote git histories");
+ expect(error).not.toHaveProperty("cause");
+ expect(getWorkspaceRestoreDiagnostic(error)).toEqual({ phase: "workspace", step: "git_integration", errorCode: "unknown",
+ exitCode: 1, gitCommand: "merge_tree", gitFailureKind: "merge_conflict" });
+ expect(await git(repo, ["rev-parse", "HEAD"])).toBe(currentHead);
+ expect(await readFile(path.join(repo, "private-filename.txt"), "utf8")).toBe("host change\n");
+ expect(logs).toHaveLength(1);
+ expect(logs[0]).not.toMatch(/private-filename|host change|remote change/);
+ for (const privateValue of [repo, currentHead, importedHead]) expect(logs[0]).not.toContain(privateValue);
+ });
+
+ it("labels a failed locked ref transaction without changing its branch or tip", async () => {
+ const repo = await mkdtemp(path.join(os.tmpdir(), "paperclip-git-transaction-diagnostic-"));
+ cleanupDirs.push(repo);
+ await git(repo, ["init", "-b", "private-branch"]);
+ await git(repo, ["config", "user.name", "Test"]);
+ await git(repo, ["config", "user.email", "test@paperclip.dev"]);
+ await git(repo, ["commit", "--allow-empty", "-m", "base"]);
+ const base = await git(repo, ["rev-parse", "HEAD"]);
+ await git(repo, ["commit", "--allow-empty", "-m", "advance"]);
+ const importedHead = await git(repo, ["rev-parse", "HEAD"]);
+ await git(repo, ["reset", "--hard", base]);
+ // Git owns this lock. A failed restore must leave it alone and keep its
+ // existing failure behavior; diagnostic collection grants no cleanup rights.
+ await writeFile(path.join(repo, ".git", "HEAD.lock"), "private-lock");
+ const error = await withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("git_integration", () =>
+ integrateImportedGitHead({ localDir: repo, importedHead, baseline: { headCommit: base, branchName: "private-branch" } })))
+ .catch(error => error);
+ expect(error).toMatchObject({ code: 128 });
+ const diagnostic = getWorkspaceRestoreDiagnostic(error);
+ expect(diagnostic).toEqual({ phase: "workspace", step: "git_integration", errorCode: "unknown", exitCode: 128,
+ gitCommand: "update_ref", gitFailureKind: "unknown" });
+ expect(await git(repo, ["rev-parse", "HEAD"])).toBe(base);
+ expect(await git(repo, ["symbolic-ref", "--short", "HEAD"])).toBe("private-branch");
+ expect(await readFile(path.join(repo, ".git", "HEAD.lock"), "utf8")).toBe("private-lock");
+ for (const privateValue of [repo, base, importedHead, "private-branch"]) expect(JSON.stringify(diagnostic)).not.toContain(privateValue);
+ });
+
+ it("recognizes a real expected-old ref mismatch without copying the ref or commit IDs", async () => {
+ const repo = await mkdtemp(path.join(os.tmpdir(), "paperclip-git-ref-diagnostic-"));
+ cleanupDirs.push(repo);
+ await git(repo, ["init", "-b", "private-branch"]);
+ await git(repo, ["config", "user.name", "Test"]);
+ await git(repo, ["config", "user.email", "test@paperclip.dev"]);
+ await git(repo, ["commit", "--allow-empty", "-m", "base"]);
+ const base = await git(repo, ["rev-parse", "HEAD"]);
+ await git(repo, ["commit", "--allow-empty", "-m", "advance"]);
+ const current = await git(repo, ["rev-parse", "HEAD"]);
+ const error = await withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("git_integration", () =>
+ withWorkspaceRestoreGitCommand("update_ref", () => runLocalGit(repo, ["update-ref", "refs/heads/private-branch", base, base]))))
+ .catch(error => error);
+ expect(error).toMatchObject({ code: 128 });
+ const diagnostic = getWorkspaceRestoreDiagnostic(error);
+ expect(diagnostic).toEqual({ phase: "workspace", step: "git_integration", errorCode: "unknown", exitCode: 128,
+ gitCommand: "update_ref", gitFailureKind: "ref_conflict" });
+ expect(await git(repo, ["rev-parse", "HEAD"])).toBe(current);
+ for (const privateValue of [repo, base, current, "private-branch"]) expect(JSON.stringify(diagnostic)).not.toContain(privateValue);
+ });
+
+ it("preserves the real Git index reset exit code without attaching its raw error", async () => {
+ const repo = await mkdtemp(path.join(os.tmpdir(), "paperclip-git-reset-diagnostic-"));
+ cleanupDirs.push(repo);
+ await git(repo, ["init"]);
+ await writeFile(path.join(repo, "tracked.txt"), "base\n", "utf8");
+ await git(repo, ["add", "tracked.txt"]);
+ await git(repo, ["-c", "user.name=Setup", "-c", "user.email=setup@paperclip.dev", "commit", "-m", "base"]);
+ await writeFile(path.join(repo, ".git", "index.lock"), "fixture lock\n", "utf8");
+ const error = await withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("index_reset", () =>
+ resetLocalGitIndexToHead({ localDir: repo }))).catch((error: unknown) => error);
+ expect(error).toBeInstanceOf(Error);
+ expect((error as Error).message).toContain("Failed to reset local git index");
+ expect(error).not.toHaveProperty("cause");
+ expect(getWorkspaceRestoreDiagnostic(error)).toEqual({ phase: "workspace", step: "index_reset", errorCode: "unknown", exitCode: 128 });
+ });
+
describe("readReferencedSourceGitIgnoredPaths", () => {
it("returns null for a directory that is not a Git work tree", async () => {
const rootDir = await mkdtemp(path.join(os.tmpdir(), "paperclip-referenced-nogit-"));
diff --git a/packages/adapter-utils/src/git-workspace-sync.ts b/packages/adapter-utils/src/git-workspace-sync.ts
index 11013832bc8..fcd6bd763dd 100644
--- a/packages/adapter-utils/src/git-workspace-sync.ts
+++ b/packages/adapter-utils/src/git-workspace-sync.ts
@@ -5,6 +5,7 @@ import os from "node:os";
import path from "node:path";
import { createWorkspaceManifest, workspacePaths, WorkspaceNulParser, type WorkspacePaths } from "./workspace-manifest.js";
import { runWorkspaceGitProcess } from "./workspace-git-stream.js";
+import { preserveWorkspaceRestoreErrorDiagnostic, withWorkspaceRestoreGitCommand, type WorkspaceRestoreGitCommand } from "./workspace-restore-diagnostics.js";
export interface GitCommandResult {
stdout: string;
@@ -773,6 +774,12 @@ export function buildRemoteGitDeltaBundleScript(input: {
` bundle_base=""`,
"fi",
]),
+ // An empty bundle means "still at baseSha" to the importer. A reset to an
+ // older ancestor has no delta commits either, but must carry its new tip.
+ // Use the full-bundle path so Git advertises that tip instead of losing it.
+ `if [ -n "$bundle_base" ] && [ "$bundle_base" != ${baseSha} ] && [ "$bundle_base" = "$(git -C ${remoteDir} rev-parse HEAD)" ]; then`,
+ ` bundle_base=""`,
+ "fi",
`if [ -n "$bundle_base" ]; then`,
` commit_count=$(git -C ${remoteDir} rev-list --count HEAD --not "$bundle_base")`,
"else",
@@ -803,6 +810,14 @@ export function buildRemoteGitDeltaBundleScript(input: {
].filter(Boolean).join("\n");
}
+// Labels are fixed at the integration call sites, never derived from Git arguments.
+function runIntegrationGit(
+ command: WorkspaceRestoreGitCommand,
+ ...args: Parameters
+): Promise {
+ return withWorkspaceRestoreGitCommand(command, () => runLocalGit(...args));
+}
+
/**
* Preserve imported work whose history does not connect to the local one.
*
@@ -824,11 +839,11 @@ export async function createUnrelatedHistoryGraftCommit(input: {
importedHead: string;
syncLabel: string;
}): Promise {
- const importedTree = (await runLocalGit(input.localDir, ["rev-parse", `${input.importedHead}^{tree}`], {
+ const importedTree = (await runIntegrationGit("rev_parse", input.localDir, ["rev-parse", `${input.importedHead}^{tree}`], {
timeout: 10_000,
maxBuffer: 16 * 1024,
})).stdout.trim();
- const importedMessage = (await runLocalGit(input.localDir, ["log", "-1", "--format=%B", input.importedHead], {
+ const importedMessage = (await runIntegrationGit("log", input.localDir, ["log", "-1", "--format=%B", input.importedHead], {
timeout: 10_000,
maxBuffer: 256 * 1024,
})).stdout;
@@ -837,8 +852,8 @@ export async function createUnrelatedHistoryGraftCommit(input: {
"",
`(${input.syncLabel} graft ${input.importedHead.slice(0, 12)}: imported history shares no ancestor with ${input.currentHead.slice(0, 12)})`,
].join("\n");
- const graftCommit = await runLocalGit(
- input.localDir,
+ const graftCommit = await runIntegrationGit(
+ "commit_tree", input.localDir,
[...GIT_SYNC_COMMIT_IDENTITY_ARGS, "commit-tree", importedTree, "-p", input.currentHead, "-m", message],
{
timeout: 60_000,
@@ -848,9 +863,68 @@ export async function createUnrelatedHistoryGraftCommit(input: {
return graftCommit.stdout.trim();
}
+async function updateLocalGitHead(input: {
+ localDir: string;
+ newHead: string;
+ oldHead: string;
+ branchName: string | null;
+}): Promise {
+ // Prepare the ref transaction before checking the symbolic HEAD identity.
+ // Git holds HEAD.lock (and the branch lock when attached) until commit/abort,
+ // so a checkout cannot redirect the write after this check. --no-deref also
+ // prevents a detached write from following a newly attached branch.
+ await withWorkspaceRestoreGitCommand("update_ref", () => new Promise((resolve, reject) => {
+ let identityError: unknown;
+ let prepared = false;
+ let output = "";
+ const child = execFile("git", ["-C", input.localDir, "update-ref", "--stdin"], {
+ timeout: 15_000,
+ maxBuffer: 64 * 1024,
+ }, (error, stdout, stderr) => {
+ if (identityError) reject(identityError);
+ else if (error) reject(Object.assign(error, { stdout, stderr }));
+ else if (!stdout.includes("commit: ok\n")) reject(new Error("Git HEAD transaction did not commit."));
+ else resolve();
+ });
+ // Early Git errors close stdin; the process callback reports the error.
+ child.stdin!.on("error", () => {});
+ child.stdout!.on("data", (chunk: string | Buffer) => {
+ output += chunk.toString();
+ if (prepared || !output.includes("prepare: ok\n")) return;
+ prepared = true;
+ void (async () => {
+ try {
+ const branchName = (await runIntegrationGit("symbolic_ref", input.localDir, ["symbolic-ref", "--quiet", "--short", "HEAD"], {
+ timeout: 10_000,
+ }).catch((error) => {
+ if (error.code === 1) return { stdout: "" };
+ throw error;
+ })).stdout.trim() || null;
+ if (branchName !== input.branchName) {
+ throw new Error("Workspace branch changed while remote work was running.");
+ }
+ child.stdin!.end("commit\n");
+ } catch (error) {
+ identityError = error;
+ child.stdin!.end("abort\n");
+ }
+ })();
+ });
+ child.stdin!.write([
+ "start",
+ ...(input.branchName === null ? ["option no-deref"] : []),
+ `update HEAD ${input.newHead} ${input.oldHead}`,
+ "prepare",
+ "",
+ ].join("\n"));
+ }));
+}
+
export async function integrateImportedGitHead(input: {
localDir: string;
importedHead: string;
+ /** The host Git identity captured before staging this run. */
+ baseline?: Pick;
}): Promise {
const isConcurrentRefUpdateError = (error: unknown) => {
const message = error instanceof Error ? error.message : String(error);
@@ -859,23 +933,25 @@ export async function integrateImportedGitHead(input: {
for (let attempt = 0; attempt < 5; attempt += 1) {
const snapshot = {
- headCommit: (await runLocalGit(input.localDir, ["rev-parse", "HEAD"])).stdout.trim(),
- branchName: (await runLocalGit(input.localDir, ["symbolic-ref", "--quiet", "--short", "HEAD"]).catch((error) => {
+ headCommit: (await runIntegrationGit("rev_parse", input.localDir, ["rev-parse", "HEAD"])).stdout.trim(),
+ branchName: (await runIntegrationGit("symbolic_ref", input.localDir, ["symbolic-ref", "--quiet", "--short", "HEAD"]).catch((error) => {
if (error.code === 1) return { stdout: "" };
throw error;
})).stdout.trim() || null,
};
+ if (input.baseline && snapshot.branchName !== input.baseline.branchName) {
+ throw new Error("Workspace branch changed while remote work was running.");
+ }
const currentHead = snapshot.headCommit;
if (!currentHead || currentHead === input.importedHead) return;
- const headRef = snapshot.branchName ? `refs/heads/${snapshot.branchName}` : "HEAD";
// `git merge-base` exits 1 when the commits share no ancestor — the only
// outcome that authorizes the graft fallback below. Every other failure
// (timeout, missing object, repository error) must keep failing the
// integration instead of silently rewriting the tip.
let noCommonAncestor = false;
- const mergeBase = await runLocalGit(input.localDir, ["merge-base", currentHead, input.importedHead], {
+ const mergeBase = await runIntegrationGit("merge_base", input.localDir, ["merge-base", currentHead, input.importedHead], {
timeout: 10_000,
maxBuffer: 16 * 1024,
}).catch((error: unknown) => {
@@ -884,15 +960,15 @@ export async function integrateImportedGitHead(input: {
});
const mergeBaseHead = mergeBase?.stdout.trim() ?? "";
- if (mergeBaseHead === input.importedHead) {
- return;
- }
-
- if (mergeBaseHead === currentHead) {
+ // A rebase/amend rewrites the sandbox tip without a concurrent host edit.
+ // Adopt that history when the host still matches the run's starting tip;
+ // merging the old and rewritten commits can reintroduce resolved conflicts.
+ // Keep the expected-old-value check: if the host advances during this write,
+ // retry against its new tip and use the normal concurrent-history path.
+ if (mergeBaseHead === currentHead || (mergeBaseHead && currentHead === input.baseline?.headCommit)) {
try {
- await runLocalGit(input.localDir, ["update-ref", headRef, input.importedHead, currentHead], {
- timeout: 10_000,
- maxBuffer: 16 * 1024,
+ await updateLocalGitHead({
+ localDir: input.localDir, newHead: input.importedHead, oldHead: currentHead, branchName: snapshot.branchName,
});
return;
} catch (error) {
@@ -901,7 +977,14 @@ export async function integrateImportedGitHead(input: {
}
}
+ if (mergeBaseHead === input.importedHead) {
+ return;
+ }
+
if (noCommonAncestor) {
+ if (input.baseline && currentHead !== input.baseline.headCommit) {
+ throw new Error("Cannot restore unrelated remote history after the host advanced.");
+ }
// No common ancestor — merging is impossible and failing here would
// discard the imported work. Graft it onto the current head instead;
// see createUnrelatedHistoryGraftCommit.
@@ -912,9 +995,8 @@ export async function integrateImportedGitHead(input: {
syncLabel: "Paperclip remote git sync",
});
try {
- await runLocalGit(input.localDir, ["update-ref", headRef, graftCommit, currentHead], {
- timeout: 10_000,
- maxBuffer: 16 * 1024,
+ await updateLocalGitHead({
+ localDir: input.localDir, newHead: graftCommit, oldHead: currentHead, branchName: snapshot.branchName,
});
return;
} catch (error) {
@@ -925,23 +1007,23 @@ export async function integrateImportedGitHead(input: {
let mergedTree;
try {
- mergedTree = await runLocalGit(input.localDir, ["merge-tree", "--write-tree", currentHead, input.importedHead], {
+ mergedTree = await runIntegrationGit("merge_tree", input.localDir, ["merge-tree", "--write-tree", currentHead, input.importedHead], {
timeout: 60_000,
maxBuffer: 256 * 1024,
});
} catch (error) {
const reason = error instanceof Error ? error.message : String(error);
- throw new Error(
+ throw preserveWorkspaceRestoreErrorDiagnostic(new Error(
`Failed to merge concurrent remote git histories for ${currentHead.slice(0, 12)} and ${input.importedHead.slice(0, 12)}: ${reason}`,
- );
+ ), error);
}
const mergedTreeId = mergedTree.stdout.trim().split("\n")[0]?.trim() ?? "";
if (!mergedTreeId) {
throw new Error("Failed to compute a merged git tree for workspace restore.");
}
- const mergeCommit = await runLocalGit(
- input.localDir,
+ const mergeCommit = await runIntegrationGit(
+ "commit_tree", input.localDir,
[
...GIT_SYNC_COMMIT_IDENTITY_ARGS,
"commit-tree",
@@ -959,9 +1041,8 @@ export async function integrateImportedGitHead(input: {
},
);
try {
- await runLocalGit(input.localDir, ["update-ref", headRef, mergeCommit.stdout.trim(), currentHead], {
- timeout: 10_000,
- maxBuffer: 16 * 1024,
+ await updateLocalGitHead({
+ localDir: input.localDir, newHead: mergeCommit.stdout.trim(), oldHead: currentHead, branchName: snapshot.branchName,
});
return;
} catch (error) {
@@ -990,7 +1071,9 @@ export async function resetLocalGitIndexToHead(input: {
(error as { stdout?: unknown }).stdout,
].filter((value): value is string => typeof value === "string" && value.trim().length > 0).join("\n")
: String(error);
- throw new Error(`Failed to reset local git index to HEAD after workspace restore: ${detail}`);
+ throw preserveWorkspaceRestoreErrorDiagnostic(
+ new Error(`Failed to reset local git index to HEAD after workspace restore: ${detail}`), error,
+ );
}
const hasDiff = async (args: string[]) => {
diff --git a/packages/adapter-utils/src/index.ts b/packages/adapter-utils/src/index.ts
index eb02fb4efc4..1fb3046e1ed 100644
--- a/packages/adapter-utils/src/index.ts
+++ b/packages/adapter-utils/src/index.ts
@@ -1,5 +1,6 @@
export type {
AdapterAgent,
+ AgentRuntimeIdentity,
AdapterRuntime,
UsageSummary,
AdapterBillingType,
diff --git a/packages/adapter-utils/src/prompt-sections.test.ts b/packages/adapter-utils/src/prompt-sections.test.ts
index 6c8e67192a6..bc660ccfde8 100644
--- a/packages/adapter-utils/src/prompt-sections.test.ts
+++ b/packages/adapter-utils/src/prompt-sections.test.ts
@@ -3,13 +3,14 @@ import { selectPaperclipPromptSections as selectSections } from "./server-utils.
import { createPromptContextFixture } from "./test-fixtures/prompt-context.js";
describe("task and event section ownership", () => {
- it("lets a separate instruction carrier own the execution contract on a resumed turn", () => {
+ it("preserves resumed wake data without reintroducing generic procedures", () => {
const context = createPromptContextFixture();
- const sections = selectSections(context, { resumedSession: true, includeExecutionContract: false });
- expect(sections.taskContextNote).toBe(context.paperclipTaskMarkdownAssignmentCompact);
- expect(sections.wakePrompt).toContain('"id":"comment-second"');
- expect(sections.wakePrompt).not.toContain("Execution contract:");
- expect(selectSections(context, { resumedSession: true }).wakePrompt).toContain("Execution contract:");
+ for (const includeExecutionContract of [undefined, false, true]) {
+ const sections = selectSections(context, { resumedSession: true, includeExecutionContract });
+ expect(sections.taskContextNote).toBe(context.paperclipTaskMarkdownAssignmentCompact);
+ expect(sections.wakePrompt).toContain('"id":"comment-second"');
+ expect(sections.wakePrompt).not.toContain("Execution contract:");
+ }
});
it("preserves user repetition and distinct same-body comments under their source owners", () => {
diff --git a/packages/adapter-utils/src/remote-managed-runtime.ts b/packages/adapter-utils/src/remote-managed-runtime.ts
index cb47f3caede..8c5d2581e18 100644
--- a/packages/adapter-utils/src/remote-managed-runtime.ts
+++ b/packages/adapter-utils/src/remote-managed-runtime.ts
@@ -1,5 +1,5 @@
import path from "node:path";
-import { GIT_ARCHIVE_EXCLUDES } from "./git-workspace-sync.js";
+import { GIT_ARCHIVE_EXCLUDES, PROJECT_REPOSITORIES_DIR } from "./git-workspace-sync.js";
import {
type SshRemoteExecutionSpec,
prepareWorkspaceForSshExecution,
@@ -13,7 +13,7 @@ import {
type SandboxAdditionalSource,
type SandboxManagedRuntimeAssetRestoreContext,
} from "./sandbox-managed-runtime.js";
-import { captureDirectorySnapshot } from "./workspace-restore-merge.js";
+import { captureDirectorySnapshot, type DirectorySnapshot } from "./workspace-restore-merge.js";
import type { RuntimeProgressSink } from "./runtime-progress.js";
// The fixed heavy-directory excludes every referenced project drops,
@@ -145,13 +145,27 @@ export async function prepareRemoteManagedRuntime(input: {
workspaceExclude: input.workspaceExclude,
})
: null;
+ const projectRepositories = preparedWorkspace?.repositories ?? [];
const baselineSnapshot = preparedWorkspace
? await captureDirectorySnapshot(input.workspaceLocalDir, {
exclude: preparedWorkspace.gitBacked
- ? [...GIT_ARCHIVE_EXCLUDES, ".paperclip-runtime"]
+ ? [
+ ...GIT_ARCHIVE_EXCLUDES,
+ ".paperclip-runtime",
+ ...(projectRepositories.length > 0 ? [PROJECT_REPOSITORIES_DIR] : []),
+ ]
: [".paperclip-runtime", ...(input.workspaceFileMode === "all" ? input.workspaceExclude ?? [] : [])],
})
: null;
+ const repositoryBaselines: Array<{ path: string; baselineSnapshot: DirectorySnapshot }> = [];
+ for (const repository of projectRepositories) {
+ repositoryBaselines.push({
+ path: repository,
+ baselineSnapshot: await captureDirectorySnapshot(path.join(input.workspaceLocalDir, repository), {
+ exclude: [...GIT_ARCHIVE_EXCLUDES, ".paperclip-runtime"],
+ }),
+ });
+ }
const assetDirs: Record = {};
try {
@@ -177,6 +191,7 @@ export async function prepareRemoteManagedRuntime(input: {
baselineSnapshot,
restoreGitHistory: preparedWorkspace.gitBacked,
onProgress: input.onProgress,
+ repositories: repositoryBaselines,
});
}
throw error;
@@ -244,6 +259,7 @@ export async function prepareRemoteManagedRuntime(input: {
baselineSnapshot,
restoreGitHistory: preparedWorkspace.gitBacked,
onProgress,
+ repositories: repositoryBaselines,
});
}
for (const asset of input.assets ?? []) {
diff --git a/packages/adapter-utils/src/sandbox-callback-bridge.test.ts b/packages/adapter-utils/src/sandbox-callback-bridge.test.ts
index 4419bee265c..7420c689a26 100644
--- a/packages/adapter-utils/src/sandbox-callback-bridge.test.ts
+++ b/packages/adapter-utils/src/sandbox-callback-bridge.test.ts
@@ -171,7 +171,9 @@ describe("sandbox callback bridge", () => {
client: createFileSystemSandboxCallbackBridgeQueueClient(),
queueDir,
authorizeRequest: async (request) =>
- ["/api/agents/me", "/runtime-tools/github/credentials"].includes(request.path) ? null : `Route not allowed: ${request.method} ${request.path}`,
+ ["/api/agents/me", "/runtime-tools/github/credentials"].includes(request.path) ? null
+ : request.path.endsWith("/agent-commentary") ? authorizeSandboxCallbackBridgeRequestWithRoutes(request)
+ : `Route not allowed: ${request.method} ${request.path}`,
handleRequest: async (request) => {
seenRequests.push({
method: request.method,
@@ -284,6 +286,15 @@ describe("sandbox callback bridge", () => {
});
expect(seenRequests[1]?.headers.authorization).toBeUndefined();
+ const feedbackBody = JSON.stringify({ kind: "complaint", body: "😭".repeat(5000), idempotencyKey: "bridge-feedback" });
+ const feedbackResponse = await fetch(`${bridge.baseUrl}/api/companies/company-1/agent-commentary`, {
+ method: "POST", headers: { authorization: `Bearer ${bridgeToken}`, "content-type": "application/json" }, body: feedbackBody,
+ });
+ expect(feedbackResponse.status).toBe(200);
+ await feedbackResponse.arrayBuffer();
+ expect(seenRequests[2]).toMatchObject({ method: "POST", path: "/api/companies/company-1/agent-commentary", body: feedbackBody });
+ expect(seenRequests[2]?.headers.authorization).toBeUndefined();
+
});
it("serves schema discovery over the queue and denies schema mutations and lookalikes", async () => {
@@ -1379,6 +1390,7 @@ describe("sandbox callback bridge", () => {
it("permits the documented heartbeat surface and denies unrelated routes", () => {
const allowed: Array<{ method: string; path: string }> = [
+ { method: "POST", path: "/api/companies/co-1/agent-commentary" },
{ method: "POST", path: "/runtime-tools/github/credentials" },
{ method: "GET", path: "/api/agents/me" },
{ method: "GET", path: "/api/agents/me/inbox-lite" },
@@ -1458,6 +1470,8 @@ describe("sandbox callback bridge", () => {
}
const denied: Array<{ method: string; path: string }> = [
+ { method: "GET", path: "/api/companies/co-1/agent-commentary" },
+ { method: "POST", path: "/api/companies/co-1/agent-commentary/other" },
{ method: "POST", path: "/api/companies/co-1/email/inboxes" },
{ method: "POST", path: "/api/companies/co-1/email/connections" },
{ method: "POST", path: "/api/companies/co-1/email/inspect" },
@@ -1536,6 +1550,105 @@ describe("sandbox callback bridge", () => {
}
});
+ it.each([
+ [4 * 60 * 60 * 1000, 30_000],
+ [250, 250],
+ ])("bounds a hung bridge read configured for %i ms to %i ms", async (configuredMs, expectedMs) => {
+ vi.useFakeTimers();
+ try {
+ const runner = { execute: vi.fn(() => new Promise(() => {})) };
+ const client = createCommandManagedSandboxCallbackBridgeQueueClient({
+ runner, remoteCwd: "/workspace", timeoutMs: configuredMs,
+ });
+ let error: unknown;
+ const read = client.readTextFile("/workspace/events/1.json").catch((caught) => { error = caught; });
+ await vi.advanceTimersByTimeAsync(expectedMs - 1);
+ expect(error).toBeUndefined();
+ await vi.advanceTimersByTimeAsync(1);
+ expect(error).toEqual(new Error(`Sandbox bridge control command timed out after ${expectedMs}ms.`));
+ await read;
+ expect(runner.execute).toHaveBeenCalledExactlyOnceWith(expect.objectContaining({
+ timeoutMs: expectedMs, bypassSession: true,
+ }));
+ expect(vi.getTimerCount()).toBe(0);
+ } finally {
+ vi.useRealTimers();
+ }
+ });
+
+ it("abandons a timed-out upload without replaying it or continuing after a late response", async () => {
+ vi.useFakeTimers();
+ try {
+ const success: RunProcessResult = {
+ exitCode: 0, signal: null, timedOut: false, stdout: "", stderr: "", pid: null,
+ startedAt: new Date().toISOString(),
+ };
+ let finishAppend!: (result: RunProcessResult) => void;
+ const runner = {
+ execute: vi.fn(async (input: { args?: string[] }) => {
+ if (input.args?.[1]?.startsWith("printf")) {
+ return new Promise((resolve) => { finishAppend = resolve; });
+ }
+ return success;
+ }),
+ };
+ const client = createCommandManagedSandboxCallbackBridgeQueueClient({
+ runner, remoteCwd: "/workspace", timeoutMs: 4 * 60 * 60 * 1000,
+ });
+ let error: unknown;
+ const write = client.writeTextFile("/workspace/stdin/1.json", "sensitive-input")
+ .catch((caught) => { error = caught; });
+ await vi.advanceTimersByTimeAsync(30_000);
+ expect(error).toEqual(new Error("Sandbox bridge control command timed out after 30000ms."));
+ await write;
+ finishAppend(success);
+ await vi.advanceTimersByTimeAsync(0);
+ const scripts = runner.execute.mock.calls.map(([input]) => input.args?.[1] ?? "");
+ expect(scripts.filter((script) => script.startsWith("printf"))).toHaveLength(1);
+ expect(scripts.some((script) => script.startsWith("base64 -d"))).toBe(false);
+ expect(scripts.at(-1)).toMatch(/^rm -f .*paperclip-upload/);
+ expect(vi.getTimerCount()).toBe(0);
+ } finally {
+ vi.useRealTimers();
+ }
+ });
+
+ it.each(["start", "stop"])("bounds a hung callback bridge %s while preserving its launch environment", async (stage) => {
+ vi.useFakeTimers();
+ try {
+ const runner = {
+ execute: vi.fn(async (input: { args?: string[]; env?: Record }) => {
+ const script = input.args?.[1] ?? "";
+ if ((stage === "start" && script.includes("nohup")) ||
+ (stage === "stop" && script.includes('kill "$pid"'))) {
+ return new Promise(() => {});
+ }
+ return {
+ exitCode: 0, signal: null, timedOut: false, stderr: "", pid: null,
+ startedAt: new Date().toISOString(), stdout: JSON.stringify({ port: 3101 }),
+ };
+ }),
+ };
+ let error: unknown;
+ const operation = startSandboxCallbackBridgeServer({
+ runner, remoteCwd: "/workspace", assetRemoteDir: "/workspace/assets",
+ queueDir: "/workspace/queue", bridgeToken: "private-bridge-token", timeoutMs: 4 * 60 * 60 * 1000,
+ }).then(async (bridge) => { if (stage === "stop") await bridge.stop(); })
+ .catch((caught) => { error = caught; });
+ await vi.advanceTimersByTimeAsync(30_000);
+ expect(error).toEqual(new Error("Sandbox bridge control command timed out after 30000ms."));
+ await operation;
+ expect(runner.execute.mock.calls[0]?.[0].env).toMatchObject({
+ PAPERCLIP_BRIDGE_TOKEN: "private-bridge-token",
+ PAPERCLIP_SANDBOX_EXEC_CHANNEL: "bridge",
+ });
+ expect(runner.execute).toHaveBeenLastCalledWith(expect.objectContaining({ timeoutMs: 30_000 }));
+ expect(vi.getTimerCount()).toBe(0);
+ } finally {
+ vi.useRealTimers();
+ }
+ });
+
it("marks command-managed bridge operations with the bridge execution channel", async () => {
const runner = {
execute: vi.fn(async () => ({
diff --git a/packages/adapter-utils/src/sandbox-callback-bridge.ts b/packages/adapter-utils/src/sandbox-callback-bridge.ts
index 40776a3da59..64bf04a3940 100644
--- a/packages/adapter-utils/src/sandbox-callback-bridge.ts
+++ b/packages/adapter-utils/src/sandbox-callback-bridge.ts
@@ -26,6 +26,7 @@ import type { RunProcessResult } from "./server-utils.js";
const DEFAULT_BRIDGE_TOKEN_BYTES = 24;
const DEFAULT_BRIDGE_POLL_INTERVAL_MS = 100;
const DEFAULT_BRIDGE_RESPONSE_TIMEOUT_MS = 30_000;
+const MAX_BRIDGE_CONTROL_COMMAND_TIMEOUT_MS = 30_000;
const DEFAULT_BRIDGE_STOP_TIMEOUT_MS = 2_000;
const DEFAULT_BRIDGE_MAX_QUEUE_DEPTH = 64;
// A `BridgeBodyReservation` owner (`http2-bridge-server.ts`) now bounds the
@@ -126,6 +127,7 @@ export const DEFAULT_SANDBOX_CALLBACK_BRIDGE_ROUTE_ALLOWLIST: readonly SandboxCa
{ method: "POST", path: /^\/runtime-tools\/github\/credentials$/ },
// Identity, inbox, agent self-management
{ method: "GET", path: /^\/api\/agents\/me$/ },
+ { method: "POST", path: /^\/api\/companies\/[^/]+\/agent-commentary$/ },
{ method: "GET", path: /^\/api\/agents\/me\/inbox-lite$/ },
{ method: "GET", path: /^\/api\/agents\/me\/inbox\/mine$/ },
{ method: "GET", path: /^\/api\/agents\/[^/]+$/ },
@@ -350,6 +352,22 @@ function buildRunnerFailureMessage(action: string, result: RunProcessResult): st
return `${action} failed with exit code ${result.exitCode ?? "null"}${detail ? `: ${detail}` : ""}`;
}
+export function runSandboxBridgeControlCommand(
+ runner: CommandManagedRuntimeRunner,
+ input: Parameters[0],
+): Promise {
+ // These short file/control operations must not inherit an hours-long agent
+ // lifetime. Enforce the deadline on the host too: a provider may never settle
+ // its promise even when it receives timeoutMs. This does not prove the remote
+ // operation stopped; callers must not replay an uncertain write on timeout.
+ const controlTimeoutMs = Math.min(
+ normalizeTimeoutMs(input.timeoutMs, MAX_BRIDGE_CONTROL_COMMAND_TIMEOUT_MS),
+ MAX_BRIDGE_CONTROL_COMMAND_TIMEOUT_MS,
+ );
+ return withTimeout(runner.execute({ ...input, timeoutMs: controlTimeoutMs }),
+ controlTimeoutMs, "Sandbox bridge control command");
+}
+
async function runShell(
runner: CommandManagedRuntimeRunner,
cwd: string,
@@ -358,7 +376,7 @@ async function runShell(
shellCommand: "bash" | "sh" = "sh",
stdin?: string,
): Promise {
- return await runner.execute({
+ return await runSandboxBridgeControlCommand(runner, {
command: shellCommand,
args: shellCommandArgs(script),
cwd,
@@ -1833,7 +1851,7 @@ export async function startSandboxCallbackBridgeServer(input: {
maxBodyBytes: input.maxBodyBytes,
});
const nodeCommand = input.nodeCommand?.trim() || "node";
- const startResult = await input.runner.execute({
+ const startResult = await runSandboxBridgeControlCommand(input.runner, {
command: shellCommand,
args: shellCommandArgs(
[
@@ -1909,7 +1927,7 @@ export async function startSandboxCallbackBridgeServer(input: {
pid: typeof readyData.pid === "number" && Number.isFinite(readyData.pid) ? readyData.pid : 0,
directories,
stop: async () => {
- const stopResult = await input.runner.execute({
+ const stopResult = await runSandboxBridgeControlCommand(input.runner, {
command: shellCommand,
args: shellCommandArgs(
[
diff --git a/packages/adapter-utils/src/sandbox-managed-runtime.test.ts b/packages/adapter-utils/src/sandbox-managed-runtime.test.ts
index 88144df3dfa..bf5ab10e4df 100644
--- a/packages/adapter-utils/src/sandbox-managed-runtime.test.ts
+++ b/packages/adapter-utils/src/sandbox-managed-runtime.test.ts
@@ -6,6 +6,9 @@ import path from "node:path";
import { execFile as execFileCallback, spawn } from "node:child_process";
import { promisify } from "node:util";
import { afterEach, describe, expect, it, vi } from "vitest";
+import * as gitSync from "./git-workspace-sync.js";
+import * as restoreMerge from "./workspace-restore-merge.js";
+import { getWorkspaceRestoreDiagnostic } from "./workspace-restore-diagnostics.js";
import {
resetLocalGitIndexToHead,
runLocalGit,
@@ -835,6 +838,93 @@ describe("sandbox managed runtime", () => {
},
);
+ it("restores a sandbox rebase without merging it with unchanged host history", async () => {
+ const rootDir = await mkdtemp(path.join(os.tmpdir(), "paperclip-sandbox-rebase-"));
+ cleanupDirs.push(rootDir);
+ const host = path.join(rootDir, "host");
+ const remote = path.join(rootDir, "remote");
+ await mkdir(host);
+ await git(host, ["init"]);
+ await git(host, ["checkout", "-b", "work"]);
+ await git(host, ["config", "user.name", "Paperclip Test"]);
+ await git(host, ["config", "user.email", "test@paperclip.dev"]);
+ await writeFile(path.join(host, "pins.txt"), "base\n");
+ await writeFile(path.join(host, "notes.txt"), "original notes\n");
+ await git(host, ["add", "."]);
+ await git(host, ["commit", "-m", "base"]);
+ const base = await git(host, ["rev-parse", "HEAD"]);
+ await writeFile(path.join(host, "pins.txt"), "feature\n");
+ await git(host, ["commit", "-am", "feature"]);
+ const startingHead = await git(host, ["rev-parse", "HEAD"]);
+ await git(host, ["checkout", "-b", "upstream", base]);
+ await writeFile(path.join(host, "pins.txt"), "upstream\n");
+ await git(host, ["commit", "-am", "upstream"]);
+ await git(host, ["checkout", "work"]);
+
+ const prepared = await prepareSandboxManagedRuntime({
+ spec: { transport: "sandbox", provider: "test", sandboxId: "rebase", remoteCwd: remote, timeoutMs: 30_000, apiKey: null },
+ adapterKey: "test-adapter",
+ client: makeFilesystemClient(),
+ workspaceLocalDir: host,
+ });
+ await git(remote, ["config", "user.name", "Paperclip Test"]);
+ await git(remote, ["config", "user.email", "test@paperclip.dev"]);
+ await git(remote, ["fetch", "--unshallow", host, "+refs/heads/*:refs/remotes/source/*"]);
+ await expect(git(remote, ["rebase", "refs/remotes/source/upstream"])).rejects.toMatchObject({ code: 1 });
+ await writeFile(path.join(remote, "pins.txt"), "resolved pins\n");
+ await git(remote, ["add", "pins.txt"]);
+ await git(remote, ["-c", "core.editor=true", "rebase", "--continue"]);
+ const rebasedHead = await git(remote, ["rev-parse", "HEAD"]);
+ expect(rebasedHead).not.toBe(startingHead);
+ await writeFile(path.join(host, "notes.txt"), "host edits during the run\n");
+ await writeFile(path.join(host, "local-only.txt"), "local file\n");
+ await writeFile(path.join(remote, "output.txt"), "sandbox output\n");
+
+ await prepared.restoreWorkspace();
+
+ expect(await git(host, ["rev-parse", "HEAD"])).toBe(rebasedHead);
+ expect(await git(host, ["symbolic-ref", "--short", "HEAD"])).toBe("work");
+ expect(await readFile(path.join(host, "pins.txt"), "utf8")).toBe("resolved pins\n");
+ expect(await readFile(path.join(host, "notes.txt"), "utf8")).toBe("host edits during the run\n");
+ expect(await readFile(path.join(host, "local-only.txt"), "utf8")).toBe("local file\n");
+ expect(await readFile(path.join(host, "output.txt"), "utf8")).toBe("sandbox output\n");
+ expect(await git(host, ["diff", "--cached", "--name-only"])).toBe("");
+ });
+
+ it("restores a sandbox reset to an ancestor with the matching clean working tree", async () => {
+ const rootDir = await mkdtemp(path.join(os.tmpdir(), "paperclip-sandbox-reset-"));
+ cleanupDirs.push(rootDir);
+ const host = path.join(rootDir, "host");
+ const remote = path.join(rootDir, "remote");
+ await mkdir(host);
+ await git(host, ["init"]);
+ await git(host, ["checkout", "-b", "work"]);
+ await git(host, ["config", "user.name", "Paperclip Test"]);
+ await git(host, ["config", "user.email", "test@paperclip.dev"]);
+ await writeFile(path.join(host, "tracked.txt"), "original\n");
+ await git(host, ["add", "."]);
+ await git(host, ["commit", "-m", "original"]);
+ const ancestor = await git(host, ["rev-parse", "HEAD"]);
+ await writeFile(path.join(host, "tracked.txt"), "change to discard\n");
+ await git(host, ["commit", "-am", "later change"]);
+
+ const prepared = await prepareSandboxManagedRuntime({
+ spec: { transport: "sandbox", provider: "test", sandboxId: "reset", remoteCwd: remote, timeoutMs: 30_000, apiKey: null },
+ adapterKey: "test-adapter",
+ client: makeFilesystemClient(),
+ workspaceLocalDir: host,
+ });
+ await git(remote, ["fetch", "--unshallow", host, "work"]);
+ await git(remote, ["reset", "--hard", ancestor]);
+
+ await prepared.restoreWorkspace();
+
+ expect(await git(host, ["rev-parse", "HEAD"])).toBe(ancestor);
+ expect(await git(host, ["symbolic-ref", "--short", "HEAD"])).toBe("work");
+ expect(await readFile(path.join(host, "tracked.txt"), "utf8")).toBe("original\n");
+ expect(await git(host, ["status", "--porcelain"])).toBe("");
+ });
+
it("syncs git-backed workspaces through a shallow standalone clone and keeps .git out of archives", async () => {
const rootDir = await mkdtemp(path.join(os.tmpdir(), "paperclip-sandbox-git-"));
cleanupDirs.push(rootDir);
@@ -3975,14 +4065,14 @@ describe("sandbox managed runtime outbound coordinator", () => {
]);
}
- it("records each failed restore phase without changing stable failure ordering", async () => {
+ it.each([false, true])("records each failed restore phase in stable order (shared error: %s)", async (sharedError) => {
const { workspaceDir, remoteWorkspaceDir, dirOf } = await makeOutboundDirs(["home", "private-asset"]);
const { control, gate } = makeOutboundControl();
const client = makeGatedOutboundClient(true, gate);
const workspaceError = Object.assign(new Error("private workspace path"), { code: "EACCES" });
control.failWith("workspace", workspaceError);
- control.failWith("home", Object.assign(new Error("private credential"), { status: 404 }));
- control.failWith("private-asset", new Error("private asset error"));
+ control.failWith("home", sharedError ? workspaceError : Object.assign(new Error("private credential"), { status: 404 }));
+ control.failWith("private-asset", sharedError ? workspaceError : new Error("private asset error"));
const prepared = await prepareSandboxManagedRuntime({
spec: makeSpec(remoteWorkspaceDir), adapterKey: "codex", client, workspaceLocalDir: workspaceDir,
assets: [
@@ -3995,11 +4085,14 @@ describe("sandbox managed runtime outbound coordinator", () => {
const diagnostics = lines.filter((line) => line.includes("Workspace restore diagnostic:"));
expect(diagnostics).toHaveLength(3);
expect(diagnostics).toEqual(expect.arrayContaining([
- '[paperclip] Workspace restore diagnostic: {"phase":"workspace","errorCode":"EACCES"}\n',
- '[paperclip] Workspace restore diagnostic: {"phase":"asset","errorCode":"unknown","httpStatus":404}\n',
- '[paperclip] Workspace restore diagnostic: {"phase":"asset","errorCode":"unknown"}\n',
+ '[paperclip] Workspace restore diagnostic: {"phase":"workspace","step":"workspace_transfer","errorCode":"EACCES"}\n',
+ sharedError ? '[paperclip] Workspace restore diagnostic: {"phase":"asset","step":"asset_restore","errorCode":"EACCES"}\n'
+ : '[paperclip] Workspace restore diagnostic: {"phase":"asset","step":"asset_restore","errorCode":"unknown","httpStatus":404}\n',
+ sharedError ? '[paperclip] Workspace restore diagnostic: {"phase":"asset","step":"asset_restore","errorCode":"EACCES"}\n'
+ : '[paperclip] Workspace restore diagnostic: {"phase":"asset","step":"asset_restore","errorCode":"unknown"}\n',
]));
expect(diagnostics.join("")).not.toContain("private");
+ expect(getWorkspaceRestoreDiagnostic(workspaceError)).toEqual({ phase: "workspace", step: "workspace_transfer", errorCode: "EACCES" });
expect(control.settled).toEqual(expect.arrayContaining(["workspace", "home", "private-asset"]));
});
@@ -4355,6 +4448,48 @@ describe("sandbox git-bundle export transport", () => {
.filter((mapping) => path.posix.basename(mapping.sourcePath) === "git-delta.bundle");
}
+ it.each([
+ "git_export", "git_import", "workspace_transfer", "workspace_extract",
+ "directory_merge", "git_integration", "index_reset", "git_ref_cleanup",
+ ] as const)("identifies the actual %s failure during workspace restore", async (step) => {
+ const { localWorkspaceDir, remoteWorkspaceDir } = await setupGitBackedWorkspace("paperclip-restore-diagnostic-");
+ const client = makeTransportClient(step !== "workspace_extract", { syncOutOperations: [], readFilePaths: [] });
+ const prepared = await prepareSandboxManagedRuntime({
+ spec: gitSpec(remoteWorkspaceDir), adapterKey: "test-adapter", client, workspaceLocalDir: localWorkspaceDir,
+ });
+ await commitInSandbox(remoteWorkspaceDir);
+ const failure = Object.assign(new Error("private-restore-command /private-restore-path"), { code: 7, stderr: "private-restore-stderr" });
+ if (step === "git_export") client.run = async () => { throw failure; };
+ if (step === "git_import") vi.spyOn(gitSync, "fetchGitBundleIntoLocalRef").mockRejectedValueOnce(failure);
+ if (step === "directory_merge") vi.spyOn(restoreMerge, "mergeDirectoryWithBaseline").mockRejectedValueOnce(failure);
+ if (step === "git_integration") vi.spyOn(gitSync, "integrateImportedGitHead").mockRejectedValueOnce(failure);
+ if (step === "index_reset") vi.spyOn(gitSync, "resetLocalGitIndexToHead").mockRejectedValueOnce(failure);
+ if (step === "git_ref_cleanup") vi.spyOn(gitSync, "deleteLocalGitRef").mockRejectedValueOnce(failure);
+ if (step === "workspace_transfer") {
+ const syncOut = client.syncOut!;
+ client.syncOut = async (operations) => {
+ if (operations.some((operation) => operation.files.some((file) => file.kind === "directory"))) throw failure;
+ return syncOut(operations);
+ };
+ }
+ if (step === "workspace_extract") {
+ const readRemote = client.readFile;
+ client.readFile = async (remotePath, options) => remotePath.endsWith("workspace-download.tar")
+ ? Buffer.from("invalid archive") : readRemote(remotePath, options);
+ }
+ const lines: string[] = [];
+ try {
+ const thrown = await prepared.restoreWorkspace((line) => { lines.push(line); }).then(() => undefined, (error: unknown) => error);
+ expect(thrown).toBeInstanceOf(Error);
+ if (step !== "workspace_extract") expect(thrown).toBe(failure);
+ expect(getWorkspaceRestoreDiagnostic(thrown)).toMatchObject({ phase: "workspace", step, errorCode: "unknown" });
+ if (step !== "workspace_extract") expect(getWorkspaceRestoreDiagnostic(thrown)?.exitCode).toBe(7);
+ const diagnostics = lines.filter((line) => line.includes("Workspace restore diagnostic:"));
+ expect(diagnostics).toHaveLength(1);
+ expect(diagnostics[0]).not.toContain("private-restore-");
+ } finally { vi.restoreAllMocks(); }
+ });
+
it("moves the bundle through one native syncOut file mapping, never through readFile", async () => {
const capture: TransportCapture = { syncOutOperations: [], readFilePaths: [] };
const { localWorkspaceDir, remoteWorkspaceDir } = await setupGitBackedWorkspace("paperclip-bundle-native-");
diff --git a/packages/adapter-utils/src/sandbox-managed-runtime.ts b/packages/adapter-utils/src/sandbox-managed-runtime.ts
index 10eeab606e4..9ea60e5147e 100644
--- a/packages/adapter-utils/src/sandbox-managed-runtime.ts
+++ b/packages/adapter-utils/src/sandbox-managed-runtime.ts
@@ -49,7 +49,10 @@ import {
type SyncOperationTask,
} from "./sync-operation-schedule.js";
import type { RuntimeSpanRunner } from "./acpx-engine/startup-timing.js";
-import { withWorkspaceRestoreDiagnostics } from "./workspace-restore-diagnostics.js";
+import {
+ recordWorkspaceRestoreDiagnostic, withWorkspaceRestoreDiagnostics, withWorkspaceRestoreStep,
+ type WorkspaceRestoreDiagnostic,
+} from "./workspace-restore-diagnostics.js";
const execFile = promisify(execFileCallback);
const SANDBOX_WORKSPACE_HEAVY_DIR_NAMES = [
@@ -1717,6 +1720,7 @@ export async function prepareSandboxManagedRuntime(input: {
// started task before it returns, so lease teardown never starts while an
// outbound restore task still writes host data.
const outboundTasks: Array> = [];
+ const outboundDiagnostics: Array = [];
// The workspace restore task runs only when the run syncs the workspace.
// The task exports the sandbox git history (git-backed workspace), reads
@@ -1780,7 +1784,7 @@ export async function prepareSandboxManagedRuntime(input: {
// the import fails on a missing prerequisite. In that case re-export
// a full, self-contained bundle from the still-live sandbox rather
// than discard the completed run.
- const exportAndImport = async (forceFullBundle: boolean): Promise => {
+ const exportAndImport = async (forceFullBundle: boolean): Promise => withWorkspaceRestoreStep("git_export", async () => {
await input.client.run(
`sh -c ${shellQuote(buildRemoteGitDeltaBundleScript({
remoteDir: workspaceRemoteDir,
@@ -1838,14 +1842,14 @@ export async function prepareSandboxManagedRuntime(input: {
remoteWorkspaceStatus = remoteWorkspaceStatus === "clean" ? "clean" : "dirty";
await input.client.remove(remoteWorkspaceStatusPath).catch(() => undefined);
}
- return fetchGitBundleIntoLocalRef({
+ return withWorkspaceRestoreStep("git_import", () => fetchGitBundleIntoLocalRef({
localDir: input.workspaceLocalDir,
bundlePath: localBundlePath,
exportRef,
importedRef: importedRef!,
baseSha: gitSnapshot.headCommit,
- });
- };
+ }));
+ });
try {
importedHead = await exportAndImport(false);
@@ -1885,19 +1889,19 @@ export async function prepareSandboxManagedRuntime(input: {
"workspace",
{ sink: input.onRuntimeProgress, phase: "restore" },
);
- const syncResult = await input.client.syncOut!(operations);
+ const syncResult = await withWorkspaceRestoreStep("workspace_transfer", () => input.client.syncOut!(operations));
const transferredBytes = sumSyncResultBytes(syncResult);
await workspaceRestore.finish(transferredBytes, transferredBytes);
} else {
const remoteWorkspaceTar = path.posix.join(runtimeRootDir, "workspace-download.tar");
- await input.client.run(
+ await withWorkspaceRestoreStep("workspace_transfer", () => input.client.run(
`sh -c ${shellQuote(createRemoteTarballFromDirectoryCommand({
remoteDir: workspaceRemoteDir,
archivePath: remoteWorkspaceTar,
exclude: workspaceRestoreExclude,
}))}`,
{ timeoutMs: input.spec.timeoutMs },
- );
+ ));
const workspaceRestore = makeTransferProgress(
restoreSink,
"Restoring",
@@ -1905,52 +1909,57 @@ export async function prepareSandboxManagedRuntime(input: {
"workspace",
{ sink: input.onRuntimeProgress, phase: "restore" },
);
- const archiveBytes = await input.client.readFile(remoteWorkspaceTar, workspaceRestore.options);
+ const archiveBytes = await withWorkspaceRestoreStep("workspace_transfer", () => input.client.readFile(remoteWorkspaceTar, workspaceRestore.options));
const archiveBuffer = toBuffer(archiveBytes);
await workspaceRestore.finish(archiveBuffer.byteLength, archiveBuffer.byteLength);
await input.client.remove(remoteWorkspaceTar).catch(() => undefined);
const localArchivePath = path.join(tempDir, "workspace.tar");
- await fs.writeFile(localArchivePath, archiveBuffer);
- await extractTarballToDirectory({
- archivePath: localArchivePath,
- localDir: extractedDir,
+ await withWorkspaceRestoreStep("workspace_extract", async () => {
+ await fs.writeFile(localArchivePath, archiveBuffer);
+ await extractTarballToDirectory({
+ archivePath: localArchivePath,
+ localDir: extractedDir,
+ });
});
}
const gitHeadToIntegrate = importedHead;
- const mergeBaseline = repositories.length === 0 ? baselineSnapshot! : await selectDirectorySnapshot(baselineSnapshot!, {
- omit: repositories.map((repo) => repo.path), exclude: workspaceRestoreExclude, ignoredPaths: gitSnapshot?.ignoredPaths,
+ await withWorkspaceRestoreStep("directory_merge", async () => {
+ const mergeBaseline = repositories.length === 0 ? baselineSnapshot! : await selectDirectorySnapshot(baselineSnapshot!, {
+ omit: repositories.map((repo) => repo.path), exclude: workspaceRestoreExclude, ignoredPaths: gitSnapshot?.ignoredPaths,
+ });
+ try {
+ await mergeDirectoryWithBaseline({
+ baseline: mergeBaseline,
+ sourceDir: extractedDir,
+ targetDir: input.workspaceLocalDir,
+ beforeApply: gitHeadToIntegrate
+ ? async () => {
+ await withWorkspaceRestoreStep("git_integration", () => integrateImportedGitHead({
+ localDir: input.workspaceLocalDir,
+ importedHead: gitHeadToIntegrate,
+ baseline: gitSnapshot ?? undefined,
+ }));
+ }
+ : undefined,
+ afterApply: gitSnapshot
+ ? async () => {
+ await withWorkspaceRestoreStep("index_reset", () => resetLocalGitIndexToHead({
+ localDir: input.workspaceLocalDir,
+ checkWorkingTreeClean: remoteWorkspaceStatus === "clean",
+ }));
+ }
+ : undefined,
+ });
+ } finally { if (mergeBaseline !== baselineSnapshot) await disposeDirectorySnapshot(mergeBaseline); }
});
- try {
- await mergeDirectoryWithBaseline({
- baseline: mergeBaseline,
- sourceDir: extractedDir,
- targetDir: input.workspaceLocalDir,
- beforeApply: gitHeadToIntegrate
- ? async () => {
- await integrateImportedGitHead({
- localDir: input.workspaceLocalDir,
- importedHead: gitHeadToIntegrate,
- });
- }
- : undefined,
- afterApply: gitSnapshot
- ? async () => {
- await resetLocalGitIndexToHead({
- localDir: input.workspaceLocalDir,
- checkWorkingTreeClean: remoteWorkspaceStatus === "clean",
- });
- }
- : undefined,
- });
- } finally { if (mergeBaseline !== baselineSnapshot) await disposeDirectorySnapshot(mergeBaseline); }
} finally {
await emitRuntimeStatus(input.onRuntimeProgress, "finalize", "Finalizing workspace");
if (importedRef) {
- await deleteLocalGitRef({ localDir: input.workspaceLocalDir, ref: importedRef });
+ await withWorkspaceRestoreStep("git_ref_cleanup", () => deleteLocalGitRef({ localDir: input.workspaceLocalDir, ref: importedRef! }));
}
}
});
- }), restoreSink),
+ }), restoreSink, (diagnostic) => { outboundDiagnostics[0] = diagnostic; }),
);
}
@@ -1961,18 +1970,19 @@ export async function prepareSandboxManagedRuntime(input: {
if (!asset.restore) continue;
const assetRestore = asset.restore;
const assetKey = asset.key;
+ const taskIndex = outboundTasks.length;
outboundTasks.push(() =>
withWorkspaceRestoreDiagnostics(
"asset",
() => runStepSpan(`restore.asset.${assetKey}`, async () => {
await withTempDir("paperclip-sandbox-restore-", async (tempDir) => {
- await assetRestore({
+ await withWorkspaceRestoreStep("asset_restore", () => assetRestore({
assetDir: path.posix.join(runtimeRootDir, assetKey),
readFile: async (remotePath) => toBuffer(await input.client.readFile(remotePath)),
tempDir,
- });
+ }));
});
- }), restoreSink),
+ }), restoreSink, (diagnostic) => { outboundDiagnostics[taskIndex] = diagnostic; }),
);
}
@@ -1989,8 +1999,9 @@ export async function prepareSandboxManagedRuntime(input: {
// Every outbound restore is a required operation: a rejection is fatal.
// The workspace comes first, then each asset in order. Raise the first
// rejection in stable task order, so two failures raise the earlier one.
- for (const result of outboundResults) {
+ for (const [index, result] of outboundResults.entries()) {
if (result.status === "rejected") {
+ recordWorkspaceRestoreDiagnostic(result.reason, outboundDiagnostics[index]);
throw result.reason;
}
}
diff --git a/packages/adapter-utils/src/server-utils.test.ts b/packages/adapter-utils/src/server-utils.test.ts
index b0e1125c672..f2ea940969b 100644
--- a/packages/adapter-utils/src/server-utils.test.ts
+++ b/packages/adapter-utils/src/server-utils.test.ts
@@ -21,15 +21,19 @@ import {
isPaperclipExternalChatTurn,
materializePaperclipSkillCopy,
PAPERCLIP_OPERATIONAL_SKILL_KEY,
+ PAPERCLIP_FEEDBACK_SKILL_KEYS,
refreshPaperclipWorkspaceEnvForExecution,
renderPaperclipWakePrompt,
resolveLegacyPaperclipDesiredSkillNames,
resolvePaperclipDesiredSkillNames,
selectPaperclipTaskMarkdown,
selectInitialCommunicationGuidance,
+ hydrateFreshSessionHandoff,
runningProcesses,
runChildProcess,
sanitizeSshRemoteEnv,
+ sanitizeInheritedPaperclipEnv,
+ isForbiddenConfigEnvKey,
signalRunningProcess,
shapePaperclipWorkspaceEnvForExecution,
rewriteWorkspaceCwdEnvVarsForExecution,
@@ -39,6 +43,13 @@ import {
WATCHDOG_DEFAULT_MANDATE,
} from "./server-utils.js";
+it("reserves identity credentials even for mixed-case inherited or configured keys", () => {
+ const keys = ["PAPERCLIP_AGENT_KEY_ID", "Paperclip_Agent_Public_Key", "paperclip_agent_private_key"];
+ const inherited = Object.fromEntries(keys.map(key => [key, "host-override"]));
+ expect(sanitizeInheritedPaperclipEnv({ ...inherited, PATH: "/usr/bin" })).toEqual({ PATH: "/usr/bin" });
+ for (const key of keys) expect(isForbiddenConfigEnvKey(key)).toBe(true);
+});
+
describe("runtime connection tool delivery", () => {
const access = {
version: 1 as const,
@@ -142,6 +153,17 @@ describe("legacy adapter skill selection", () => {
[],
);
});
+
+ it("makes feedback available to existing legacy agents without opting native agents into API skills", () => {
+ const inventory = [operationalEntry, ...PAPERCLIP_FEEDBACK_SKILL_KEYS.map((key) => ({ key }))];
+ for (const config of [{}, { paperclipSkillSync: { desiredSkills: [] } }]) {
+ expect(resolveLegacyPaperclipDesiredSkillNames(config, inventory)).toEqual([
+ PAPERCLIP_OPERATIONAL_SKILL_KEY, ...PAPERCLIP_FEEDBACK_SKILL_KEYS,
+ ]);
+ expect(resolvePaperclipDesiredSkillNames(config, inventory)).toEqual([]);
+ }
+ expect(resolveLegacyPaperclipDesiredSkillNames({}, inventory.slice(1))).toEqual([]);
+ });
});
function isPidAlive(pid: number) {
@@ -924,7 +946,7 @@ describe("renderPaperclipWakePrompt", () => {
fallbackFetchNeeded: false,
};
const ordinary = renderPaperclipWakePrompt(payload, { resumedSession: true });
- expect(ordinary).toContain("Execution contract:");
+ expect(ordinary).not.toContain("Execution contract:");
expect(ordinary).toContain("Create child issues from the approved plan");
for (const resumedSession of [false, true]) {
const chat = renderPaperclipWakePrompt(payload, {
@@ -1170,7 +1192,7 @@ describe("renderPaperclipWakePrompt", () => {
expect(incompleteResumePrompt).toContain(
"[continuation summary truncated]",
);
- expect(incompleteResumePrompt).toContain(
+ expect(incompleteResumePrompt).not.toContain(
"a successful process exit or final response is not sufficient",
);
});
@@ -1409,76 +1431,18 @@ describe("renderPaperclipWakePrompt", () => {
);
});
- it("keeps the default local-agent prompt action-oriented", () => {
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "Start actionable work in this heartbeat",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "do not stop at a plan",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "clear final disposition",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "evidence, not valid liveness paths by themselves",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "keep `in_progress` only when a live continuation path exists",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "Prefer the smallest verification that proves the change",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "After 2 consecutive failures of the same control-plane write",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "adapter/runtime status channel as the sanctioned fallback",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "Use child issues",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "instead of polling agents, sessions, or processes",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "Create child issues directly when you know what needs to be done",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "POST /api/issues/$PAPERCLIP_TASK_ID/interactions",
- );
- // URL paths in prompt text carry real ids or env vars, never brace
- // placeholders: agents paste these lines verbatim, and a literal {issueId}
- // reaches the server as /api/issues/%7BissueId%7D and 404s.
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).not.toContain(
- "/api/issues/{issueId}",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).not.toContain(
- "/api/issues/{id}",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "kind suggest_tasks, ask_user_questions, or request_confirmation",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "Use continuationPolicy wake_assignee when you need to resume after a response (it wakes on acceptance and rejection alike; only expiry does not wake); use wake_assignee_on_accept when you want to resume only after acceptance",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).not.toContain(
- "for request_confirmation this resumes only after acceptance",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "Never create probe or throwaway issue-thread interactions to discover the interactions API shape or your permissions",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "confirmation:{issueId}:plan:{revisionId}",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "Wait for acceptance before creating implementation subtasks",
- );
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
- "Respect budget, pause/cancel, approval gates, and company boundaries",
- );
+ it("keeps task and chat defaults to identity and connection guidance", () => {
+ for (const template of [
+ DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE,
+ DEFAULT_PAPERCLIP_CONVERSATION_PROMPT_TEMPLATE,
+ ]) {
+ expect(template).toBe(
+ `You are agent {{agent.id}} ({{agent.name}}).\n\n${CONNECTION_INTENT_AGENT_GUIDANCE}`,
+ );
+ }
});
- it("leaves the execution contract to the heartbeat template on fresh scoped wake prompts", () => {
+ it("keeps current task data without generic procedures on fresh scoped wake prompts", () => {
const prompt = renderPaperclipWakePrompt({
reason: "issue_assigned",
issue: {
@@ -1498,12 +1462,12 @@ describe("renderPaperclipWakePrompt", () => {
expect(prompt).toContain("## Paperclip Wake Payload");
expect(prompt).not.toContain("Execution contract:");
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(
+ expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).not.toContain(
"Execution contract:",
);
});
- it("adds the execution contract to resume delta prompts and opted-in fresh prompts", () => {
+ it("does not restore generic procedures on resume or with the legacy opt-in", () => {
const payload = {
reason: "issue_assigned",
issue: {
@@ -1521,36 +1485,19 @@ describe("renderPaperclipWakePrompt", () => {
fallbackFetchNeeded: false,
};
- for (const prompt of [
- renderPaperclipWakePrompt(payload, { resumedSession: true }),
- renderPaperclipWakePrompt(payload, { includeExecutionContract: true }),
- ]) {
- expect(prompt).toContain(
- "Execution contract: take concrete action in this heartbeat",
- );
- expect(prompt).toContain("clear final disposition");
- expect(prompt).toContain(
- "Immediately before returning, verify that Paperclip records one of those dispositions",
- );
- expect(prompt).toContain(
- "a successful process exit or final response is not sufficient",
- );
- expect(prompt).toContain(
- "If no valid disposition is recorded, record it now and do not end the run",
- );
- expect(prompt).toContain(
- "After 2 consecutive failures of the same control-plane write",
- );
- expect(prompt).toContain(
- "adapter/runtime status channel as the sanctioned fallback",
- );
- expect(prompt).toContain(
- "evidence, not valid liveness paths by themselves",
- );
- expect(prompt).toContain(
- "Use child issues for long or parallel delegated work instead of polling",
- );
- expect(prompt).toContain("named unblock owner/action");
+ for (const resumedSession of [false, true]) {
+ for (const includeExecutionContract of [undefined, false, true]) {
+ const prompt = renderPaperclipWakePrompt(payload, {
+ resumedSession, includeExecutionContract,
+ });
+ expect(prompt).toContain(resumedSession ? "## Paperclip Resume Delta" : "## Paperclip Wake Payload");
+ expect(prompt).toContain("- reason: issue_assigned");
+ expect(prompt).toContain("- issue: PAP-1580 Update prompts");
+ expect(prompt).toContain("- issue status: in_progress");
+ expect(prompt).not.toContain("Execution contract:");
+ expect(prompt).not.toContain("clear final disposition");
+ expect(prompt).not.toContain("do not end the run");
+ }
}
});
@@ -1946,7 +1893,7 @@ describe("renderPaperclipWakePrompt", () => {
);
});
- it("keeps exactly one execution contract in a composed fresh heartbeat prompt", () => {
+ it("keeps connection guidance without a generic manual in a composed fresh prompt", () => {
const wakePrompt = renderPaperclipWakePrompt({
reason: "issue_assigned",
issue: {
@@ -1966,7 +1913,8 @@ describe("renderPaperclipWakePrompt", () => {
const composed = [wakePrompt, DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE].join(
"\n\n",
);
- expect(composed.match(/Execution contract/g)).toHaveLength(1);
+ expect(composed).toContain(CONNECTION_INTENT_AGENT_GUIDANCE);
+ expect(composed).not.toContain("Execution contract:");
});
it("trims comment-batch boilerplate on fresh wakes with zero pending comments", () => {
@@ -3091,6 +3039,9 @@ describe("selectPaperclipTaskMarkdown", () => {
expect(selectInitialCommunicationGuidance({ paperclipTaskCommunicationGuidance: " Slack preference " })).toBe("Slack preference");
expect(selectInitialCommunicationGuidance(context, { resumedSession: true })).toBe("");
expect(selectInitialCommunicationGuidance({})).toBe("");
+ const handoffContext = { ...context, paperclipFreshSessionHandoffMarkdown: "Prior goal and approved decisions" };
+ expect(selectInitialCommunicationGuidance(handoffContext, { resumedSession: true })).toBe("");
+ expect(selectInitialCommunicationGuidance(handoffContext, { resumedSession: false })).toContain("Prior goal and approved decisions");
expect(selectPaperclipTaskMarkdown(context, { resumedSession: true })).toBe(compactMarkdown);
expect(selectPaperclipTaskMarkdown(context, { includeCommunicationGuidance: false })).toBe(fullMarkdown);
context.paperclipWake = { ...wake("issue_monitor_recovery"), recovery: { cause: "process_lost" } } as typeof context.paperclipWake;
@@ -3098,6 +3049,20 @@ describe("selectPaperclipTaskMarkdown", () => {
expect(selectPaperclipTaskMarkdown(context, { resumedSession: false }).match(/Saved initial guidance/g)).toHaveLength(1);
});
+ it("reads history only at a fresh provider attempt, including resume fallback", async () => {
+ let reads = 0;
+ const ctx = { context: {} as Record, getFreshSessionHandoff: async () => {
+ reads += 1;
+ return "Original goal and prior answer";
+ } };
+ await hydrateFreshSessionHandoff(ctx, { resumedSession: true });
+ expect(reads).toBe(0);
+ expect(ctx.context.paperclipFreshSessionHandoffMarkdown).toBeUndefined();
+ await hydrateFreshSessionHandoff(ctx, { resumedSession: false });
+ expect(reads).toBe(1);
+ expect(selectInitialCommunicationGuidance(ctx.context)).toContain("Original goal and prior answer");
+ });
+
it("falls back to the full markdown when no compact variant exists", () => {
expect(
selectPaperclipTaskMarkdown(
diff --git a/packages/adapter-utils/src/server-utils.ts b/packages/adapter-utils/src/server-utils.ts
index ee7e8df4b69..bb4310e9df2 100644
--- a/packages/adapter-utils/src/server-utils.ts
+++ b/packages/adapter-utils/src/server-utils.ts
@@ -19,6 +19,8 @@ import {
normalizeLegacyRunnerProvider,
} from "./paperclip-runner-permissions.js";
import type {
+ AdapterExecutionContext,
+ AgentRuntimeIdentity,
AdapterRuntimeToolAccess,
AdapterSkillEntry,
AdapterSkillSnapshot,
@@ -167,7 +169,8 @@ export function isPaperclipRuntimeEnvKey(key: string): boolean {
// Other PAPERCLIP_*-named config keys are allowed as long as Paperclip has
// not assigned the same key for the run (runtime vars always win).
export function isForbiddenConfigEnvKey(key: string): boolean {
- return key === "PAPERCLIP_API_KEY" || key === "PAPERCLIP_WAKE_PAYLOAD_JSON";
+ return key === "PAPERCLIP_API_KEY" || key === "PAPERCLIP_WAKE_PAYLOAD_JSON" ||
+ AGENT_IDENTITY_ENV_KEYS.includes(key.toUpperCase());
}
const PAPERCLIP_SKILL_ROOT_RELATIVE_CANDIDATES = [
"../../skills",
@@ -207,41 +210,15 @@ export function resolvePaperclipInstanceRootForAdapter(
}
export const DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE = [
- "You are agent {{agent.id}} ({{agent.name}}). Continue your Paperclip work.",
- "",
- "Execution contract:",
- "- Start actionable work in this heartbeat; do not stop at a plan unless the issue asks for planning.",
- "- Leave durable progress in comments, documents, or work products, then update the issue to a clear final disposition before ending the heartbeat.",
- "- Comments, documents, screenshots, work products, and `Remaining` bullets are evidence, not valid liveness paths by themselves.",
- "- Final disposition checklist: mark `done` when complete; use `in_review` only with a real reviewer, approval, interaction, or monitor path; use `blocked` only with first-class blockers or a named unblock owner/action; create delegated follow-up issues with blockers when another agent owns the next step; keep `in_progress` only when a live continuation path exists.",
- "- Prefer the smallest verification that proves the change; do not default to full workspace typecheck/build/test on every heartbeat unless the task scope warrants it.",
- "- After 2 consecutive failures of the same control-plane write, stop retrying that write for the rest of the heartbeat. Continue useful work, report the failure in the final response, and rely on the adapter/runtime status channel as the sanctioned fallback.",
- "- Use child issues for parallel or long delegated work instead of polling agents, sessions, or processes.",
- "- If woken by a human comment on a dependency-blocked issue, respond or triage the comment without treating the blocked deliverable work as unblocked.",
- "- Create child issues directly when you know what needs to be done; use issue-thread interactions when the board/user must choose suggested tasks, answer structured questions, or confirm a proposal.",
- "- Use `PAPERCLIP_SCRATCH_DIR` / `PAPERCLIP_RUN_SCRATCH_DIR` for temporary scratch files instead of ad hoc `/tmp` paths; Paperclip removes that run-owned directory after the run ends.",
- "- To ask for that input, create an interaction on the current issue with POST /api/issues/$PAPERCLIP_TASK_ID/interactions using kind suggest_tasks, ask_user_questions, or request_confirmation. Use continuationPolicy wake_assignee when you need to resume after a response (it wakes on acceptance and rejection alike; only expiry does not wake); use wake_assignee_on_accept when you want to resume only after acceptance.",
- "- Never create probe or throwaway issue-thread interactions to discover the interactions API shape or your permissions; schema discovery goes through the OpenAPI spec and explicit validation errors, not placeholder cards. Every ask_user_questions, suggest_tasks, or request_confirmation you post must carry a real, answerable prompt; withdraw one you no longer need instead of leaving it pending.",
- "- When you intentionally restart follow-up work on a completed assigned issue, include structured `resume: true` with the POST /api/issues/$PAPERCLIP_TASK_ID/comments or PATCH /api/issues/$PAPERCLIP_TASK_ID comment payload (substitute that issue's real id when it is not the current task). Generic agent comments on closed issues are inert by default.",
- "- For plan approval, update the plan document first, then create request_confirmation targeting the latest plan revision with idempotencyKey confirmation:{issueId}:plan:{revisionId}. Wait for acceptance before creating implementation subtasks, and create a fresh confirmation after superseding board/user comments if approval is still needed.",
- "- If blocked, mark the issue blocked and name the unblock owner and action.",
- "- Respect budget, pause/cancel, approval gates, and company boundaries.",
- "- When the server-authenticated wake payload includes an External chat response contract, that narrower contract replaces the generic Paperclip comment, status, checkout, and final-disposition steps above for that turn. Follow the external-chat contract exactly; it does not relax any permission, approval, execution-policy, containment, budget, pause/cancel, or company boundary.",
+ "You are agent {{agent.id}} ({{agent.name}}).",
"",
CONNECTION_INTENT_AGENT_GUIDANCE,
].join("\n");
-// Chat behavior is supplied centrally by the server's task-context markdown.
-// Keep the ordinary task's completion/delegation contract out of this template.
-export const DEFAULT_PAPERCLIP_CONVERSATION_PROMPT_TEMPLATE = [
- "You are agent {{agent.id}} ({{agent.name}}). Continue your Paperclip conversation using the supplied chat mode directive.",
- "Use available tools and assigned skills as needed; respect budget, pause/cancel, approval gates, and company boundaries.",
- "Prefer the smallest verification that proves the action. Use PAPERCLIP_SCRATCH_DIR / PAPERCLIP_RUN_SCRATCH_DIR for temporary scratch files.",
- "After 2 consecutive failures of the same control-plane write, stop retrying that write for the rest of the turn. Report the failure honestly; never claim an unconfirmed mutation succeeded.",
- "Never create probe or throwaway issue-thread interactions. Every interaction must carry a real, answerable prompt; withdraw one you no longer need.",
- "",
- CONNECTION_INTENT_AGENT_GUIDANCE,
-].join("\n");
+// Task/chat modes arrive in server-owned context; operational procedures live
+// in the harness-delivered Paperclip skill rather than either default template.
+export const DEFAULT_PAPERCLIP_CONVERSATION_PROMPT_TEMPLATE =
+ DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE;
export const WATCHDOG_DEFAULT_MANDATE = [
"You are running as a task watchdog, not as the original deliverable worker.",
@@ -2175,12 +2152,25 @@ export function isAssignmentShapedPaperclipWakeReason(
// Select at the actual provider attempt boundary so a failed resume restores
// the original snapshot once when retrying with a fresh session.
+export async function hydrateFreshSessionHandoff(
+ ctx: Pick,
+ options: { resumedSession?: boolean } = {},
+): Promise {
+ if (options.resumedSession === true || !ctx.getFreshSessionHandoff) return;
+ const handoff = await ctx.getFreshSessionHandoff();
+ if (handoff) ctx.context.paperclipFreshSessionHandoffMarkdown = handoff;
+ else delete ctx.context.paperclipFreshSessionHandoffMarkdown;
+}
+
export function selectInitialCommunicationGuidance(
context: Record | null | undefined,
options: { resumedSession?: boolean } = {},
): string {
return options.resumedSession === true
- ? "" : asString(context?.paperclipTaskCommunicationGuidance, "").trim();
+ ? "" : joinPromptSections([
+ asString(context?.paperclipTaskCommunicationGuidance, "").trim(),
+ asString(context?.paperclipFreshSessionHandoffMarkdown, "").trim(),
+ ]);
}
// Picks the task-context markdown variant for adapters that inject it into the
@@ -2228,6 +2218,7 @@ export function selectPaperclipPromptSections(
options: {
resumedSession?: boolean;
includeCommunicationGuidance?: boolean;
+ /** @deprecated Generic execution instructions are no longer injected. */
includeExecutionContract?: boolean;
nativeWakeReaderAvailable?: boolean;
} = {},
@@ -2256,6 +2247,7 @@ export function renderPaperclipWakePrompt(
return joinPromptSections([
renderPaperclipWakePromptBody(value, options),
instructions ? `## Assigned connector skills\n\n${instructions}` : "",
+ asString(parseObject(parseObject(value).connectionInstructions).text, "").trim(),
]);
}
@@ -2263,6 +2255,7 @@ function renderPaperclipWakePromptBody(
value: unknown,
options: {
resumedSession?: boolean;
+ /** @deprecated Generic execution instructions are no longer injected. */
includeExecutionContract?: boolean;
// Conversation policy arrives in the server-owned task markdown. Generic
// task disposition and child-delegation instructions conflict with it.
@@ -2287,12 +2280,6 @@ function renderPaperclipWakePromptBody(
externalChatTurn ||
externalChatReaderTurn ||
externalChatQuestionResponseTurn;
- // The heartbeat prompt template already carries the execution contract on
- // fresh sessions; only resume deltas (which replace the template) and
- // template-less adapters need the wake-payload copy. An explicit false means
- // another delivery carrier owns the contract, including on resume.
- const includeExecutionContract = options.conversationMode !== true &&
- (options.includeExecutionContract ?? resumedSession);
const hasWakeCommentBatch =
normalized.comments.length > 0 ||
normalized.includedCount > 0 ||
@@ -2383,7 +2370,7 @@ function renderPaperclipWakePromptBody(
}
};
- const executionContractLines = externalChatContract
+ const wakeContractLines = externalChatContract
? [
externalChatQuestionResponseTurn
? "## External chat answered-question contract"
@@ -2430,12 +2417,7 @@ function renderPaperclipWakePromptBody(
`Fallback preference order: (1) send back to ${originalAssigneeLabel} with a retry instruction; (2) fix the runtime/adapter/workspace problem, then send it back; (3) reassign to another agent with the right specialty; (4) convert to an explicit manual-review state for the board.`,
"",
]
- : includeExecutionContract
- ? [
- "Execution contract: take concrete action in this heartbeat when the issue is actionable; do not stop at a plan unless planning was requested. Leave durable progress and then give the issue a clear final disposition before ending the heartbeat: `done`, `in_review` with a real reviewer/approval/interaction path, `blocked` with first-class blockers or a named unblock owner/action, delegated follow-up issues with blockers, or `in_progress` only when a live continuation path exists. Immediately before returning, verify that Paperclip records one of those dispositions; a successful process exit or final response is not sufficient. If no valid disposition is recorded, record it now and do not end the run. After 2 consecutive failures of the same control-plane write, stop retrying it for the rest of the heartbeat, continue useful work, report the failure in the final response, and rely on the adapter/runtime status channel as the sanctioned fallback. Use child issues for long or parallel delegated work instead of polling. Comments, documents, screenshots, work products, and `Remaining` bullets are evidence, not valid liveness paths by themselves.",
- "",
- ]
- : [];
+ : [];
const wakeSummaryLines = [
`- reason: ${normalized.reason ?? "unknown"}`,
`- issue: ${normalized.issue?.identifier ?? normalized.issue?.id ?? "unknown"}${normalized.issue?.title ? ` ${normalized.issue.title}` : ""}`,
@@ -2493,7 +2475,7 @@ function renderPaperclipWakePromptBody(
]),
"",
...externalInteractionContinuationLines,
- ...executionContractLines,
+ ...wakeContractLines,
...wakeSummaryLines,
]
: [
@@ -2523,7 +2505,7 @@ function renderPaperclipWakePromptBody(
: []),
"",
...externalInteractionContinuationLines,
- ...executionContractLines,
+ ...wakeContractLines,
...wakeSummaryLines,
];
@@ -3213,10 +3195,22 @@ export function buildInvocationEnvForLogs(
return redactEnvForLogs(merged);
}
+export const AGENT_IDENTITY_ENV_KEYS = [
+ "PAPERCLIP_AGENT_KEY_ID", "PAPERCLIP_AGENT_PUBLIC_KEY", "PAPERCLIP_AGENT_PRIVATE_KEY",
+];
+
+export function buildAgentIdentityEnv(identity?: AgentRuntimeIdentity): Record {
+ return identity ? {
+ PAPERCLIP_AGENT_KEY_ID: identity.keyId,
+ PAPERCLIP_AGENT_PUBLIC_KEY: identity.publicKeyPem,
+ PAPERCLIP_AGENT_PRIVATE_KEY: identity.privateKeyPem,
+ } : {};
+}
+
export function buildPaperclipEnv(agent: {
id: string;
companyId: string;
-}): Record {
+}, identity?: AgentRuntimeIdentity): Record {
const resolveHostForUrl = (rawHost: string): string => {
const host = rawHost.trim();
if (!host || host === "0.0.0.0" || host === "::") return "localhost";
@@ -3227,6 +3221,7 @@ export function buildPaperclipEnv(agent: {
const vars: Record = {
PAPERCLIP_AGENT_ID: agent.id,
PAPERCLIP_COMPANY_ID: agent.companyId,
+ ...buildAgentIdentityEnv(identity),
};
const runtimeHost = resolveHostForUrl(
process.env.PAPERCLIP_LISTEN_HOST ?? process.env.HOST ?? "localhost",
@@ -3515,6 +3510,10 @@ export function sanitizeInheritedPaperclipEnv(
const env: NodeJS.ProcessEnv = { ...baseEnv };
delete env.PAPERCLIPAI_CMD;
for (const key of Object.keys(env)) {
+ if (AGENT_IDENTITY_ENV_KEYS.includes(key.toUpperCase())) {
+ delete env[key];
+ continue;
+ }
if (!key.startsWith("PAPERCLIP_")) continue;
if (key === "PAPERCLIP_RUNTIME_API_URL") continue;
if (key === "PAPERCLIP_LISTEN_HOST") continue;
@@ -4230,6 +4229,11 @@ export function resolvePaperclipDesiredSkillNames(
export const PAPERCLIP_OPERATIONAL_SKILL_KEY =
"paperclipai/paperclip/paperclip";
+export const PAPERCLIP_FEEDBACK_SKILL_KEYS = [
+ "paperclipai/paperclip/complain",
+ "paperclipai/paperclip/suggestion-box",
+] as const;
+
/**
* Native Paperclip Runner sessions receive the control-plane contract through
* PRP, so carrying the legacy operational skill into their stored preference
@@ -4293,12 +4297,11 @@ export function resolveLegacyPaperclipDesiredSkillNames(
);
if (!operationalEntry) return desiredSkills;
- return [
- operationalEntry.key,
- ...desiredSkills.filter(
- (key) => key.trim().toLowerCase() !== PAPERCLIP_OPERATIONAL_SKILL_KEY,
- ),
- ];
+ const feedbackEntries = PAPERCLIP_FEEDBACK_SKILL_KEYS.flatMap((key) => {
+ const entry = availableEntries.find((candidate) => candidate.key.trim().toLowerCase() === key);
+ return entry ? [entry.key] : [];
+ });
+ return Array.from(new Set([operationalEntry.key, ...feedbackEntries, ...desiredSkills]));
}
export function writePaperclipSkillSyncPreference(
diff --git a/packages/adapter-utils/src/session-compaction.ts b/packages/adapter-utils/src/session-compaction.ts
index 3764155c406..5e06015bf1c 100644
--- a/packages/adapter-utils/src/session-compaction.ts
+++ b/packages/adapter-utils/src/session-compaction.ts
@@ -42,6 +42,7 @@ export const LEGACY_SESSIONED_ADAPTER_TYPES = new Set([
"cursor_cloud",
"cursor",
"gemini_local",
+ "grok_local",
"hermes_local",
"kimi_local",
"opencode_local",
@@ -74,6 +75,11 @@ export const ADAPTER_SESSION_MANAGEMENT: Record {
await expect(readFile(path.join(localRepo, "run-b.txt"), "utf8")).resolves.toBe("from run b\n");
}, SSH_FIXTURE_TEST_TIMEOUT_MS);
+ it("round-trips project repositories nested in .paperclip-repositories across consecutive SSH runs", async () => {
+ const rootDir = await createFixtureRootDir();
+ const statePath = path.join(rootDir, "state.json");
+ const localRepo = path.join(rootDir, "local-workspace");
+ const nestedRelative = ".paperclip-repositories/frontend-0123456789ab";
+ const nestedRepo = path.join(localRepo, nestedRelative);
+
+ await mkdir(localRepo, { recursive: true });
+ await git(localRepo, ["init"]);
+ await git(localRepo, ["checkout", "-b", "main"]);
+ await git(localRepo, ["config", "user.name", "Paperclip Test"]);
+ await git(localRepo, ["config", "user.email", "test@paperclip.dev"]);
+ await writeFile(path.join(localRepo, "backend.txt"), "backend base\n", "utf8");
+ await git(localRepo, ["add", "backend.txt"]);
+ await git(localRepo, ["commit", "-m", "backend initial"]);
+ await writeFile(path.join(localRepo, ".git", "info", "exclude"), "\n/.paperclip-repositories/\n", { flag: "a" });
+
+ await mkdir(nestedRepo, { recursive: true });
+ await git(nestedRepo, ["init"]);
+ await git(nestedRepo, ["checkout", "-b", "main"]);
+ await git(nestedRepo, ["config", "user.name", "Paperclip Test"]);
+ await git(nestedRepo, ["config", "user.email", "test@paperclip.dev"]);
+ await writeFile(path.join(nestedRepo, "frontend.txt"), "frontend base\n", "utf8");
+ await writeFile(path.join(nestedRepo, "obsolete.txt"), "tracked\n", "utf8");
+ await git(nestedRepo, ["add", "frontend.txt", "obsolete.txt"]);
+ await git(nestedRepo, ["commit", "-m", "frontend initial"]);
+ await writeFile(path.join(nestedRepo, "frontend.txt"), "frontend dirty local\n", "utf8");
+ await rm(path.join(nestedRepo, "obsolete.txt"));
+
+ const started = await startSshEnvLabFixtureOrSkip(statePath, "SSH nested project repositories test");
+ if (!started) return;
+ const config = await buildSshEnvLabFixtureConfig(started);
+ const spec = {
+ ...config,
+ remoteCwd: started.workspaceDir,
+ } as const;
+
+ const first = await prepareRemoteManagedRuntime({
+ spec,
+ runId: "run-1",
+ adapterKey: "test-adapter",
+ workspaceLocalDir: localRepo,
+ });
+ const remoteNested = path.posix.join(first.workspaceRemoteDir, nestedRelative);
+
+ const remoteNestedStatus = await runSshCommand(
+ config,
+ `cd ${JSON.stringify(remoteNested)} && git log -1 --pretty=%s && git status --short`,
+ );
+ expect(remoteNestedStatus.stdout).toContain("frontend initial");
+ expect(remoteNestedStatus.stdout).toContain("M frontend.txt");
+ expect(remoteNestedStatus.stdout).toContain("D obsolete.txt");
+ const remoteAnchorStatus = await runSshCommand(
+ config,
+ `cd ${JSON.stringify(first.workspaceRemoteDir)} && git status --short --untracked-files=all`,
+ );
+ expect(remoteAnchorStatus.stdout).not.toContain(".paperclip-repositories");
+
+ await runSshCommand(
+ config,
+ [
+ `cd ${JSON.stringify(remoteNested)}`,
+ `git config user.name "Paperclip SSH"`,
+ `git config user.email "ssh@paperclip.dev"`,
+ `git add frontend.txt`,
+ `git commit -m "remote frontend update" >/dev/null`,
+ `printf "frontend remote dirty\\n" > frontend.txt`,
+ `cd ${JSON.stringify(first.workspaceRemoteDir)}`,
+ `git config user.name "Paperclip SSH"`,
+ `git config user.email "ssh@paperclip.dev"`,
+ `printf "backend remote\\n" > backend.txt`,
+ `git add backend.txt`,
+ `git commit -m "remote backend update" >/dev/null`,
+ ].join(" && "),
+ { timeoutMs: 30_000, maxBuffer: 256 * 1024 },
+ );
+
+ await first.restoreWorkspace();
+
+ await expect(stat(path.join(nestedRepo, ".git"))).resolves.toBeDefined();
+ expect(await git(nestedRepo, ["log", "-1", "--pretty=%s"])).toBe("remote frontend update");
+ await expect(readFile(path.join(nestedRepo, "frontend.txt"), "utf8")).resolves.toBe("frontend remote dirty\n");
+ expect(await git(localRepo, ["log", "-1", "--pretty=%s"])).toBe("remote backend update");
+ expect(await git(localRepo, ["status", "--short", "--untracked-files=all"])).not.toContain(".paperclip-repositories");
+
+ const second = await prepareRemoteManagedRuntime({
+ spec,
+ runId: "run-2",
+ adapterKey: "test-adapter",
+ workspaceLocalDir: localRepo,
+ });
+ const secondNestedLog = await runSshCommand(
+ config,
+ `cd ${JSON.stringify(path.posix.join(second.workspaceRemoteDir, nestedRelative))} && git log -1 --pretty=%s`,
+ );
+ expect(secondNestedLog.stdout.trim()).toBe("remote frontend update");
+ await second.restoreWorkspace();
+ await expect(stat(path.join(nestedRepo, ".git"))).resolves.toBeDefined();
+ await expect(readFile(path.join(nestedRepo, "frontend.txt"), "utf8")).resolves.toBe("frontend remote dirty\n");
+ }, SSH_FIXTURE_TEST_TIMEOUT_MS * 2);
+
+ it("restores project repositories through the direct SSH restore path", async () => {
+ const rootDir = await createFixtureRootDir();
+ const statePath = path.join(rootDir, "state.json");
+ const localRepo = path.join(rootDir, "local-workspace");
+ const nestedRelative = ".paperclip-repositories/frontend-0123456789ab";
+ const nestedRepo = path.join(localRepo, nestedRelative);
+
+ for (const repo of [localRepo, nestedRepo]) {
+ await mkdir(repo, { recursive: true });
+ await git(repo, ["init"]);
+ await git(repo, ["checkout", "-b", "main"]);
+ await git(repo, ["config", "user.name", "Paperclip Test"]);
+ await git(repo, ["config", "user.email", "test@paperclip.dev"]);
+ await writeFile(path.join(repo, "tracked.txt"), "base\n", "utf8");
+ await git(repo, ["add", "tracked.txt"]);
+ await git(repo, ["commit", "-m", "initial"]);
+ }
+ await writeFile(path.join(localRepo, ".git", "info", "exclude"), "\n/.paperclip-repositories/\n", { flag: "a" });
+
+ const started = await startSshEnvLabFixtureOrSkip(statePath, "SSH direct restore with project repositories test");
+ if (!started) return;
+ const config = await buildSshEnvLabFixtureConfig(started);
+ const spec = {
+ ...config,
+ remoteCwd: started.workspaceDir,
+ } as const;
+
+ const prepared = await prepareWorkspaceForSshExecution({
+ spec,
+ localDir: localRepo,
+ remoteDir: started.workspaceDir,
+ });
+ expect(prepared).toEqual({ gitBacked: true, repositories: [nestedRelative] });
+
+ await runSshCommand(
+ config,
+ [
+ `cd ${JSON.stringify(path.posix.join(started.workspaceDir, nestedRelative))}`,
+ `git config user.name "Paperclip SSH"`,
+ `git config user.email "ssh@paperclip.dev"`,
+ `printf "remote\\n" > tracked.txt`,
+ `git commit -am "remote nested update" >/dev/null`,
+ ].join(" && "),
+ { timeoutMs: 30_000, maxBuffer: 256 * 1024 },
+ );
+
+ await restoreWorkspaceFromSshExecution({
+ spec,
+ localDir: localRepo,
+ remoteDir: started.workspaceDir,
+ repositories: (prepared.repositories ?? []).map((repository) => ({ path: repository })),
+ });
+
+ await expect(stat(path.join(nestedRepo, ".git"))).resolves.toBeDefined();
+ expect(await git(nestedRepo, ["log", "-1", "--pretty=%s"])).toBe("remote nested update");
+ await expect(readFile(path.join(nestedRepo, "tracked.txt"), "utf8")).resolves.toBe("remote\n");
+ expect(await git(localRepo, ["status", "--short", "--untracked-files=all"])).toBe("");
+ }, SSH_FIXTURE_TEST_TIMEOUT_MS * 2);
+
+ it("fails closed when .paperclip-repositories holds something other than a git checkout", async () => {
+ const rootDir = await createFixtureRootDir();
+ const localRepo = path.join(rootDir, "local-workspace");
+ await mkdir(path.join(localRepo, ".paperclip-repositories", "not-a-repo"), { recursive: true });
+ await git(localRepo, ["init"]);
+ await git(localRepo, ["checkout", "-b", "main"]);
+ await git(localRepo, ["config", "user.name", "Paperclip Test"]);
+ await git(localRepo, ["config", "user.email", "test@paperclip.dev"]);
+ await writeFile(path.join(localRepo, "tracked.txt"), "base\n", "utf8");
+ await git(localRepo, ["add", "tracked.txt"]);
+ await git(localRepo, ["commit", "-m", "initial"]);
+
+ await expect(prepareWorkspaceForSshExecution({ spec: UNREACHABLE_SSH_SPEC, localDir: localRepo, remoteDir: "/nonexistent" }))
+ .rejects.toThrow("Project repository is not a Git checkout: .paperclip-repositories/not-a-repo");
+ }, SSH_FIXTURE_TEST_TIMEOUT_MS);
+
+ it("rejects inconsistent project repository restores before any SSH connection", async () => {
+ const localDir = await createFixtureRootDir();
+ const repositoryBaseline = { exclude: [".git", ".git/*", ".paperclip-runtime"], entries: new Map() };
+ const restore = (input: Partial[0]>) =>
+ restoreWorkspaceFromSshExecution({
+ spec: UNREACHABLE_SSH_SPEC,
+ localDir,
+ remoteDir: "/nonexistent",
+ baselineSnapshot: { exclude: [".git", ".git/*", ".paperclip-runtime", ".paperclip-repositories"], entries: new Map() },
+ restoreGitHistory: true,
+ ...input,
+ });
+
+ await expect(restore({ repositories: [{ path: "../outside", baselineSnapshot: repositoryBaseline }] }))
+ .rejects.toThrow("Invalid project repository path: ../outside");
+ await expect(restore({ repositories: [{ path: ".paperclip-repositories/frontend-0123456789ab" }] }))
+ .rejects.toThrow("Project repository has no workspace baseline: .paperclip-repositories/frontend-0123456789ab");
+ await expect(restore({
+ baselineSnapshot: { exclude: [".git", ".git/*", ".paperclip-runtime"], entries: new Map() },
+ repositories: [{ path: ".paperclip-repositories/frontend-0123456789ab", baselineSnapshot: repositoryBaseline }],
+ })).rejects.toThrow("Workspace baseline must exclude .paperclip-repositories");
+ }, SSH_FIXTURE_TEST_TIMEOUT_MS);
+
it("preserves nested per-run files across sequential SSH restores with stale baselines", async () => {
const rootDir = await createFixtureRootDir();
const statePath = path.join(rootDir, "state.json");
diff --git a/packages/adapter-utils/src/ssh.ts b/packages/adapter-utils/src/ssh.ts
index 89fd456c5d4..68e61fc6390 100644
--- a/packages/adapter-utils/src/ssh.ts
+++ b/packages/adapter-utils/src/ssh.ts
@@ -9,6 +9,7 @@ import type { CommandManagedRuntimeRunner } from "./command-managed-runtime.js";
import {
createUnrelatedHistoryGraftCommit,
GIT_SYNC_COMMIT_IDENTITY_ARGS,
+ PROJECT_REPOSITORIES_DIR,
readSanitizedOriginRemoteUrl,
} from "./git-workspace-sync.js";
import type { RunProcessResult } from "./server-utils.js";
@@ -1071,6 +1072,91 @@ async function removeDeletedPathsOnSsh(input: {
});
}
+const PROJECT_REPOSITORY_NAME_PATTERN = /^[a-zA-Z0-9_-]+$/;
+
+async function isLocalGitRepositoryRoot(localDir: string): Promise {
+ try {
+ const toplevel = await runLocalGit(localDir, ["rev-parse", "--show-toplevel"], {
+ timeout: 10_000,
+ maxBuffer: 16 * 1024,
+ });
+ const [directory, repository] = await Promise.all([
+ fs.realpath(localDir),
+ fs.realpath(toplevel.stdout.trim()),
+ ]);
+ return directory === repository;
+ } catch {
+ return false;
+ }
+}
+
+async function listLocalProjectRepositories(localDir: string): Promise {
+ const root = path.join(localDir, PROJECT_REPOSITORIES_DIR);
+ const rootStat = await fs.lstat(root).catch((error: NodeJS.ErrnoException) => {
+ if (error.code === "ENOENT") return null;
+ throw error;
+ });
+ if (!rootStat) return [];
+ if (!rootStat.isDirectory() || rootStat.isSymbolicLink()) {
+ throw new Error("Invalid project repositories directory");
+ }
+ const repositories: string[] = [];
+ for (const entry of await fs.readdir(root, { withFileTypes: true })) {
+ if (!entry.isDirectory() || !PROJECT_REPOSITORY_NAME_PATTERN.test(entry.name)) {
+ throw new Error("Invalid project repository directory");
+ }
+ const relative = `${PROJECT_REPOSITORIES_DIR}/${entry.name}`;
+ if (!(await isLocalGitRepositoryRoot(path.join(localDir, relative)))) {
+ throw new Error(`Project repository is not a Git checkout: ${relative}`);
+ }
+ repositories.push(relative);
+ }
+ return repositories.sort();
+}
+
+async function transportGitWorkspaceToSsh(input: {
+ spec: SshRemoteExecutionSpec;
+ localDir: string;
+ remoteDir: string;
+ snapshot: LocalGitWorkspaceSnapshot;
+ exclude?: string[];
+ onProgress?: RuntimeProgressSink;
+ progressLabel: string;
+}): Promise {
+ await importGitWorkspaceToSsh({
+ spec: input.spec,
+ localDir: input.localDir,
+ remoteDir: input.remoteDir,
+ snapshot: input.snapshot,
+ onProgress: input.onProgress,
+ });
+ await syncDirectoryToSsh({
+ spec: input.spec,
+ localDir: input.localDir,
+ remoteDir: input.remoteDir,
+ exclude: [".git", ".paperclip-runtime", ...(input.exclude ?? [])],
+ onProgress: input.onProgress,
+ progressLabel: input.progressLabel,
+ });
+ await removeDeletedPathsOnSsh({
+ spec: input.spec,
+ remoteDir: input.remoteDir,
+ deletedPaths: input.snapshot.deletedPaths,
+ });
+}
+
+async function excludeProjectRepositoriesOnSsh(spec: SshConnectionConfig, remoteDir: string): Promise {
+ const pattern = `/${PROJECT_REPOSITORIES_DIR}/`;
+ const excludeFile = path.posix.join(remoteDir, ".git", "info", "exclude");
+ await runSshScript(
+ spec,
+ `mkdir -p ${shellQuote(path.posix.dirname(excludeFile))} && ` +
+ `{ grep -qxF ${shellQuote(pattern)} ${shellQuote(excludeFile)} 2>/dev/null || ` +
+ `printf '\\n%s\\n' ${shellQuote(pattern)} >> ${shellQuote(excludeFile)}; }`,
+ { timeoutMs: 30_000 },
+ );
+}
+
async function allocateLoopbackPort(host: string): Promise {
return await new Promise((resolve, reject) => {
const server = net.createServer();
@@ -1560,32 +1646,38 @@ export async function prepareWorkspaceForSshExecution(input: {
onProgress?: RuntimeProgressSink;
workspaceFileMode?: "all";
workspaceExclude?: string[];
-}): Promise<{ gitBacked: boolean }> {
+}): Promise<{ gitBacked: boolean; repositories?: string[] }> {
const remoteDir = input.remoteDir ?? input.spec.remoteCwd;
const gitSnapshot = input.workspaceFileMode === "all" ? null : await readLocalGitWorkspaceSnapshot(input.localDir);
if (gitSnapshot) {
- await importGitWorkspaceToSsh({
+ const repositories = await listLocalProjectRepositories(input.localDir);
+ await transportGitWorkspaceToSsh({
spec: input.spec,
localDir: input.localDir,
remoteDir,
snapshot: gitSnapshot,
- onProgress: input.onProgress,
- });
- await syncDirectoryToSsh({
- spec: input.spec,
- localDir: input.localDir,
- remoteDir,
- exclude: [".git", ".paperclip-runtime"],
+ exclude: repositories.length > 0 ? [PROJECT_REPOSITORIES_DIR] : [],
onProgress: input.onProgress,
progressLabel: "workspace",
});
- await removeDeletedPathsOnSsh({
- spec: input.spec,
- remoteDir,
- deletedPaths: gitSnapshot.deletedPaths,
- });
- return { gitBacked: true };
+ if (repositories.length > 0) {
+ await excludeProjectRepositoriesOnSsh(input.spec, remoteDir);
+ }
+ for (const relative of repositories) {
+ const localDir = path.join(input.localDir, relative);
+ const snapshot = await readLocalGitWorkspaceSnapshot(localDir);
+ if (!snapshot) throw new Error(`Cannot read the Git state of project repository: ${relative}`);
+ await transportGitWorkspaceToSsh({
+ spec: input.spec,
+ localDir,
+ remoteDir: path.posix.join(remoteDir, relative),
+ snapshot,
+ onProgress: input.onProgress,
+ progressLabel: relative,
+ });
+ }
+ return { gitBacked: true, ...(repositories.length > 0 ? { repositories } : {}) };
}
await clearRemoteDirectory({
@@ -1611,8 +1703,62 @@ export async function restoreWorkspaceFromSshExecution(input: {
baselineSnapshot?: DirectorySnapshot;
restoreGitHistory?: boolean;
onProgress?: RuntimeProgressSink;
+ repositories?: Array<{ path: string; baselineSnapshot?: DirectorySnapshot }>;
}): Promise {
const remoteDir = input.remoteDir ?? input.spec.remoteCwd;
+ const repositories = input.repositories ?? [];
+ for (const repository of repositories) {
+ if (
+ path.posix.dirname(repository.path) !== PROJECT_REPOSITORIES_DIR ||
+ !PROJECT_REPOSITORY_NAME_PATTERN.test(path.posix.basename(repository.path))
+ ) {
+ throw new Error(`Invalid project repository path: ${repository.path}`);
+ }
+ if (input.baselineSnapshot && !repository.baselineSnapshot) {
+ throw new Error(`Project repository has no workspace baseline: ${repository.path}`);
+ }
+ }
+ if (
+ input.baselineSnapshot &&
+ repositories.length > 0 &&
+ !input.baselineSnapshot.exclude.includes(PROJECT_REPOSITORIES_DIR)
+ ) {
+ throw new Error(`Workspace baseline must exclude ${PROJECT_REPOSITORIES_DIR} when project repositories are restored separately`);
+ }
+ for (const repository of repositories) {
+ await restoreWorkspaceRootFromSsh({
+ spec: input.spec,
+ localDir: path.join(input.localDir, repository.path),
+ remoteDir: path.posix.join(remoteDir, repository.path),
+ baselineSnapshot: repository.baselineSnapshot,
+ restoreGitHistory: input.restoreGitHistory,
+ onProgress: input.onProgress,
+ progressLabel: repository.path,
+ });
+ }
+ await restoreWorkspaceRootFromSsh({
+ spec: input.spec,
+ localDir: input.localDir,
+ remoteDir,
+ baselineSnapshot: input.baselineSnapshot,
+ restoreGitHistory: input.restoreGitHistory,
+ onProgress: input.onProgress,
+ progressLabel: "workspace",
+ hasProjectRepositories: repositories.length > 0,
+ });
+}
+
+async function restoreWorkspaceRootFromSsh(input: {
+ spec: SshRemoteExecutionSpec;
+ localDir: string;
+ remoteDir: string;
+ baselineSnapshot?: DirectorySnapshot;
+ restoreGitHistory?: boolean;
+ onProgress?: RuntimeProgressSink;
+ progressLabel: string;
+ hasProjectRepositories?: boolean;
+}): Promise {
+ const remoteDir = input.remoteDir;
if (input.baselineSnapshot) {
const stagingDir = await fs.mkdtemp(path.join(os.tmpdir(), "paperclip-ssh-sync-back-"));
const importedRef = input.restoreGitHistory
@@ -1635,7 +1781,7 @@ export async function restoreWorkspaceFromSshExecution(input: {
localDir: stagingDir,
exclude: input.baselineSnapshot.exclude,
onProgress: input.onProgress,
- progressLabel: "workspace",
+ progressLabel: input.progressLabel,
});
await mergeDirectoryWithBaseline({
baseline: input.baselineSnapshot,
@@ -1666,6 +1812,7 @@ export async function restoreWorkspaceFromSshExecution(input: {
const gitSnapshot = await readLocalGitWorkspaceSnapshot(input.localDir);
if (gitSnapshot) {
+ const projectRepositoryEntries = input.hasProjectRepositories ? [PROJECT_REPOSITORIES_DIR] : [];
await exportGitWorkspaceFromSsh({
spec: input.spec,
remoteDir,
@@ -1676,10 +1823,10 @@ export async function restoreWorkspaceFromSshExecution(input: {
spec: input.spec,
remoteDir,
localDir: input.localDir,
- exclude: [".git", ".paperclip-runtime"],
- preserveLocalEntries: [".git"],
+ exclude: [".git", ".paperclip-runtime", ...projectRepositoryEntries],
+ preserveLocalEntries: [".git", ...projectRepositoryEntries],
onProgress: input.onProgress,
- progressLabel: "workspace",
+ progressLabel: input.progressLabel,
});
return;
}
@@ -1690,7 +1837,7 @@ export async function restoreWorkspaceFromSshExecution(input: {
localDir: input.localDir,
exclude: [".paperclip-runtime"],
onProgress: input.onProgress,
- progressLabel: "workspace",
+ progressLabel: input.progressLabel,
});
}
diff --git a/packages/adapter-utils/src/types.ts b/packages/adapter-utils/src/types.ts
index e8cf9307cdd..6b068adcd3b 100644
--- a/packages/adapter-utils/src/types.ts
+++ b/packages/adapter-utils/src/types.ts
@@ -5,6 +5,7 @@
import type { SshRemoteExecutionSpec } from "./ssh.js";
import type { AdapterExecutionTarget } from "./execution-target.js";
import type { RuntimeStatusSink } from "./runtime-progress.js";
+import type { AdapterExecutionPhaseSink } from "./execution-phase.js";
import type { ExecutionContinuationEnvelope, NativeFinalizationResult } from "@paperclipai/shared";
export interface AdapterAgent {
@@ -195,7 +196,17 @@ export interface AdapterRuntimeEvent {
payload?: Record;
}
+export interface AgentRuntimeIdentity {
+ keyId: string;
+ publicKeyPem: string;
+ privateKeyPem: string;
+}
+
export interface AdapterExecutionContext {
+ /** Server-owned credentials. Never persist this object or merge it into config. */
+ agentIdentity?: AgentRuntimeIdentity;
+ /** Synchronous, content-free diagnostic scope; never stop or collection authority. */
+ onExecutionPhase?: AdapterExecutionPhaseSink;
/** Run-scoped operator cancellation; adapters must settle before returning. */
signal?: AbortSignal;
/** Opt in to signal-based cancellation before starting provider work. */
@@ -213,6 +224,8 @@ export interface AdapterExecutionContext {
runtime: AdapterRuntime;
config: Record;
context: Record;
+ /** Build bounded history only when an actual provider attempt starts fresh. */
+ getFreshSessionHandoff?: () => Promise;
runtimeCommandSpec?: AdapterRuntimeCommandSpec | null;
executionTarget?: AdapterExecutionTarget | null;
/**
@@ -463,6 +476,8 @@ export interface ServerAdapterModule {
syncSkills?: (ctx: AdapterSkillContext, desiredSkills: string[]) => Promise;
sessionCodec?: AdapterSessionCodec;
sessionManagement?: import("./session-compaction.js").AdapterSessionManagement;
+ /** Selected harness can resume its conversation with this run's tool bindings. */
+ supportsToolRefreshOnResume?: boolean | ((config: Record) => boolean);
supportsLocalAgentJwt?: boolean;
/** How this adapter receives Paperclip's run-scoped control tools. */
runtimeToolDelivery?: AdapterRuntimeToolDelivery;
diff --git a/packages/adapter-utils/src/workspace-restore-diagnostics.test.ts b/packages/adapter-utils/src/workspace-restore-diagnostics.test.ts
index 5281c686a90..39e82e19297 100644
--- a/packages/adapter-utils/src/workspace-restore-diagnostics.test.ts
+++ b/packages/adapter-utils/src/workspace-restore-diagnostics.test.ts
@@ -1,8 +1,90 @@
import { describe, expect, it, vi } from "vitest";
import { classifyWorkspaceRestoreFailure } from "./workspace-restore-merge.js";
-import { withWorkspaceRestoreDiagnostics } from "./workspace-restore-diagnostics.js";
+import {
+ getWorkspaceRestoreDiagnostic, preserveWorkspaceRestoreErrorDiagnostic, recordWorkspaceRestoreDiagnostic,
+ sanitizeWorkspaceRestoreDiagnostic, withWorkspaceRestoreDiagnostics, withWorkspaceRestoreStep, withWorkspaceRestoreGitCommand,
+ type WorkspaceRestoreDiagnostic,
+} from "./workspace-restore-diagnostics.js";
describe("workspace restore diagnostics", () => {
+ it.each([new Error("shared nested failure"), "shared primitive failure"])("selects an unlabelled nested failure without retaining a later task's step (%s)", async (error) => {
+ const sink = vi.fn();
+ const snapshots: Array = [];
+ await expect(withWorkspaceRestoreDiagnostics("workspace", async () => {
+ await Promise.allSettled([
+ withWorkspaceRestoreDiagnostics("workspace", async () => { throw error; }, sink, (value) => { snapshots[0] = value; }),
+ withWorkspaceRestoreDiagnostics("asset", () => withWorkspaceRestoreStep("asset_restore", async () => { throw error; }), sink,
+ (value) => { snapshots[1] = value; }),
+ ]);
+ recordWorkspaceRestoreDiagnostic(error, snapshots[0]);
+ throw error;
+ }, sink)).rejects.toBe(error);
+ expect(snapshots[1]?.step).toBe("asset_restore");
+ expect(getWorkspaceRestoreDiagnostic(error)).toEqual(typeof error === "object" ? { phase: "workspace", errorCode: "unknown" } : undefined);
+ expect(sink).toHaveBeenCalledExactlyOnceWith('[paperclip] Workspace restore diagnostic: {"phase":"workspace","errorCode":"unknown"}\n');
+ });
+
+ it("keeps logging when a diagnostic consumer fails", async () => {
+ const error = new Error("restore failed");
+ const sink = vi.fn();
+ await expect(withWorkspaceRestoreDiagnostics("workspace", async () => { throw error; }, sink,
+ () => { throw new Error("consumer failed"); })).rejects.toBe(error);
+ expect(sink).toHaveBeenCalledTimes(1);
+ });
+
+ it("retains a nested step and bounded Git fields across an existing wrapper without a cause", async () => {
+ const source = Object.assign(new Error("private command/path"), { code: 1, stderr: "private stderr" });
+ const wrapper = new Error("existing wrapper");
+ await expect(withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("directory_merge", async () => {
+ try {
+ await withWorkspaceRestoreStep("git_integration", async () => { throw source; });
+ } catch (error) { throw preserveWorkspaceRestoreErrorDiagnostic(wrapper, error); }
+ }))).rejects.toBe(wrapper);
+ expect(wrapper).not.toHaveProperty("cause");
+ expect(Object.keys(wrapper)).toEqual([]);
+ expect(getWorkspaceRestoreDiagnostic(wrapper)).toEqual({ phase: "workspace", step: "git_integration", errorCode: "unknown", exitCode: 1 });
+ });
+
+ it("attributes a reused error to the later failed retry step", async () => {
+ const error = new Error("same failure");
+ await expect(withWorkspaceRestoreDiagnostics("workspace", async () => {
+ await withWorkspaceRestoreStep("git_import", async () => { throw error; }).catch(() => {});
+ await withWorkspaceRestoreStep("git_export", async () => { throw error; });
+ })).rejects.toBe(error);
+ expect(getWorkspaceRestoreDiagnostic(error)?.step).toBe("git_export");
+ await expect(withWorkspaceRestoreDiagnostics("asset", async () => { throw error; })).rejects.toBe(error);
+ expect(getWorkspaceRestoreDiagnostic(error)).toEqual({ phase: "asset", errorCode: "unknown" });
+ });
+
+ it("isolates concurrent steps even when their errors share identity", async () => {
+ const error = new Error("shared error");
+ const sink = vi.fn();
+ await Promise.allSettled([
+ withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("git_import", async () => { throw error; }), sink),
+ withWorkspaceRestoreDiagnostics("asset", () => withWorkspaceRestoreStep("asset_restore", async () => { throw error; }), sink),
+ ]);
+ expect(sink.mock.calls.map(([line]) => JSON.parse(line.split(": ")[1]))).toEqual(expect.arrayContaining([
+ { phase: "workspace", step: "git_import", errorCode: "unknown" },
+ { phase: "asset", step: "asset_restore", errorCode: "unknown" },
+ ]));
+ });
+
+ it("starts a fresh scope for later work inherited from a completed async context", async () => {
+ const error = new Error("later failure");
+ let release!: () => void;
+ const gate = new Promise((resolve) => { release = resolve; });
+ let later!: Promise;
+ const sink = vi.fn();
+ await withWorkspaceRestoreDiagnostics("workspace", async () => {
+ later = gate.then(() => withWorkspaceRestoreDiagnostics("asset", () =>
+ withWorkspaceRestoreStep("asset_restore", async () => { throw error; }), sink)).catch((value) => value);
+ }, sink);
+ release();
+ expect(await later).toBe(error);
+ expect(getWorkspaceRestoreDiagnostic(error)).toEqual({ phase: "asset", step: "asset_restore", errorCode: "unknown" });
+ expect(sink).toHaveBeenCalledTimes(1);
+ });
+
it("leaves successful restores silent", async () => {
const sink = vi.fn();
expect(await withWorkspaceRestoreDiagnostics("workspace", async () => 42, sink)).toBe(42);
@@ -82,3 +164,136 @@ describe("workspace restore diagnostics", () => {
expect(sink).toHaveBeenCalledTimes(3);
});
});
+
+describe("Git integration diagnostic privacy and attribution", () => {
+ async function capture(command: Parameters[0], error: unknown) {
+ let receipt: WorkspaceRestoreDiagnostic | undefined;
+ const originalProperties = error && typeof error === "object" ? Object.getOwnPropertyDescriptors(error) : undefined;
+ await expect(withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("git_integration", () =>
+ withWorkspaceRestoreGitCommand(command, async () => { throw error; })), undefined,
+ (value) => { receipt = value; })).rejects.toBe(error);
+ if (originalProperties) expect(Object.getOwnPropertyDescriptors(error)).toEqual(originalProperties);
+ return receipt;
+ }
+
+ it.each([
+ ["merge_tree", { code: 1, stdout: "a".repeat(40) + "\nprivate-file", stderr: "private-conflict-body" }, "merge_conflict"],
+ ["merge_tree", { code: 1 }, "unknown"],
+ ["merge_tree", { code: 1, stderr: `merge-tree: ${"a".repeat(40)} - not something we can merge\n` }, "invalid_object"],
+ ["merge_tree", { code: 1, signal: "SIGTERM" }, "unknown"],
+ ["merge_tree", { code: 1, killed: true }, "unknown"],
+ ["merge_tree", { code: 128, stderr: "fatal: Not a valid object name private-object" }, "invalid_object"],
+ ["merge_tree", { code: 128, stderr: `merge-tree: ${"a".repeat(40)} - not something we can merge\n` }, "invalid_object"],
+ ["merge_base", { code: 128, stderr: "fatal: Not a valid commit name private-object" }, "invalid_object"],
+ ["rev_parse", { code: 128, stderr: "fatal: bad object private-object" }, "invalid_object"],
+ ["update_ref", { code: 128, stderr: `fatal: update_ref failed for ref 'private-ref': cannot lock ref 'private-ref': is at ${"a".repeat(40)} but expected ${"b".repeat(40)}\n` }, "ref_conflict"],
+ ["update_ref", { code: 128, stderr: "fatal: Unable to create 'private-path.lock': File exists." }, "unknown"],
+ ["update_ref", { code: "EACCES", stderr: "private-path" }, "permission_denied"],
+ ["commit_tree", { code: "EPERM" }, "permission_denied"],
+ ["commit_tree", { code: 1, stderr: "Permission denied private-path" }, "unknown"],
+ ["symbolic_ref", { code: 1 }, "unknown"],
+ ["merge_base", { code: 1 }, "unknown"],
+ ["log", { code: 128, stderr: "localized or unrecognized private-text" }, "unknown"],
+ ["log", { code: 128, stderr: "x".repeat(16 * 1024) + "\nfatal: bad object private-object" }, "unknown"],
+ ["merge_tree", "private-string", "unknown"],
+ ] as const)("classifies only supported %s evidence (%j)", async (command, error, kind) => {
+ const receipt = await capture(command, error);
+ expect(receipt).toMatchObject({ gitCommand: command, gitFailureKind: kind });
+ expect(JSON.stringify(receipt)).not.toContain("private-");
+ expect(Object.keys(receipt!).sort()).toEqual([
+ "phase", "step", "errorCode", "gitCommand", "gitFailureKind",
+ ...(typeof error === "object" && typeof error.code === "number" ? ["exitCode"] : []),
+ ].sort());
+ });
+
+ it("treats throwing stderr getters as unknown and never replaces the original error", async () => {
+ const error = Object.defineProperty(new Error("private-original"), "stderr", { get() { throw new Error("private-getter"); } });
+ expect(await capture("commit_tree", error)).toEqual({ phase: "workspace", step: "git_integration",
+ errorCode: "unknown", gitCommand: "commit_tree", gitFailureKind: "unknown" });
+ });
+
+ it("retains a nested command across wrappers and nested task diagnostics", async () => {
+ const source = Object.assign(new Error("private-source"), { code: 1, stdout: "a".repeat(40) + "\n" });
+ const wrapper = new Error("private-wrapper");
+ const sink = vi.fn();
+ await expect(withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("directory_merge", () =>
+ withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("git_integration", async () => {
+ try { await withWorkspaceRestoreGitCommand("merge_tree", async () => { throw source; }); }
+ catch (error) { throw preserveWorkspaceRestoreErrorDiagnostic(wrapper, error); }
+ }), sink)), sink)).rejects.toBe(wrapper);
+ expect(getWorkspaceRestoreDiagnostic(wrapper)).toEqual({ phase: "workspace", step: "git_integration",
+ errorCode: "unknown", exitCode: 1, gitCommand: "merge_tree", gitFailureKind: "merge_conflict" });
+ expect(wrapper).not.toHaveProperty("cause");
+ expect(sink).toHaveBeenCalledTimes(1);
+ expect(sink.mock.calls[0][0]).not.toContain("private-");
+ });
+
+ it("keeps a nested identity probe failure instead of relabelling it as its ref transaction", async () => {
+ const error = Object.assign(new Error("private-probe"), { code: 128, stderr: "private-probe-output" });
+ await expect(withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("git_integration", () =>
+ withWorkspaceRestoreGitCommand("update_ref", () =>
+ withWorkspaceRestoreGitCommand("symbolic_ref", async () => { throw error; }))))).rejects.toBe(error);
+ expect(getWorkspaceRestoreDiagnostic(error)).toEqual({ phase: "workspace", step: "git_integration",
+ errorCode: "unknown", exitCode: 128, gitCommand: "symbolic_ref", gitFailureKind: "unknown" });
+ });
+
+ it("does not retain a handled command's label on a later failed step or retry", async () => {
+ const error = Object.assign(new Error("same error"), { code: 1 });
+ await expect(withWorkspaceRestoreDiagnostics("workspace", async () => {
+ await withWorkspaceRestoreStep("git_integration", () =>
+ withWorkspaceRestoreGitCommand("merge_tree", async () => { throw error; })).catch(() => {});
+ await withWorkspaceRestoreStep("index_reset", async () => { throw error; });
+ })).rejects.toBe(error);
+ expect(getWorkspaceRestoreDiagnostic(error)).toEqual({ phase: "workspace", step: "index_reset", errorCode: "unknown", exitCode: 1 });
+ await expect(withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("git_integration", async () => {
+ await withWorkspaceRestoreGitCommand("merge_tree", async () => { throw error; }).catch(() => {});
+ await withWorkspaceRestoreGitCommand("update_ref", async () => { throw error; });
+ }))).rejects.toBe(error);
+ expect(getWorkspaceRestoreDiagnostic(error)).toMatchObject({ gitCommand: "update_ref", gitFailureKind: "unknown" });
+ });
+
+ it("retains the selected parallel task's command when two errors share identity", async () => {
+ const error = Object.assign(new Error("shared"), { code: 1, stdout: "a".repeat(40) + "\n" });
+ const snapshots: WorkspaceRestoreDiagnostic[] = [];
+ await expect(withWorkspaceRestoreDiagnostics("workspace", async () => {
+ await Promise.allSettled((["merge_tree", "update_ref"] as const).map((command, index) =>
+ withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("git_integration", () =>
+ withWorkspaceRestoreGitCommand(command, async () => { throw error; })), undefined,
+ (receipt) => { snapshots[index] = receipt; })));
+ recordWorkspaceRestoreDiagnostic(error, snapshots[0]);
+ throw error;
+ })).rejects.toBe(error);
+ expect(snapshots.map(value => value.gitCommand)).toEqual(["merge_tree", "update_ref"]);
+ expect(getWorkspaceRestoreDiagnostic(error)).toMatchObject({ gitCommand: "merge_tree", gitFailureKind: "merge_conflict" });
+ });
+
+ it("leaves successful or handled commands silent and preserves values", async () => {
+ const sink = vi.fn();
+ const value = {};
+ expect(await withWorkspaceRestoreDiagnostics("workspace", () => withWorkspaceRestoreStep("git_integration", async () => {
+ await withWorkspaceRestoreGitCommand("symbolic_ref", async () => { throw { code: 1 }; }).catch(() => {});
+ return withWorkspaceRestoreGitCommand("update_ref", async () => value);
+ }), sink)).toBe(value);
+ expect(sink).not.toHaveBeenCalled();
+ const error = new Error("outside restore");
+ await expect(withWorkspaceRestoreGitCommand("log", async () => { throw error; })).rejects.toBe(error);
+ expect(getWorkspaceRestoreDiagnostic(error)).toBeUndefined();
+ });
+
+ it.each([
+ { phase: "asset", step: "git_integration", gitCommand: "merge_tree" },
+ { phase: "workspace", step: "index_reset", gitCommand: "merge_tree" },
+ { phase: "workspace", step: "git_integration", gitCommand: "private-command" },
+ ])("does not decode Git metadata outside the closed integration contract (%j)", (value) => {
+ const diagnostic = sanitizeWorkspaceRestoreDiagnostic({ ...value, gitFailureKind: "merge_conflict" });
+ expect(diagnostic).not.toHaveProperty("gitCommand");
+ expect(diagnostic).not.toHaveProperty("gitFailureKind");
+ });
+
+ it("revalidates persisted command and failure labels without copying extra fields", () => {
+ expect(sanitizeWorkspaceRestoreDiagnostic({ phase: "workspace", step: "git_integration", gitCommand: "log",
+ gitFailureKind: "private-reason", stderr: "private-text", args: ["private-args"] })).toEqual({
+ phase: "workspace", step: "git_integration", errorCode: "unknown", gitCommand: "log", gitFailureKind: "unknown",
+ });
+ });
+});
diff --git a/packages/adapter-utils/src/workspace-restore-diagnostics.ts b/packages/adapter-utils/src/workspace-restore-diagnostics.ts
index 4330b5ac25e..afb8d659c96 100644
--- a/packages/adapter-utils/src/workspace-restore-diagnostics.ts
+++ b/packages/adapter-utils/src/workspace-restore-diagnostics.ts
@@ -2,12 +2,54 @@ import { AsyncLocalStorage } from "node:async_hooks";
import type { RuntimeProgressSink } from "./runtime-progress.js";
type RestorePhase = "workspace" | "asset";
+const RESTORE_STEPS = new Set([
+ "git_export", "git_import", "workspace_transfer", "workspace_extract",
+ "directory_merge", "git_integration", "index_reset", "git_ref_cleanup", "asset_restore",
+] as const);
+export type WorkspaceRestoreStep = typeof RESTORE_STEPS extends Set ? T : never;
+const GIT_COMMANDS = new Set([
+ "rev_parse", "symbolic_ref", "merge_base", "merge_tree", "commit_tree", "update_ref", "log",
+] as const);
+export type WorkspaceRestoreGitCommand = typeof GIT_COMMANDS extends Set ? T : never;
+const GIT_FAILURE_KINDS = new Set([
+ "merge_conflict", "invalid_object", "ref_conflict", "permission_denied", "unknown",
+] as const);
+type GitFailureKind = typeof GIT_FAILURE_KINDS extends Set ? T : never;
+export interface WorkspaceRestoreDiagnostic {
+ phase: RestorePhase;
+ step?: WorkspaceRestoreStep;
+ errorCode: string;
+ httpStatus?: number;
+ exitCode?: number;
+ gitCommand?: WorkspaceRestoreGitCommand;
+ gitFailureKind?: GitFailureKind;
+}
const ERROR_CODES = new Set([
"ENOENT", "EACCES", "EPERM", "ENOSPC", "EIO", "EXDEV", "ENOTDIR", "EISDIR",
"ECONNRESET", "ECONNREFUSED", "ETIMEDOUT", "EPIPE", "ENOTFOUND", "EAI_AGAIN",
"ABORT_ERR", "UND_ERR_CONNECT_TIMEOUT", "UND_ERR_SOCKET",
]);
-const activeDiagnostic = new AsyncLocalStorage();
+type ErrorDiagnostic = Pick;
+interface DiagnosticScope {
+ active: boolean;
+ sequence: number;
+ failures: Map;
+}
+const activeDiagnostic = new AsyncLocalStorage();
+// Never attach a raw cause to an error just to retain a numeric Git exit code.
+const wrappedDiagnostics = new WeakMap