@parcha/agentrun-harness-codex 0.1.0-beta.74 → 0.1.0-beta.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/code-mode.d.ts +2 -1
- package/dist/code-mode.js +2 -1
- package/dist/scripts.js +14 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## 0.1.0-beta.75 (2026-11-30)
|
|
6
|
+
|
|
7
|
+
- On Codex, a call a person denied is no longer made again. When an `exec` waited for a person's approval, the model was told afterwards that its script "was cut short (the session stopped)". It read the denial as a crash to retry past, and asked the person the same question until they cancelled. The output now says the script stopped at a call that waited for approval. When the call was refused, because the person declined it or because the tool was set to deny while the call waited, the output adds that the refusal is an answer: the model should finish without the call or say what it needed it for. <!-- changes/codex-declined-call-not-retried.md -->
|
|
8
|
+
|
|
5
9
|
## 0.1.0-beta.70 (2026-11-29)
|
|
6
10
|
|
|
7
11
|
- A run whose model provider takes a request and then sends nothing now ends failed, in words that name the stall, rather than staying working. Before, the session's model proxy waited on the transport. Node's fetch cut such a request after 5 minutes as "terminated", and every harness asked again. pi wrote a "Model request failed: terminated" row each time and retried up to 8 times. Codex retried with no row at all. claude-agent and goose each waited out two silent requests and then parked on a spend-cap refusal ("Waiting for you to raise the cap"), never naming the stall. pi's and Codex's runs showed working until they were cancelled. <!-- changes/model-stall-bound.md -->
|
package/dist/code-mode.d.ts
CHANGED
|
@@ -47,7 +47,8 @@ export interface CodeModeDeps {
|
|
|
47
47
|
/** A call through the bridge (gate, intent, call, result): a resumed nested call that never reached its intent (recoverItems). */
|
|
48
48
|
call?(name: string, args: unknown, callId: string): Promise<{
|
|
49
49
|
text: string;
|
|
50
|
-
isError: boolean;
|
|
50
|
+
isError: boolean; /** The gate refused it: it never ran. */
|
|
51
|
+
refused?: true;
|
|
51
52
|
}>;
|
|
52
53
|
};
|
|
53
54
|
log(message: string, fields?: Record<string, unknown>): void;
|
package/dist/code-mode.js
CHANGED
|
@@ -337,7 +337,8 @@ export function codeMode(deps) {
|
|
|
337
337
|
await journal.flush();
|
|
338
338
|
}
|
|
339
339
|
const result = await deps.bridge.call(tie.tool, tie.args ?? {}, tie.callId);
|
|
340
|
-
|
|
340
|
+
// Whether it ran is the gate's answer, not its record: a tool that `nests` (a learned workflow) leaves no effect of its own.
|
|
341
|
+
resumed.set(tie.callId, { text: result.text, isError: result.isError, ran: !result.refused });
|
|
341
342
|
if (yielded)
|
|
342
343
|
yieldedTies.push(tie);
|
|
343
344
|
}
|
package/dist/scripts.js
CHANGED
|
@@ -280,20 +280,29 @@ export function waitResumedText(cell, resumed, budget) {
|
|
|
280
280
|
/** waitResumedText, and the calls whose outcome it tells. */
|
|
281
281
|
export function waitResumed(cell, resumed, budget) {
|
|
282
282
|
const told = resumed.map((fact, i) => describeCall(fact, `${i + 1}. ${fact.tool}`, budget));
|
|
283
|
-
return fitted(told, (cap) => `${waitCutOpener(cell)}${told.map((t) => lineOf(t, cap)).join("\n")}\nNothing else of the script was run again. Check the actual state before relying on it
|
|
283
|
+
return fitted(told, (cap) => `${waitCutOpener(cell)}${told.map((t) => lineOf(t, cap)).join("\n")}\nNothing else of the script was run again. Check the actual state before relying on it.${declinedTail(resumed)}`, budget);
|
|
284
284
|
}
|
|
285
|
+
/** What follows the outcomes when a person declined one of the calls: their answer, not a failure to work around. Without
|
|
286
|
+
* it, a model told its script was cut off read the refusal as the stop's and made the same call again, asking the person
|
|
287
|
+
* the same question until they cancelled. */
|
|
288
|
+
const DECLINED_TAIL = "\nA refused call (a person declined it, or a setting on this server denies it) is an answer, not a failure: don't make it again. Finish without it, or say what you needed it for.";
|
|
289
|
+
const declinedTail = (facts) => (facts.some((fact) => fact.resumed && !fact.resumed.ran) ? DECLINED_TAIL : "");
|
|
285
290
|
/** The words a resumed `wait`'s output opens with (waitResumed): the model is told its cell's script went with the session. */
|
|
286
291
|
const waitCutOpener = (cell) => `The session stopped while waiting on cell ${cell}; that cell's script was cut off. Its calls that waited for a person's approval were answered since, each once:\n`;
|
|
287
292
|
/** The words a cut-off `exec`'s output opens with when it lists its own calls (execRecovery). */
|
|
288
293
|
const EXEC_CUT_OPENER = "The exec was cut short after these calls (the session stopped), and nothing was run again. Their outcomes, in order:\n";
|
|
294
|
+
/** The words a recovered `exec`'s output opens with when the session stopped for a person's approval of one of its calls
|
|
295
|
+
* (a call of it was resumed): the stop was the wait for their answer, never a crash to retry past. */
|
|
296
|
+
const EXEC_ANSWERED_OPENER = "The exec stopped at a call that waited for a person's approval, and its script did not go on after their answer; nothing was run again. Its calls' outcomes, in order:\n";
|
|
289
297
|
/** What the host's row of an `exec` a recovery answered shows: the model is told its script was cut short, but on the record
|
|
290
298
|
* those words belong to an exec that failed (recoveredFailed). One that ended ok shows its calls' outcomes alone. */
|
|
291
299
|
export function recoveredRowText(output, failed) {
|
|
292
300
|
if (failed)
|
|
293
301
|
return output;
|
|
294
302
|
const cell = /^The session stopped while waiting on cell (\S+);/.exec(output)?.[1];
|
|
295
|
-
const
|
|
296
|
-
|
|
303
|
+
const openers = cell === undefined ? [EXEC_ANSWERED_OPENER, EXEC_CUT_OPENER] : [waitCutOpener(cell)];
|
|
304
|
+
const opener = openers.find((o) => output.startsWith(o));
|
|
305
|
+
return opener ? output.slice(opener.length) : output;
|
|
297
306
|
}
|
|
298
307
|
/** Whether a cut-off `exec` answered with its recovered output (execRecovery) failed, by the rule a codemode script stopped
|
|
299
308
|
* and run again follows on every other harness (serve's runner/meta-tools.ts endedWith): it failed when its last call did
|
|
@@ -322,8 +331,8 @@ export function execRecovery(facts, loose = [], budget) {
|
|
|
322
331
|
? `\n${others.length} ${others.length === 1 ? "call" : "calls"} ran whose script could not be told (an answer of the model's could not be read to its end):\n${others.map((t) => lineOf(t, cap)).join("\n")}`
|
|
323
332
|
: "";
|
|
324
333
|
if (own.length === 0)
|
|
325
|
-
return `The exec was cut short, and no call of its own was recorded; the calls below ran, though which script made them could not be told, so do not run it again to find out.${apart}`;
|
|
326
|
-
return `${EXEC_CUT_OPENER}${own.map((t) => lineOf(t, cap)).join("\n")}${apart}`;
|
|
334
|
+
return `The exec was cut short, and no call of its own was recorded; the calls below ran, though which script made them could not be told, so do not run it again to find out.${apart}${declinedTail(loose)}`;
|
|
335
|
+
return `${facts.some((fact) => fact.resumed) ? EXEC_ANSWERED_OPENER : EXEC_CUT_OPENER}${own.map((t) => lineOf(t, cap)).join("\n")}${apart}${declinedTail([...facts, ...loose])}`;
|
|
327
336
|
}, budget);
|
|
328
337
|
}
|
|
329
338
|
/** The text of a tool's recorded output (a string, or `{ text }` with images). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcha/agentrun-harness-codex",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.75",
|
|
4
4
|
"description": "Codex as an AgentRun harness: a tool-less Codex app-server behind a loopback model proxy, durable in AgentRun's own store, with the host's tools as its only tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentrun",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"test": "node --test --test-concurrency=8 'test/*.test.mjs'"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@parcha/agentrun-kernel": "0.1.0-beta.
|
|
47
|
+
"@parcha/agentrun-kernel": "0.1.0-beta.75"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@openai/codex": "0.164.0"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@openai/codex": "0.164.0",
|
|
59
|
-
"@parcha/agentrun-dsl": "0.1.0-beta.
|
|
59
|
+
"@parcha/agentrun-dsl": "0.1.0-beta.75"
|
|
60
60
|
},
|
|
61
61
|
"repository": {
|
|
62
62
|
"type": "git",
|