fix(omo-senpi): recover the session cwd and goal store when PI_SESSION_CWD is missing (refs #8332)
After an extension reload restarted the eval kernel, PI_SESSION_ID survived
but PI_SESSION_CWD did not, and every agentToolkit call died with
ULW_LOOP_CWD_REQUIRED and no way out. The binder now resolves the cwd in
order: PI_SESSION_CWD, the cwd recorded in the PI_SESSION_FILE header
(exact), then process.cwd(); each fallback adds one warning naming the
remediation env("PI_SESSION_CWD", "<session cwd>"). The same reload drops
PI_GOAL_STORE_FILE, so the goal store is also derived from
dirname(PI_SESSION_FILE)/extensions/goal/<id>.json before the cwd fallback,
which is what keeps the live driver goal visible (and the create_goal
advice quiet) after a restart.
Binding warnings ride failure envelopes too (ToolkitFailure.warnings), and
status() exposes result.binding { cwd, cwdSource, sessionId, goalStorePaths }
plus a read-only result.driver { available, status, objectiveMatchesPlan,
objectiveAcknowledged } so a restarted kernel can see what it bound to. The
skill's compaction step tells the agent to check and re-pin it. Y
YeonGyu-Kim committed
a70ebbf0c4ae2e849bbedc3be4740ed42039c5e6
Parent: 43772b2