fix: retarget only managed asset framing during cold startup

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-10 12:45:14 -05:00
1 parent 44ee24fa19
commit daa711a097
2 files changed
+7 -7

No files matched your search

@@ -648,9 +648,11 @@ it.each([false, true])("preserves ACPX asset framing across cold, warm, and post
const cold = assignedRuntimeContext("/boat/skills", "/boat/context/cold");
const resumed = assignedRuntimeContext("/boat/skills", "/boat/context/resumed");
const custom = "Managed instructions with literal /controller/bundle example.";
const original = composeNativeSystemInstructions(cold, custom);
const coldText = runnerdRecoveryInternals.withComputerProcessInstructions(
original, guidance, cold,
const original = composeNativeSystemInstructions(source, custom);
const coldText = runnerdRecoveryInternals.retargetComposedInstructions(
runnerdRecoveryInternals.withComputerProcessInstructions(original, guidance, source),
source,
cold,
);
const suffix = (context: NativeRuntimeContextSnapshot) =>
composeNativeSystemInstructions(context, "").slice(context.prompt.text.length);
@@ -4861,10 +4861,7 @@ class DurablePrpCodexTransport implements CodexAppServerTransport {
), Boolean(this.options.persistentAgentHome), sourceRuntimeContext);
const baseInstructions =
sourceRuntimeContext && runtimeContext
? unboundBaseInstructions.replaceAll(
sourceRuntimeContext.instructions.bundle.rootPath,
runtimeContext.instructions.bundle.rootPath,
)
? retargetComposedInstructions(unboundBaseInstructions, sourceRuntimeContext, runtimeContext)
: unboundBaseInstructions;
const acpxProfile =
provider === "acpx"
@@ -7114,6 +7111,7 @@ export const runnerdLaunchProfileInternals = Object.freeze({
export const runnerdRecoveryInternals = Object.freeze({
withComputerProcessInstructions,
retargetComposedInstructions,
completedMaintenanceTerminalReceipt,
completedMaintenanceTerminalReplayMatches,
readControlPlaneState,