Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2e4de30
docs(pylon): record post-v0.9.4 upstream triage and dispositions
rynfar Sep 22, 2026
19e3940
[RSI, bug] fix(coding-agent): absorb kernel child stderr stream error…
sethkarten Sep 17, 2026
8d2dcaa
[RSI, bug] fix(kernel): bound REPL protocol frame sizes in kernel and…
sethkarten Sep 21, 2026
cd7b577
[RSI, security] fix(kernel): keep the kernel stderr log owner-only (#…
sethkarten Sep 17, 2026
d990a30
fix(coding-agent): bound heartbeat view catalog fetch with a 10s dead…
sethkarten Sep 15, 2026
f13eb23
[RSI, bug] fix(daemon): answer heartbeats_list from live state withou…
sethkarten Sep 17, 2026
2cd9521
[RSI, bug] fix(daemon): let session opens wait through an update rest…
sethkarten Sep 17, 2026
406b467
[RSI, bug] Hold spawn name reservations until admission is durable (#…
sethkarten Sep 17, 2026
cf2e779
[RSI, bug] Fix stale async-bash completion notice race at the turn bo…
rynfar Sep 22, 2026
2035cea
[RSI, bug] fix(coding-agent): re-park pending next-turn messages when…
rynfar Sep 22, 2026
5311c2d
[RSI, bug] compaction: keep tool identity in serialized summarizer in…
sethkarten Sep 17, 2026
cd0f467
[RSI, bug] compaction: anchor summaries to kept-tail state and stop r…
sethkarten Sep 21, 2026
600bd30
fix(harness): validate refinement writes and skip malformed entries i…
sethkarten Sep 21, 2026
cfe95e5
[RSI, bug] fix(ai): recover stale Codex chains after metadata (#2374)
sethkarten Sep 21, 2026
3680573
fix(ai): stop sending enable_thinking to Prime Inference GLM models (…
rasdani Sep 19, 2026
c6d7f39
[RSI, performance] Cache the branch array on the per-turn hot path (#…
sethkarten Sep 21, 2026
52c4c0d
[RSI, performance] count tool-result message entries from their seria…
sethkarten Sep 21, 2026
d1cbac4
[RSI, performance] Append catalog metadata without full transcript pa…
sethkarten Sep 21, 2026
7b7520e
[RSI, performance] perf(daemon): mtime-guard the cron jobs catalog re…
sethkarten Sep 19, 2026
37274a0
perf(coding-agent): skip roster re-composition for unchanged sessions…
sethkarten Sep 19, 2026
f355141
[RSI, performance] perf(kernel): defer the event-loop import stack pa…
sethkarten Sep 17, 2026
b56ea96
[RSI, performance] perf(kernel): skip pip seeding when creating the k…
sethkarten Sep 17, 2026
60cfa7b
[RSI, performance] Land the kernel skill-sync marker so killed sessio…
sethkarten Sep 17, 2026
05ee4fc
fix(daemon): update DAEMON_SCHEMA_ID for update_restarting wire variant
rynfar Sep 22, 2026
9a96243
test(compaction): update compaction-serialization expectations for to…
rynfar Sep 22, 2026
6195f70
test(ai): align GLM thinking format expectations with #2459
rynfar Sep 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
189 changes: 189 additions & 0 deletions .pylon/features.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -527,3 +527,192 @@ decisions:
upstream_support: Current upstream allocates a second timestamp when persisting custom messages, so reloading or compacting changes live transcript identities. Preserve the original message timestamp at every AgentSession persistence boundary.
revisit_when:
- Upstream preserves exact custom-message identities across live emission, persistence and reconstruction.

kernel-stderr-stream-errors:
area: kernel
state: candidate
owner: upstream
decision: adopt
pylon_refs:
- https://github.com/pylon-code/prime-agent/issues/1
- https://github.com/pylon-code/pylon/issues/114
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2383
fork_change: absorb-kernel-child-stderr-stream-errors
upstream_support: Absorb child stderr stream errors to prevent worker crashes on broken pipe or process death without altering process ownership.
revisit_when:
- Upstream redesigns kernel stdio streams.

repl-bounded-frames:
area: kernel
state: candidate
owner: upstream
decision: adopt
pylon_refs:
- https://github.com/pylon-code/prime-agent/issues/1
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2423
fork_change: bound-repl-protocol-frame-sizes
upstream_support: Bound REPL message sizes to prevent memory exhaustion and protocol desync.
revisit_when:
- Kernel REPL migrates to chunked framing.

owner-only-kernel-stderr-log:
area: kernel-security
state: candidate
owner: upstream
decision: adopt
pylon_refs:
- https://github.com/pylon-code/prime-agent/issues/1
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2425
fork_change: owner-only-kernel-stderr-log-permissions
upstream_support: Set mode 0o600 on kernel stderr log files.
revisit_when:
- Kernel logging subsystem is replaced.

heartbeats-list-bounded-live-state:
area: daemon-health
state: candidate
owner: upstream
decision: adopt
pylon_refs:
- https://github.com/pylon-code/prime-agent/issues/1
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2378
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2342
fork_change: heartbeats-list-from-live-state-with-deadline
upstream_support: Read active heartbeats from in-memory state with 10s deadline without queueing behind busy worker turns; must not fabricate liveness for quarantined sessions.
revisit_when:
- Heartbeat storage moves out-of-process.

session-open-restart-wait:
area: daemon-lifecycle
state: candidate
owner: upstream
decision: adopt
pylon_refs:
- https://github.com/pylon-code/prime-agent/issues/1
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2391
fork_change: session-open-wait-during-daemon-restart
upstream_support: Let session opens wait through daemon update restart instead of failing immediately; re-verifies daemon hello and supervisor generation on connect.
revisit_when:
- Daemon lifecycle management changes.

spawn-name-reservation-admission:
area: session-lifecycle
state: candidate
owner: upstream
decision: adopt
pylon_refs:
- https://github.com/pylon-code/prime-agent/issues/1
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2396
fork_change: hold-spawn-name-reservations-until-admission
upstream_support: Hold spawn name reservations until admission is durable, respecting caller-owned admission proofs and reconnect handles.
revisit_when:
- Session admission protocol is redesigned.

async-bash-notice-turn-boundary:
area: runtime-reliability
state: candidate
owner: shared
decision: hybridize
pylon_refs:
- https://github.com/pylon-code/prime-agent/issues/64
- https://github.com/pylon-code/prime-agent/issues/1
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2372
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2386
fork_change: async-bash-notice-re-parking-with-handle-withdrawal
upstream_support: Hybridize turn-boundary notice fixes with fork #72 per-handle withdrawal and single terminal settlement.
revisit_when:
- Upstream introduces handle-bound async command receipts.

compaction-tool-identity-and-anchoring:
area: context-compaction
state: candidate
owner: upstream
decision: adopt
pylon_refs:
- https://github.com/pylon-code/prime-agent/issues/1
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2424
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2385
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2463
fork_change: compaction-tool-identity-anchoring-and-validation
upstream_support: Preserve tool identity in summarizer input, anchor summaries to kept tail, validate refinement writes, and preserve custom message timestamps without altering cursor order.
revisit_when:
- Compaction architecture or prompt format changes.

codex-stale-chain-recovery:
area: provider-codex
state: candidate
owner: upstream
decision: adopt
pylon_refs:
- https://github.com/pylon-code/prime-agent/issues/1
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2374
fork_change: codex-stale-chain-recovery-after-metadata
upstream_support: Recover stale Codex chains after metadata while preserving connection binding.
revisit_when:
- Codex completion API changes.

prime-inference-glm-no-thinking:
area: provider-glm
state: candidate
owner: upstream
decision: adopt
pylon_refs:
- https://github.com/pylon-code/prime-agent/issues/1
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2459
fork_change: prime-inference-glm-disable-thinking
upstream_support: Stop sending enable_thinking to Prime Inference GLM models.
revisit_when:
- GLM adds reasoning support.

abort-and-send-queued:
area: session-input
state: candidate
owner: shared
decision: hybridize
pylon_refs:
- https://github.com/pylon-code/pylon/issues/114
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2426
fork_change: capability-gated-abort-and-send-queued-schema34
upstream_support: Renumber schema revision above fork 33 to 34 and gate behind abort_and_send_queued_v1 capability.
revisit_when:
- Upstream negotiates queued aborts via capability.

quota-park-and-auto-resume:
area: provider-quota
state: deferred
owner: shared
decision: redesign
pylon_refs:
- https://github.com/pylon-code/pylon/issues/114
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2375
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2280
fork_change: none
upstream_support: Quota waiting and auto-resume daemon behavior. Pending maintainer decision.
revisit_when:
- Maintainer guides quota park and auto-resume projection.

mcp-service-catalog-oauth:
area: mcp-ownership
state: deferred
owner: shared
decision: retain
pylon_refs:
- https://github.com/pylon-code/pylon/issues/114
upstream_refs:
- https://github.com/PrimeIntellect-ai/prime-agent/pull/2330
fork_change: none
upstream_support: Daemon MCP service catalog and OAuth engine. Retaining Pylon MCP ownership pending maintainer decision.
revisit_when:
- Maintainer guidance on MCP service catalog.
38 changes: 38 additions & 0 deletions .pylon/upstream-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,41 @@ The SDK token gates the new local API; daemon wire shapes and stock behavior do
not change. Validation: focused malformed/private/path/registration cases and a real
isolated supervisor/owned-worker test prove registered before cleanup and settled
after exact owned cleanup and supervisor exit. Pylon delivery tracked in [pylon#557](https://github.com/pylon-code/pylon/issues/557).

## 2026-09-22 — post-v0.9.4 upstream review (cfb2d3fe3..18a56bf35 and open Sept 14 triage)

- Review range: upstream commits `cfb2d3fe35c7c23cf6678ec235412b0d3f286fae..18a56bf3557063c0cd0be12f99f0bcce2a46da32` (72 commits, including release v0.9.5 `a7d791bc1`) plus open Sept 14 triage items.
- Merge-base and complete integration checkpoint remain frozen at v0.9.4 `1eee2938b4eeb7a4d72e17035adda669a89b63de`. Selective adoption does not advance the full integration checkpoint.
- Fork product base: `72899e4e4fdaef52cfffca58152f769a6aef91b1`. Tracking: #1 and Pylon #114.

### Dispositions and Revisit Triggers

| PR / Commit | Subject / Area | Disposition | Notes & Revisit Triggers |
| --- | --- | --- | --- |
| #2383 (`b6b94c78a`) | Kernel child stderr stream error absorption | **Adopt** | Prevents worker crashes on unhandled child stderr errors (EPIPE). Does not touch process ownership, isolation, or cleanup receipts. Revisit if upstream redesigns kernel stdio streams. |
| #2423 (`c91e6e991`) | Bound REPL protocol frame sizes in kernel and host | **Adopt** | Guards against memory exhaustion and protocol desync by bounding message frames. Revisit if kernel REPL switches to streaming chunked wire format. |
| #2425 (`b6d955a9b`) | Keep kernel stderr log owner-only (mode 0o600) | **Adopt** | Security fix ensuring private process logs are not world-readable. Revisit if kernel logging subsystem is replaced. |
| #2378 (`3dfb0276b`) + #2342 (`ad426c672`) | Heartbeats list from live state with 10s deadline | **Adopt** | Reads active heartbeats from in-memory state without blocking behind serialized session worker queues. Must not fabricate liveness for terminating or quarantined sessions. Revisit if heartbeat storage moves out-of-process. |
| #2391 (`54da82e97`) | Session opens wait through daemon update restart | **Adopt** | Retries and waits for restart completion instead of immediately throwing connection errors. Wait must re-verify daemon hello, schema revision, and supervisor generation upon reconnect to prevent attaching across unauthorized generation boundaries. Revisit if daemon process manager lifecycle changes. |
| #2396 (`126fe7010`) | Hold spawn name reservations until admission is durable | **Adopt** | Prevents concurrent duplicate session creation collision in the registry. Must respect caller-owned admission proofs and not reject reconnects or recovery handles under the same session ID. Revisit if session creation protocol is redesigned. |
| #2372 (`66df06fc1`) + #2386 (`b3e04b58b`) | Async-bash completion notices and re-parking | **Hybridize** | Overlaps fork #72 (acknowledged per-handle background notice withdrawal). Preserves fork #72 random handle identities, host-acknowledged withdrawal, and single terminal turn settlement. Revisit if upstream introduces handle-bound async receipts. |
| #2424 (`5fb3d9acb`) | Compaction: keep tool identity in serialized summarizer input | **Adopt** | Retains tool name and call parameters in summarizer prompt. Preserves custom message timestamps (#76) and does not alter event cursor ordering. Revisit if compaction serialization schema changes. |
| #2385 (`27f32ddb7`) | Compaction: anchor summaries to kept-tail state and stop re-summarizing file lists | **Adopt** | Fixes repeated file listings and anchors summaries to recent state. Does not alter transcript disk format or break replay verification. Revisit if compaction prompt architecture is modified. |
| #2463 (`41e4e0e18`) | Validate refinement writes and skip malformed entries in digest | **Adopt** | Bounds digest errors on corrupted refinement records. Logs malformed entries without corrupting the digest hash or causing divergence between replicas. Revisit if digest format evolves. |
| #2374 (`e683fcb53`) | AI: recover stale Codex chains after metadata | **Adopt** | Follow-up to adopted #2314. Retains producing connection binding and one-shot retry before output. Revisit if Codex completion API changes. |
| #2459 (`63d88319b`) | AI: stop sending enable_thinking to Prime Inference GLM models | **Adopt** | Fixes provider rejection for GLM models. Revisit if Prime Inference GLM adds reasoning support. |
| Perf: #2414, #2416, #2433, #2389, #2393, #2399, #2379, #2387, #2405 | In-memory caching, frame decoding, kernel startup perf | **Adopt** | Pure performance improvements that do not mutate snapshot/catalog ownership boundaries or wire protocols. #2433 must not alter catalog disk schema, serialized format, or bypass immutable snapshot boundaries. Revisit if underlying subsystems are overhauled. |
| Excluded: #2398, #2296, #2273, #2260, #2242, #2246, #2276 | On-demand catalog, transcript download cache, persistent SupervisorLink, orphan GC, session append | **Retain (Deferred)** | These touch snapshot/catalog/supervisor/ownership boundaries. Fork preserves immutable bounded snapshots, attachment generations, per-event recovery cursors, authenticated ownership, and cleanup receipts. Revisit in separate review with real-daemon and managed-artifact integration gates. |
| #2426 (`e2fb7bfa1`) | Send queued messages after interrupt (`abort_and_send_queued`) | **Hybridize / Redesign** | Daemon wire change: renumber schema above fork 33 to schema 34 and gate behind `abort_and_send_queued_v1` capability. Pylon negotiates capability and falls back to interrupt-then-send. Revisit when upstream capability-gates queued aborts. |
| #2282 (`ebe530d28`) | Child progress notes (`rlm_progress_note`) and child snapshots (`rlm.collect`) | **Redesign (Pylon issue)** | Stock 0.9.5 events are safely ignored in Pylon via `Ignored/unknown-event`. Pylon issue tracks Agents surface integration. Revisit when Agents UI exposes child progress. |
| #2453 (`3b1aa5ff3`) | Image-model routing | **Redesign (Pylon issue)** | Dynamic model switching impacts model identity, usage attribution, and pricing. Pylon issue tracks provider routing design. Revisit with multimodal routing architecture. |
| #2455 (`b09e37d84`) | ACP model and effort pickers | **Adopt (Pylon issue)** | Exposes model/effort options for ACP fallback. Pylon issue tracks UI pickers. Revisit during ACP settings review. |
| #2334 (`dca77ecfe`) + #2465 (`b08f08efa`) | Human message priority and continuation holds while bash runs | **Redesign (Pylon issue)** | Evaluated against Pylon queue projection and occurrence ownership. Pylon issue tracks queue prioritization semantics. Revisit with turn scheduling audit. |
| Stock 0.9.5 compiled binary without Node SDK | Runtime detection and fallback | **Retain (Pylon issue)** | Stock 0.9.5 installer defaults to Bun-compiled binary omitting Node SDK. Pylon issue tracks fallback to ACP with actionable error guidance. |
| #2375 (`2883a7843`) + #2280 | Quota park and auto-resume (`providerBackupModel`) | **Maintainer Decision** | Daemon parks quota-blocked sessions until reset and auto-resumes. Options: disable for Pylon-owned sessions, or project unsolicited resumed turns as first-class runtime state. Pending maintainer decision. |
| #2330 (`b6ac5d014`) | MCP service catalog and OAuth engine | **Maintainer Decision** | Overlaps Pylon-owned MCP server management. Retain Pylon MCP ownership pending maintainer confirmation. |
| Context/Refinement: #2217, #2226, #2220, #2394, #2400, #2450, #2392 | Context summarization and harness ranking | **Adopt / Hybridize** | Improves compaction accuracy and prompt-cache stability. #2226 already hybridized in fork #71. Revisit if context architecture changes. |
| Models/CLI: #2505, #2462, #2381, #2410, #2409, #2216, #2380, #2515, #2336 | Catalog updates, CLI diagnostics, test repairs | **Adopt** | Additive model options (Grok 4.7), diagnostics (`PI_REQUEST_TIMING`), flag validations, and test flakiness fixes. Revisit when affected providers change. |
| TUI / CLI UI / CI: #2446, #2447, #2430, #2466, #2340, #2331, #2328, #2324, #2325, #2301, #2302, #2306, #2449, #2376, #2456, #2323 | Terminal UI interactions, upstream CI/benchmarks, install docs | **Skip** | Prime-specific TUI screens, terminal commands, and upstream internal CI are not consumed by Pylon web/desktop/mobile clients. No daemon protocol or SDK impact. Revisit if features move to daemon protocol. |
| #2458 (`2e9ab77b8`) | Reconnect attached windows when daemon restarts | **Skip / Retain** | TUI client window reconnect is skipped because Pylon manages its own reconnection; supervisor update-restart phase closing reason is retained/deferred with supervisor lifecycle audit. |
| Distribution: #2366, #2370, #2369, #2368, #2361, #2344, #2319 | Native binaries, updater manifests, musl packages | **Retain** | Retain Pylon recipe 2 deterministic SDK archives per fork #75 decision. Revisit if upstream provides importable Node SDK in binary archives. |
1 change: 1 addition & 0 deletions packages/ai/.changes/fix-codex-chain-reset-metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed Codex stale-continuation recovery when WebSocket lifecycle or metadata events arrive before the provider error.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed Prime Inference GLM models failing every request with an unsupported `enable_thinking` parameter.
21 changes: 18 additions & 3 deletions packages/ai/scripts/generate-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ const ZAI_THINKING_COMPAT: OpenAICompletionsCompat = {
thinkingFormat: "zai",
};

// Prime Inference rejects `enable_thinking` on GLM routes with a 400 on every
// request. The routes think by default, so send no thinking parameter (and no
// reasoning_effort, whose support is unverified).
const PRIME_INFERENCE_ZAI_COMPAT: OpenAICompletionsCompat = {
supportsReasoningEffort: false,
};

const PRIME_INFERENCE_BASE_URL = "https://api.pinference.ai/api/v1";
const PRIME_INFERENCE_COMPAT: OpenAICompletionsCompat = {
supportsStore: false,
Expand Down Expand Up @@ -452,6 +459,10 @@ function isPrimeInferenceReasoningModel(modelId: string, catalogReasoning?: bool
);
}

function isPrimeInferenceZaiModelId(modelId: string): boolean {
return modelId.toLowerCase().startsWith("z-ai/glm-");
}

function getPrimeInferenceCompat(modelId: string): OpenAICompletionsCompat {
const id = modelId.toLowerCase();
if (id.includes("deepseek-v4")) {
Expand All @@ -460,10 +471,10 @@ function getPrimeInferenceCompat(modelId: string): OpenAICompletionsCompat {
...DEEPSEEK_V4_COMPAT,
};
}
if (id.startsWith("z-ai/glm-")) {
if (isPrimeInferenceZaiModelId(id)) {
return {
...PRIME_INFERENCE_COMPAT,
...ZAI_THINKING_COMPAT,
...PRIME_INFERENCE_ZAI_COMPAT,
};
}

Expand Down Expand Up @@ -610,7 +621,11 @@ function createPrimeInferenceModel(
...(openRouter?.supportsReasoningEffort === false
? {
supportsReasoningEffort: false,
...(!compat.thinkingFormat ? { thinkingFormat: "openrouter" as const } : {}),
// GLM routes must not receive any thinking parameter; the
// `reasoning` object is not verified against the gateway.
...(!compat.thinkingFormat && !isPrimeInferenceZaiModelId(entry.id)
? { thinkingFormat: "openrouter" as const }
: {}),
}
: {}),
},
Expand Down
Loading
Loading