Skip to content

afk-pipeline: sandcastle session capture broken on vercel lane (all engines) and codex cloud lane — run-with-retry recovery latently dead there #74

Description

@JorgeMenaDev

Note

Triage status 2026-07-12 (verified vs origin/main, afk-pipeline v2.13.1)
Bug 2 (codex cloud path mismatch): FIXED by 227d127 ("isolate cloud agent phases", 2026-07-11) — runtime.ts sets CODEX_DOCKER_HOST_HOME to the cloud home under hosted docker, matching sessionStorage.hostSessionsDir.
Bug 1 (vercel lane, all engines): STILL LIVEvercel/provider.ts implements no session capture-to-host; run-with-retry.ts still throws on the resume path, so the first StructuredOutputError on the sandbox lane kills the run instead of recovering. The v2.13.0 retry loop deliberately never resumes sessions (spec lists this issue as independent triage). Remaining: implement capture in the vercel provider or document the lane limitation in SKILL.md and degrade honestly.

Found by the two-vendor counsel on the retry-loop wayfinder (session-identity round, 2026-07-11); verified against @ai-hero/sandcastle 0.12.0 dist by the Anthropic seat and corroborated by the OpenAI seat. Record: counsel-session-identity/ in JorgeMenaDev/matias. Independent of the retry-loop map — this affects run-with-retry.ts's structured-output recovery today.

Bug 1 — vercel lane: session capture silently skipped, so runWithRetry resume throws. The isolated provider leaves bindMountHandle undefined, so sandcastle's capture-to-host and resume-transfer paths are both silently skipped for all engines on agent:implement-sandbox. First structured-output failure on that lane → the resume precheck finds no host session file and the retry path dies instead of recovering. (Anthropic seat, sandcastle dist index.js capture/resume paths.)

Bug 2 — codex on the cloud lane: session storage path mismatch. templates/sandcastle/runtime.ts pins sessionStorage.hostSessionsDir: ~/.codex-afk/sessions unconditionally, but the cloud lane sets CODEX_HOME=$RUNNER_TEMP/codex-home — sessions land where the resume precheck never looks, same failure mode as Bug 1 on engine: codex hosted runs.

Impact today is bounded (the retry only fires on StructuredOutputError, and verify usually emits clean), which is why this has not burned a run yet — but both cells turn a recoverable extraction miss into a dead run. Bug 2 is fixable in runtime.ts (lane-aware hostSessionsDir); Bug 1 likely needs an upstream sandcastle fix (isolated-provider capture hook) or a documented lane limitation in the skill.

Fix does NOT belong to the retry-loop map (plan-only; and the locked re-entry rule is fresh-session, which does not depend on resume) — triage separately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions