@parcha/agentrun-harness-codex 0.1.0-beta.69 → 0.1.0-beta.70
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 +10 -0
- package/dist/adapter.js +2 -0
- package/dist/host/machine.d.ts +2 -0
- package/dist/host/machine.js +3 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## 0.1.0-beta.70 (2026-11-29)
|
|
6
|
+
|
|
7
|
+
- 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 -->
|
|
8
|
+
|
|
9
|
+
The proxy now stops a forwarded request that goes `stallMs` with nothing from the provider, before its headers or between two pieces of its answer. The default is `MODEL_STALL_MS`, 240 s. Time spent waiting on a slow client is not counted. A host route that holds back part of what its provider sends tells the proxy so through `heard` on the request's init (`ProviderHeard`), and the bound starts again. serve's translated routes do this for a thinking block they send whole, a text-tools reply they read whole, and an answer asked whole, so a model that thinks for longer than the bound is not stopped. The client is told "the model sent nothing for 240 s, so the request was stopped" (code `model_stalled`). Before the answer began, that comes at the refused status. After, it comes as the stream's last `error` event, its own event even when the stall left the client inside one. A client does not retry on these words. The request is booked once, at an unknown cost. A host with `onFinal` (claude-agent, goose, opencode and codex) ends the turn in those words, and the turn's next answer request is refused until the host opens its next turn. pi ends the turn because it does not retry those words. The run's timeline shows "Model request failed: the model sent nothing for 240 s, so the request was stopped".
|
|
10
|
+
|
|
11
|
+
A model on the host's own machine (an Ollama model) can say nothing for minutes while it loads or reads a long prompt. On such a model, the proxies of pi, Codex and claude-agent wait as long as those CLIs already do: `LOCAL_MODEL_STALL_MS`, 30 minutes. So do the proxies of a local model tier (a subagent's or a learned workflow's), of a workflow's model nodes, and of an SDK ask. For Codex and claude-agent, the adapter's `streamIdleMs` is also the proxy's bound. serve now sends a local model's requests, and pi's own requests to its proxy, without Node's 5-minute cut (a local model's through the environment's proxy as the rest of the process uses it, with this machine's loopback and `no_proxy`'s hosts direct), so the proxy's bound is the one that ends a silent local model on pi and Codex. Before, that cut came first, and pi retried a slow local model's turn as "terminated" every 5 minutes. The Claude CLI's own client still drops a request that sends nothing for 5 minutes and asks again, so claude-agent on a silent local model retries rather than reaching the 30 minutes. goose and opencode keep the proxy's 240 s on a local model.
|
|
12
|
+
|
|
13
|
+
`MODEL_STALL_MS`, `LOCAL_MODEL_STALL_MS`, `MODEL_STALLED`, `stalledWords` and the `ProviderHeard` type are exported from `@parcha/agentrun-kernel/host`. `ModelProxyOptions.stallMs`, pi's `PiAdapterOptions.stallMs`, and the Codex and claude-agent machines' `proxy.stallMs` set the bound.
|
|
14
|
+
|
|
5
15
|
## 0.1.0-beta.69 (2026-11-28)
|
|
6
16
|
|
|
7
17
|
- Codex on a model on the host's own machine (an Ollama model) waits out a silent stream for 30 minutes, as claude-agent's CLI already does. A slow machine that took more than five minutes to load the model or read a long prompt used to end the turn with "stream disconnected before completion: idle timeout waiting for SSE". The Codex adapter takes `streamIdleMs` (Codex's `stream_idle_timeout_ms` on its provider) and exports `LOCAL_STREAM_IDLE_MS`; serve sets it for an Ollama model, in process and on a runner. Any other route keeps Codex's own five minutes. <!-- changes/codex-local-stream-idle.md -->
|
package/dist/adapter.js
CHANGED
|
@@ -221,6 +221,8 @@ export function codexAdapter(options) {
|
|
|
221
221
|
...(options.provider.plan ? { plan: true } : {}),
|
|
222
222
|
...(options.provider.refused ? { credentialRefused: options.provider.refused } : {}),
|
|
223
223
|
...(options.fetch ? { fetch: options.fetch } : {}),
|
|
224
|
+
// The proxy waits on a silent model as long as Codex does on one (a model on the host's own machine).
|
|
225
|
+
...(options.streamIdleMs !== undefined ? { stallMs: options.streamIdleMs } : {}),
|
|
224
226
|
},
|
|
225
227
|
}),
|
|
226
228
|
},
|
package/dist/host/machine.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export interface LocalMachineOptions {
|
|
|
41
41
|
credentialRefused?: ModelProxyOptions["credentialRefused"];
|
|
42
42
|
log?: ModelProxyOptions["log"];
|
|
43
43
|
fetch?: typeof fetch;
|
|
44
|
+
/** How long the provider may send nothing on a request before the proxy stops it (ModelProxyOptions.stallMs). */
|
|
45
|
+
stallMs?: number;
|
|
44
46
|
};
|
|
45
47
|
/** For tests: the process environment the allowlist reads. Default `process.env`. */
|
|
46
48
|
env?: Readonly<Record<string, string | undefined>>;
|
package/dist/host/machine.js
CHANGED
|
@@ -244,9 +244,11 @@ export function localMachine(options) {
|
|
|
244
244
|
...(price ? { price } : {}),
|
|
245
245
|
...(options.proxy.log ? { log: options.proxy.log } : {}),
|
|
246
246
|
...(options.proxy.fetch ? { fetch: options.proxy.fetch } : {}),
|
|
247
|
+
...(options.proxy.stallMs !== undefined ? { stallMs: options.proxy.stallMs } : {}),
|
|
247
248
|
// The provider stopped the turn's answer on its content filter: no retry of it can pass, so the turn ends at once.
|
|
248
249
|
onFiltered: (message) => ctx.halt?.(new Error(message)),
|
|
249
|
-
// The provider's error answer ends the run (a ChatGPT plan's limit reached)
|
|
250
|
+
// The provider's error answer ends the run (a ChatGPT plan's limit reached), or the proxy stopped a request the
|
|
251
|
+
// provider sent nothing on for its stall bound: no retry or other key can pass it.
|
|
250
252
|
onFinal: (message) => ctx.halt?.(new Error(message)),
|
|
251
253
|
// The provider cut the turn's answer at its output limit: Codex would ask for it again (it retries an incomplete
|
|
252
254
|
// stream), so the harness ends the turn there, its answer cut.
|
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.70",
|
|
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.70"
|
|
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.70"
|
|
60
60
|
},
|
|
61
61
|
"repository": {
|
|
62
62
|
"type": "git",
|