@oneciel-ai/ciel-runtime 0.2.22 → 0.2.23
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 +108 -0
- package/README.md +150 -57
- package/ciel-runtime-stop.cmd +1 -0
- package/ciel-runtime.cmd +1 -0
- package/ciel-runtimectl.cmd +1 -0
- package/ciel_runtime.py +56 -53
- package/ciel_runtime_support/anthropic_tool_turns.py +81 -0
- package/ciel_runtime_support/architecture.py +17 -0
- package/ciel_runtime_support/channel_injection.py +113 -3
- package/ciel_runtime_support/channel_message_prompt.py +15 -0
- package/ciel_runtime_support/channel_pending_injection.py +28 -4
- package/ciel_runtime_support/channel_pending_poll.py +2 -0
- package/ciel_runtime_support/channel_terminal_context.py +6 -0
- package/ciel_runtime_support/channel_terminal_dispatch.py +2 -0
- package/ciel_runtime_support/channel_terminal_proxy.py +8 -2
- package/ciel_runtime_support/channel_wake_claim_repository.py +7 -0
- package/ciel_runtime_support/channel_wake_context.py +7 -3
- package/ciel_runtime_support/cli_parser.py +6 -0
- package/ciel_runtime_support/codex_backend_context.py +4 -0
- package/ciel_runtime_support/codex_turn_recovery.py +75 -12
- package/ciel_runtime_support/config_migrations.py +102 -10
- package/ciel_runtime_support/config_repository.py +9 -0
- package/ciel_runtime_support/event_settings_cli.py +284 -2
- package/ciel_runtime_support/openai_chat_passthrough.py +2 -0
- package/ciel_runtime_support/protocols/openai_responses.py +22 -18
- package/ciel_runtime_support/provider_adapters.py +7 -0
- package/ciel_runtime_support/provider_policy.py +10 -1
- package/ciel_runtime_support/provider_request_builder.py +9 -2
- package/ciel_runtime_support/provider_responses_passthrough.py +4 -0
- package/ciel_runtime_support/providers/__init__.py +2 -0
- package/ciel_runtime_support/providers/alibaba.py +33 -10
- package/ciel_runtime_support/providers/constants.py +1 -0
- package/ciel_runtime_support/providers/opencode.py +25 -5
- package/ciel_runtime_support/providers/opencode_go.py +3 -3
- package/ciel_runtime_support/providers/openrouter.py +76 -3
- package/ciel_runtime_support/providers/tabitoken.py +130 -0
- package/ciel_runtime_support/remote_instructions.py +20 -6
- package/ciel_runtime_support/remote_memory.py +515 -55
- package/ciel_runtime_support/responses_input_compatibility.py +14 -0
- package/ciel_runtime_support/router_http.py +5 -0
- package/ciel_runtime_support/runtime_constants.py +1 -1
- package/ciel_runtime_support/runtime_launch.py +9 -2
- package/ciel_runtime_support/runtime_paths.py +2 -0
- package/ciel_runtime_support/tool_side_effect_dedupe.py +7 -4
- package/ciel_runtime_support/transcript_delta_delivery.py +333 -0
- package/ciel_runtime_support/usage_events.py +45 -3
- package/ciel_runtime_support/usage_service.py +871 -0
- package/ciel_runtime_support/windows_conpty.py +108 -2
- package/ciel_runtime_support/workspace_mcp.py +4 -0
- package/docs/CLI-Reference.md +11 -0
- package/docs/Configuration.md +7 -2
- package/docs/MCP-Channels.md +7 -3
- package/docs/Module-Map.md +4 -0
- package/docs/Providers.md +32 -0
- package/docs/Remote-Memory.md +29 -10
- package/docs/Test-Suite.md +1 -0
- package/docs/journal/2026/08/20/kevin-wake-orphan-tool-repair.md +161 -0
- package/docs/journal/2026/08/20/nightly-push-local-deployment.md +59 -2
- package/docs/journal/2026/08/20/wing-remote-memory-replication-verification.md +107 -0
- package/docs/journal/2026/08/21/alibaba-singapore-qwen38-official-alignment.md +64 -0
- package/docs/journal/2026/08/21/codex-visible-sse-wake-submit-regression.md +85 -0
- package/docs/journal/2026/08/21/external-sse-wake-only-change-analysis.md +131 -0
- package/docs/journal/2026/08/21/hyundai-invalid-replayed-tool-name-repair.okf +88 -0
- package/docs/journal/2026/08/21/local-stale-temporary-runtime-pin-repair.okf +118 -0
- package/docs/journal/2026/08/21/transcript-compaction-external-events.okf +131 -0
- package/docs/journal/2026/08/21/wing-ai-net-mcp-boundary-diagnosis.okf +129 -0
- package/docs/journal/2026/08/21/wing-cold-start-wake-submit-repair.okf +161 -0
- package/docs/journal/2026/08/21/wing-powershell-memory-runaway.okf +101 -0
- package/docs/journal/2026/08/21/wing-repeated-reasoning-tool-turn-repair.okf +112 -0
- package/docs/journal/2026/08/21/wing-repeated-tool-guard-finalization.okf +81 -0
- package/docs/journal/2026/08/21/wing-working-directory-memory-deployment.md +110 -0
- package/docs/journal/2026/08/21/wing-workspace-state-memory-prompt-injection.md +88 -0
- package/docs/journal/2026/08/22/alibaba-singapore-dual-endpoint-wire-alignment.okf +142 -0
- package/docs/journal/2026/08/22/delluhiold-claude-compaction-empty-tool-name.okf +168 -0
- package/docs/journal/2026/08/22/remote-memory-relative-prompt-paths.okf +79 -0
- package/docs/journal/2026/08/22/remote-memory-root-system-prompt.okf +121 -0
- package/docs/journal/2026/08/23/claude-web-chat-stateless-mcp-repair.okf +97 -0
- package/docs/journal/2026/08/23/cross-runtime-token-usage-interfaces-research.okf +378 -0
- package/docs/journal/2026/08/23/main-0.2.23-readme-release.okf +81 -0
- package/docs/journal/2026/08/23/mia-openrouter-ox-alpha-latency-diagnosis.okf +146 -0
- package/docs/journal/2026/08/23/openrouter-opencode-ox-alpha-support.okf +114 -0
- package/docs/journal/2026/08/23/tabitoken-provider-model-catalog.okf +97 -0
- package/docs/journal/2026/08/23/usage-stream-snapshot-implementation.okf +134 -0
- package/docs/usage-observability.md +141 -0
- package/install.ps1 +24 -3
- package/package.json +2 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
okf_version: "1.0"
|
|
2
|
+
knowledge:
|
|
3
|
+
task:
|
|
4
|
+
id: transcript-compaction-external-events-20260821
|
|
5
|
+
date: "2026-08-21"
|
|
6
|
+
objective: >-
|
|
7
|
+
Determine whether ciel-runtime can expose transcript content from before
|
|
8
|
+
and after a client compaction as externally consumable events.
|
|
9
|
+
|
|
10
|
+
confirmed_current_state:
|
|
11
|
+
transcript_repository:
|
|
12
|
+
file: ciel_runtime_support/channel_transcript_repository.py
|
|
13
|
+
capability: >-
|
|
14
|
+
Discovers Claude and Codex transcript JSONL files and incrementally
|
|
15
|
+
reads complete records appended after a captured byte offset.
|
|
16
|
+
claude_detection:
|
|
17
|
+
file: ciel_runtime_support/channel_transcript.py
|
|
18
|
+
capability: >-
|
|
19
|
+
Recognizes Claude compact-summary records through isCompactSummary and
|
|
20
|
+
distinguishes them from normal user turns.
|
|
21
|
+
claude_hooks:
|
|
22
|
+
file: ciel_runtime_support/tool_guard_hooks.py
|
|
23
|
+
capability: "Installs both PreCompact and PostCompact hook events."
|
|
24
|
+
codex_control:
|
|
25
|
+
file: ciel_runtime_support/codex_app_server.py
|
|
26
|
+
capability: >-
|
|
27
|
+
Can request thread/compact/start and receives app-server notifications,
|
|
28
|
+
but its tracked state currently covers thread and turn lifecycle only.
|
|
29
|
+
runtime_compaction_events:
|
|
30
|
+
files:
|
|
31
|
+
- ciel_runtime_support/prompt_compaction.py
|
|
32
|
+
- ciel_runtime_support/context_compaction.py
|
|
33
|
+
- ciel_runtime_support/runtime_activity_repository.py
|
|
34
|
+
capability: >-
|
|
35
|
+
Publishes context.compact events with counts, token totals, phase,
|
|
36
|
+
budget, and retained or omitted message counts. It does not publish the
|
|
37
|
+
before or after transcript content.
|
|
38
|
+
externally_consumable_sse:
|
|
39
|
+
file: ciel_runtime_support/router_http.py
|
|
40
|
+
endpoint: /ca/events/stream
|
|
41
|
+
capability: >-
|
|
42
|
+
Streams EventBus records to connected SSE consumers and supports replay
|
|
43
|
+
from a supplied event ID while records remain in the in-memory buffer.
|
|
44
|
+
external_event_receiver:
|
|
45
|
+
file: ciel_runtime_support/external_event_receiver.py
|
|
46
|
+
direction: inbound_only
|
|
47
|
+
capability: >-
|
|
48
|
+
Receives CloudEvents through webhook or SSE and submits them as runtime
|
|
49
|
+
inputs. It is not an outbound webhook publisher.
|
|
50
|
+
|
|
51
|
+
implementation:
|
|
52
|
+
delivery_service:
|
|
53
|
+
file: ciel_runtime_support/transcript_delta_delivery.py
|
|
54
|
+
event_type: ai.oneciel.ciel-runtime.transcript.delta
|
|
55
|
+
behavior:
|
|
56
|
+
- "Reads from a durable per-destination and per-transcript byte offset."
|
|
57
|
+
- "Sends only complete newline-terminated JSONL records."
|
|
58
|
+
- "Advances the cursor only after an HTTP 2xx response."
|
|
59
|
+
- "Retries an unchanged batch with the same deterministic event ID."
|
|
60
|
+
- "Restarts at byte zero with rotated=true after transcript truncation."
|
|
61
|
+
- "Expands authorization environment references at send time."
|
|
62
|
+
runtime_wiring:
|
|
63
|
+
file: ciel_runtime.py
|
|
64
|
+
behavior: >-
|
|
65
|
+
Starts the daemon delivery worker when a Claude or Codex transcript
|
|
66
|
+
scope is established for the running workspace.
|
|
67
|
+
configuration:
|
|
68
|
+
command: >-
|
|
69
|
+
ciel-runtimectl transcript-events enabled=true
|
|
70
|
+
url=https://memory.example/v1/transcripts
|
|
71
|
+
authorization='Bearer {MEMORY_TOKEN}' start_mode=tail
|
|
72
|
+
keys:
|
|
73
|
+
- enabled
|
|
74
|
+
- url
|
|
75
|
+
- authorization
|
|
76
|
+
- timeout_seconds
|
|
77
|
+
- poll_interval_ms
|
|
78
|
+
- max_batch_bytes
|
|
79
|
+
- start_mode
|
|
80
|
+
|
|
81
|
+
event_contract:
|
|
82
|
+
envelope: CloudEvents 1.0 structured JSON
|
|
83
|
+
content_type: application/cloudevents+json
|
|
84
|
+
idempotency_header: Idempotency-Key
|
|
85
|
+
data_fields:
|
|
86
|
+
- workspace_id
|
|
87
|
+
- runtime
|
|
88
|
+
- session_id
|
|
89
|
+
- transcript_name
|
|
90
|
+
- start_offset
|
|
91
|
+
- end_offset
|
|
92
|
+
- content_sha256
|
|
93
|
+
- record_count
|
|
94
|
+
- rotated
|
|
95
|
+
- format
|
|
96
|
+
- content
|
|
97
|
+
|
|
98
|
+
verification:
|
|
99
|
+
automated:
|
|
100
|
+
focused:
|
|
101
|
+
transcript_delta_delivery: "4 passed"
|
|
102
|
+
event_settings_cli: "28 passed"
|
|
103
|
+
cli_parser: "5 passed"
|
|
104
|
+
full_groups:
|
|
105
|
+
unit: "1129 passed, 44 skipped"
|
|
106
|
+
router: "906 passed"
|
|
107
|
+
channel: "381 passed, 80 skipped"
|
|
108
|
+
runtime: "252 passed, 12 skipped"
|
|
109
|
+
aggregate: "2668 passed, 136 skipped"
|
|
110
|
+
live_http:
|
|
111
|
+
result: LIVE_TRANSCRIPT_DELIVERY_OK
|
|
112
|
+
observation: >-
|
|
113
|
+
A local HTTP server received exactly two newly appended records. The
|
|
114
|
+
old 11-byte record was skipped in tail mode, offsets were
|
|
115
|
+
11->23->35, and the persisted final cursor was 35.
|
|
116
|
+
authorization: "Bearer environment reference expanded at send time"
|
|
117
|
+
idempotency: "Idempotency-Key matched the CloudEvent event ID"
|
|
118
|
+
cli_boundary:
|
|
119
|
+
result: CLI_TRANSCRIPT_SETTINGS_OK
|
|
120
|
+
observation: >-
|
|
121
|
+
The executable command stored the settings and its status output
|
|
122
|
+
rendered authorization=stored without printing the configured value.
|
|
123
|
+
|
|
124
|
+
answer:
|
|
125
|
+
feasible: true
|
|
126
|
+
implemented_now: true
|
|
127
|
+
incremental_unit: byte_offset_over_complete_jsonl_records
|
|
128
|
+
compaction_relation: >-
|
|
129
|
+
Delivery is continuous and independent of a provider-specific compaction
|
|
130
|
+
callback. Transcript records written before and after compaction are
|
|
131
|
+
therefore delivered through the same ordered offset stream.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
okf_version: "1.0"
|
|
2
|
+
knowledge:
|
|
3
|
+
task:
|
|
4
|
+
id: wing-ai-net-mcp-boundary-diagnosis-20260821
|
|
5
|
+
date: "2026-08-21"
|
|
6
|
+
objective: >-
|
|
7
|
+
Determine from live Wing evidence whether the reported AI-Net MCP load
|
|
8
|
+
failure is caused by the AI-Net installation script or by Ciel Runtime.
|
|
9
|
+
mutation_scope:
|
|
10
|
+
runtime_code_changed: false
|
|
11
|
+
wing_configuration_changed: false
|
|
12
|
+
diagnostic_mcp_sessions_only: true
|
|
13
|
+
|
|
14
|
+
environment:
|
|
15
|
+
wing:
|
|
16
|
+
host: WING
|
|
17
|
+
user: "wing\\daniel.yun"
|
|
18
|
+
tailscale_address: 100.124.160.62
|
|
19
|
+
ssh_port: 1004
|
|
20
|
+
workspace: "C:\\Users\\daniel.yun.WING"
|
|
21
|
+
versions:
|
|
22
|
+
ciel_runtime: 0.2.22-nightly.20260821-172735.c8d920e
|
|
23
|
+
codex_cli: 0.149.0
|
|
24
|
+
|
|
25
|
+
evidence:
|
|
26
|
+
active_ciel_launch:
|
|
27
|
+
command_line_url: "http://100.94.212.25:3603/mcp"
|
|
28
|
+
bearer_token_env_var: AINET_API_KEY
|
|
29
|
+
push_header_env_var: AINET_MCP_PUSH
|
|
30
|
+
api_key_process_present: true
|
|
31
|
+
api_key_user_present: true
|
|
32
|
+
api_key_length_observed: 75
|
|
33
|
+
secret_value_recorded: false
|
|
34
|
+
installed_code_integrity:
|
|
35
|
+
workspace_mcp_sha256:
|
|
36
|
+
local: C79DE505E5CA27DF0562DC006038CB68DAB1B2D1FA010D4E9160B1B38384AAAF
|
|
37
|
+
wing: C79DE505E5CA27DF0562DC006038CB68DAB1B2D1FA010D4E9160B1B38384AAAF
|
|
38
|
+
runtime_launch_sha256:
|
|
39
|
+
local: D77717369068881329488C6BB9441D1A3E5CB86D6F929CD21972589805580B4A
|
|
40
|
+
wing: D77717369068881329488C6BB9441D1A3E5CB86D6F929CD21972589805580B4A
|
|
41
|
+
ai_net_installer:
|
|
42
|
+
url: "http://100.94.212.25:3600/api/v1/integrations/codex-mcp/setup.ps1"
|
|
43
|
+
fetched_length: 12821
|
|
44
|
+
fetched_sha256: 2EF7A4FB8D50D8E45A8E5752D5C13BC1807F2E4BEC8CBC89B8940C9121704405
|
|
45
|
+
declared_default_endpoint: "http://100.94.212.25:3603/mcp"
|
|
46
|
+
declared_v2_opt_in: AINET_MCP_V2=1
|
|
47
|
+
declared_v2_endpoint: "http://100.94.212.25:3603/v2/mcp"
|
|
48
|
+
declared_v2_protocol: "2026-07-28 only"
|
|
49
|
+
persistent_auth_behavior: >-
|
|
50
|
+
The script writes literal Authorization and X-AI-Net-Push headers into
|
|
51
|
+
the native Codex config. No credential value is copied into this journal.
|
|
52
|
+
wing_install_history:
|
|
53
|
+
observed_sequence:
|
|
54
|
+
- "$env:AINET_MCP_V2=\"1\""
|
|
55
|
+
- "irm http://100.94.212.25:3600/api/v1/integrations/codex-mcp/setup.ps1 | iex"
|
|
56
|
+
native_codex_config_written_at_utc: "2026-08-21T17:38:30.2627753Z"
|
|
57
|
+
resulting_native_url: "http://100.94.212.25:3603/v2/mcp"
|
|
58
|
+
resulting_native_static_headers:
|
|
59
|
+
- Authorization
|
|
60
|
+
- X-AI-Net-Push
|
|
61
|
+
endpoint_probes:
|
|
62
|
+
legacy_mcp_without_push_off:
|
|
63
|
+
requested_protocol: "2025-03-26"
|
|
64
|
+
http_status: 200
|
|
65
|
+
session_created: true
|
|
66
|
+
legacy_mcp_with_push_off:
|
|
67
|
+
requested_protocol: "2025-03-26"
|
|
68
|
+
http_status: 200
|
|
69
|
+
session_created: true
|
|
70
|
+
v2_with_legacy_protocol:
|
|
71
|
+
requested_protocol: "2025-06-18"
|
|
72
|
+
http_status: 400
|
|
73
|
+
mcp_error_code: -32022
|
|
74
|
+
server_supported_protocol: "2026-07-28"
|
|
75
|
+
legacy_tools_list:
|
|
76
|
+
requested_protocol: "2025-06-18"
|
|
77
|
+
initialize_status: 200
|
|
78
|
+
initialized_notification_status: 202
|
|
79
|
+
tools_list_status: 200
|
|
80
|
+
tool_count: 35
|
|
81
|
+
get_messages_present: true
|
|
82
|
+
send_message_present: true
|
|
83
|
+
active_codex_log:
|
|
84
|
+
process_id: 15544
|
|
85
|
+
thread_id: 01a024fe-7666-79e3-9c1a-98f46e26af5f
|
|
86
|
+
observed_server: ai-net
|
|
87
|
+
observed_rpc_errors:
|
|
88
|
+
resources_list: "-32601 Method not found"
|
|
89
|
+
resource_templates_list: "-32601 Method not found"
|
|
90
|
+
interpretation: >-
|
|
91
|
+
These RPC responses prove that the active Codex MCP client reached the
|
|
92
|
+
AI-Net server. They are unsupported resource-method errors, not MCP
|
|
93
|
+
initialization or authentication failures.
|
|
94
|
+
current_ciel_change_scope:
|
|
95
|
+
code_commit: fe7c4b09ad4178adabc73162b3c6dc2cbb5870f2
|
|
96
|
+
journal_commit: c8d920e3e52eafd1642ace01206734c538574824
|
|
97
|
+
mcp_files_changed_by_these_commits: false
|
|
98
|
+
changed_area: Alibaba Singapore Qwen3.8 provider configuration
|
|
99
|
+
|
|
100
|
+
findings:
|
|
101
|
+
native_codex:
|
|
102
|
+
status: incompatible_configuration
|
|
103
|
+
cause_confirmed: >-
|
|
104
|
+
AINET_MCP_V2=1 caused the AI-Net installer to persist /v2/mcp. That
|
|
105
|
+
endpoint rejects the protocol used by Codex 0.149 with -32022.
|
|
106
|
+
responsible_boundary: ai_net_installer_v2_opt_in_configuration
|
|
107
|
+
ciel_managed_codex:
|
|
108
|
+
status: ai_net_mcp_loaded
|
|
109
|
+
evidence: >-
|
|
110
|
+
Ciel overrides the URL to /mcp; that endpoint initializes successfully,
|
|
111
|
+
lists 35 tools, and the active Codex process receives AI-Net RPC replies.
|
|
112
|
+
load_failure_caused_by_current_ciel_change: false
|
|
113
|
+
visible_resource_errors:
|
|
114
|
+
status: server_method_not_supported
|
|
115
|
+
cause_confirmed: >-
|
|
116
|
+
AI-Net exposes tools but does not implement the MCP resource listing
|
|
117
|
+
methods requested by Codex's generic resource commands.
|
|
118
|
+
|
|
119
|
+
conclusion:
|
|
120
|
+
confirmed: >-
|
|
121
|
+
The native Codex load problem is produced by the installer invocation's
|
|
122
|
+
AINET_MCP_V2=1 setting and the resulting /v2/mcp protocol mismatch. The
|
|
123
|
+
active Ciel-managed Wing session is using /mcp and has loaded AI-Net MCP.
|
|
124
|
+
Current Ciel Runtime changes are not the cause of the observed native
|
|
125
|
+
protocol failure.
|
|
126
|
+
not_claimed:
|
|
127
|
+
- No claim is made that every historical Wing session had the same state.
|
|
128
|
+
- No configuration or runtime process was restarted during this diagnosis.
|
|
129
|
+
- No code fix is included because the requested task was diagnosis.
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
okf_version: "1.0"
|
|
2
|
+
knowledge:
|
|
3
|
+
task:
|
|
4
|
+
id: wing-cold-start-wake-submit-repair-20260821
|
|
5
|
+
date: "2026-08-21"
|
|
6
|
+
objective: >-
|
|
7
|
+
Diagnose and repair the WING cold-start condition where the first external
|
|
8
|
+
SSE message is rendered in the Codex input editor but is not submitted.
|
|
9
|
+
|
|
10
|
+
evidence:
|
|
11
|
+
host: "WING"
|
|
12
|
+
user: "wing\\daniel.yun"
|
|
13
|
+
workspace: "C:\\Users\\daniel.yun.WING"
|
|
14
|
+
installed_version: "0.2.22-nightly.20260821-200044.511148d"
|
|
15
|
+
runtime_mode: "codex-router"
|
|
16
|
+
transport: "conpty"
|
|
17
|
+
active_session: "01a024fe-7666-79e3-9c1a-98f46e26af5f"
|
|
18
|
+
message:
|
|
19
|
+
id: 1236
|
|
20
|
+
kind: external_event
|
|
21
|
+
event_type: net.ai-net.connected
|
|
22
|
+
persisted_at: "2026-08-21T15:12:43"
|
|
23
|
+
router_log:
|
|
24
|
+
path: >-
|
|
25
|
+
C:\Users\daniel.yun.WING\AppData\Roaming\ciel-runtime\
|
|
26
|
+
router-instances\9140-f895679997f4\router.log
|
|
27
|
+
observations:
|
|
28
|
+
- "15:12:44 channel_windows_console_proxy_started transport=conpty"
|
|
29
|
+
- "15:12:54 channel_input_prompt_ready result=timeout"
|
|
30
|
+
- "15:12:55 channel_stdin_proxy_submit_confirmed attempt=1"
|
|
31
|
+
- "15:13:12 channel_windows_console_unseen_retry message_id=1236"
|
|
32
|
+
- "15:13:13 channel_input_prompt_ready result=observed"
|
|
33
|
+
- "15:13:14 channel_stdin_proxy_submit_confirmed attempt=1"
|
|
34
|
+
- "15:13:32 channel_windows_console_body_fallback message_id=1236"
|
|
35
|
+
absent_evidence:
|
|
36
|
+
- >-
|
|
37
|
+
No POST /backend-api/codex/responses occurred after message 1236 was
|
|
38
|
+
injected and before the body fallback.
|
|
39
|
+
|
|
40
|
+
confirmed_cause:
|
|
41
|
+
- >-
|
|
42
|
+
WindowsConPtySession.wait_until_prompt_ready accepted any child-output
|
|
43
|
+
change after injection; it did not require evidence that the injected
|
|
44
|
+
prompt itself had rendered.
|
|
45
|
+
- >-
|
|
46
|
+
ChannelPromptInjector submitted Enter after a prompt-ready timeout and
|
|
47
|
+
treated an unrelated output-tail change as submit confirmation.
|
|
48
|
+
- >-
|
|
49
|
+
The SSE event was received and durably persisted. The failure boundary
|
|
50
|
+
was the cold-start TTY submit path, not SSE receipt or message storage.
|
|
51
|
+
- >-
|
|
52
|
+
WING live message 1238 proved that occurrence-count comparison is not
|
|
53
|
+
valid for the 64 KiB rolling ConPTY output tail. The same prompt rendered
|
|
54
|
+
twice, at 15:44:57 and 15:45:27, while both waits timed out and no Enter
|
|
55
|
+
was submitted. A previous occurrence can roll out as a new occurrence
|
|
56
|
+
enters, leaving the count unchanged.
|
|
57
|
+
- >-
|
|
58
|
+
WING fresh-session message 1239 was admitted at 16:00:32, while Codex
|
|
59
|
+
finished its startup rendering at the 16:01:02 timeout boundary. The
|
|
60
|
+
injector correctly withheld Enter, but the pending-delivery layer still
|
|
61
|
+
recorded the message as injected and retained its claim. Logs then
|
|
62
|
+
repeated state=unknown instead of retrying.
|
|
63
|
+
- >-
|
|
64
|
+
WING fresh-session message 1240 retried at 16:15:29, 16:15:59, and
|
|
65
|
+
16:16:30 after claim rollback. The exact visible prefix contained two
|
|
66
|
+
spaces between the wake header and the external-event marker because the
|
|
67
|
+
source prompt has a blank line. Prompt detection incorrectly collapsed
|
|
68
|
+
that pair to one space, so every real render was rejected.
|
|
69
|
+
|
|
70
|
+
correction:
|
|
71
|
+
files:
|
|
72
|
+
- ciel_runtime_support/channel_injection.py
|
|
73
|
+
- ciel_runtime_support/windows_conpty.py
|
|
74
|
+
- tests/test_channel_injection.py
|
|
75
|
+
- tests/test_windows_conpty.py
|
|
76
|
+
behavior:
|
|
77
|
+
- >-
|
|
78
|
+
Prompt readiness now captures the ConPTY absolute output-byte position
|
|
79
|
+
before writing input and searches only bytes emitted after that
|
|
80
|
+
checkpoint for the prompt prefix or [Pasted Content ...] marker.
|
|
81
|
+
- >-
|
|
82
|
+
Rolling-tail eviction and repeated rendering of the same prompt can no
|
|
83
|
+
longer hide new render evidence.
|
|
84
|
+
- >-
|
|
85
|
+
A prompt-render timeout defers Enter instead of reporting a false
|
|
86
|
+
submission.
|
|
87
|
+
- >-
|
|
88
|
+
Prompt injection now returns an explicit submitted result. When render
|
|
89
|
+
readiness times out, pending delivery rolls back the wake claim, does
|
|
90
|
+
not record the prompt or injected id, and leaves the cursor unchanged
|
|
91
|
+
so the next idle scan retries the complete body and Enter.
|
|
92
|
+
- >-
|
|
93
|
+
Prompt-render matching now uses the same normalize_prompt operation as
|
|
94
|
+
the injected body. Blank lines therefore remain the same two visible
|
|
95
|
+
spaces in both the expected prefix and captured ConPTY output.
|
|
96
|
+
- >-
|
|
97
|
+
No WING, user, message, model, provider, or agent-specific exception was
|
|
98
|
+
introduced.
|
|
99
|
+
|
|
100
|
+
verification:
|
|
101
|
+
focused:
|
|
102
|
+
channel_injection: "6 passed"
|
|
103
|
+
windows_conpty: "18 passed"
|
|
104
|
+
channel_bridge: "207 passed, 80 skipped"
|
|
105
|
+
channel_injection_architecture: "4 passed"
|
|
106
|
+
codex_runtime: "69 passed, 12 skipped"
|
|
107
|
+
ruff: passed
|
|
108
|
+
full_npm_test:
|
|
109
|
+
unit: "1120 passed, 44 skipped"
|
|
110
|
+
router: "906 passed"
|
|
111
|
+
channel: "381 passed, 80 skipped"
|
|
112
|
+
runtime: "249 passed, 12 skipped"
|
|
113
|
+
total: "2656 passed, 136 skipped"
|
|
114
|
+
first_nightly:
|
|
115
|
+
version: "0.2.22-nightly.20260821-203346.87525c6"
|
|
116
|
+
commit: "87525c6bbb83d9483d30a1d3b54c0b1c73599c7c"
|
|
117
|
+
result: >-
|
|
118
|
+
Installed locally and on WING. Live message 1238 exposed the rolling
|
|
119
|
+
output-tail evidence defect above, so this build was not accepted as
|
|
120
|
+
complete.
|
|
121
|
+
second_nightly:
|
|
122
|
+
version: "0.2.22-nightly.20260821-205641.fad60f5"
|
|
123
|
+
commit: "fad60f54ab1b0998d2495ff34948716cfbaf70b2"
|
|
124
|
+
result: >-
|
|
125
|
+
Installed locally and on WING. Fresh-session message 1239 exposed the
|
|
126
|
+
missing submission-result propagation and claim rollback above, so
|
|
127
|
+
this build was not accepted as complete.
|
|
128
|
+
third_nightly:
|
|
129
|
+
version: "0.2.22-nightly.20260821-211233.f357b91"
|
|
130
|
+
commit: "f357b91c7ae21079d45f5458a01f72f026341f50"
|
|
131
|
+
result: >-
|
|
132
|
+
Installed locally and on WING. Fresh-session message 1240 proved claim
|
|
133
|
+
rollback and periodic retry worked, then exposed the blank-line
|
|
134
|
+
whitespace mismatch above, so this build was not accepted as complete.
|
|
135
|
+
fourth_nightly:
|
|
136
|
+
version: "0.2.22-nightly.20260821-212609.39f1119"
|
|
137
|
+
commit: "39f11192101fbd631d5475c9274e5ce69720d589"
|
|
138
|
+
ci_run: "https://github.com/OneCielAI/ciel-runtime/actions/runs/32528301706"
|
|
139
|
+
publish_run: "https://github.com/OneCielAI/ciel-runtime/actions/runs/32528301741"
|
|
140
|
+
result: accepted_by_wing_live_verification
|
|
141
|
+
wing_live:
|
|
142
|
+
session: "01a02639-b0aa-7530-9115-8084007b2754"
|
|
143
|
+
message_id: 1241
|
|
144
|
+
event_id: "evt_wing_first_message_verify_39f1119"
|
|
145
|
+
persisted_at: "2026-08-21T16:29:17"
|
|
146
|
+
evidence:
|
|
147
|
+
- "16:29:21 channel_input_prompt_ready result=observed"
|
|
148
|
+
- "16:29:22 channel_stdin_proxy_submit_confirmed attempt=1"
|
|
149
|
+
- "16:29:22 channel_stdin_proxy_injected message_ids=1241 enter=cr"
|
|
150
|
+
- "16:29:25 channel_llm_injected message_ids=1241"
|
|
151
|
+
- "16:29:30 POST /v1/responses HTTP/1.1 200"
|
|
152
|
+
- "16:29:33 channel_wake_completed_evidence message_id=1241"
|
|
153
|
+
- "16:29:33 channel_windows_console_confirmed message_id=1241 cursor=1241"
|
|
154
|
+
- "Codex terminal rendered the exact response WING_FIRST_MESSAGE_OK"
|
|
155
|
+
deployment:
|
|
156
|
+
local_version: "0.2.22-nightly.20260821-212609.39f1119"
|
|
157
|
+
wing_version: "0.2.22-nightly.20260821-212609.39f1119"
|
|
158
|
+
windows_conpty_sha256: >-
|
|
159
|
+
5EE8FE12A9C7D680025B538F9EF8253BCAC2F5E285B942A56D5A758A6371E915
|
|
160
|
+
local_package_and_runtime_hash_match: true
|
|
161
|
+
local_and_wing_hash_match: true
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
okf_version: "1.0"
|
|
2
|
+
knowledge:
|
|
3
|
+
task:
|
|
4
|
+
id: wing-powershell-memory-runaway-20260821
|
|
5
|
+
date: "2026-08-21"
|
|
6
|
+
objective: >-
|
|
7
|
+
Identify the exact PowerShell command that consumed more than 63 GB on
|
|
8
|
+
WING, terminate only the runaway diagnostic process, and preserve the
|
|
9
|
+
evidence without attributing an unverified internal mechanism.
|
|
10
|
+
|
|
11
|
+
evidence:
|
|
12
|
+
host: WING
|
|
13
|
+
process:
|
|
14
|
+
image: powershell.exe
|
|
15
|
+
pid: 7940
|
|
16
|
+
created: "2026-08-21 15:18:53 WING local time"
|
|
17
|
+
working_set_mb: 63269.96
|
|
18
|
+
private_memory_gb: 120.711
|
|
19
|
+
command_mode: "-NoProfile -NonInteractive -EncodedCommand"
|
|
20
|
+
windows_event:
|
|
21
|
+
provider: Microsoft-Windows-Resource-Exhaustion-Detector
|
|
22
|
+
event_id: 2004
|
|
23
|
+
observations:
|
|
24
|
+
- >-
|
|
25
|
+
20:49:10: powershell.exe PID 7940 consumed 129,961,250,816
|
|
26
|
+
bytes of virtual memory.
|
|
27
|
+
- >-
|
|
28
|
+
Repeated event 2004 records from 19:52:01 through 20:49:10 identify
|
|
29
|
+
the same PID as the largest virtual-memory consumer.
|
|
30
|
+
local_codex_record:
|
|
31
|
+
file: >-
|
|
32
|
+
C:\Users\djlov\.codex\sessions\2026\08\20\
|
|
33
|
+
rollout-2026-08-20T11-44-17-01a0200f-2245-7cc1-8219-85d745a719a8.jsonl
|
|
34
|
+
line: 13109
|
|
35
|
+
timestamp_utc: "2026-08-21T20:18:50.122Z"
|
|
36
|
+
result_at_20_seconds: "no output; remote process remained running"
|
|
37
|
+
|
|
38
|
+
exact_diagnostic_script:
|
|
39
|
+
purpose: >-
|
|
40
|
+
Read selected router events, the last 12 runtime inputs, and the last
|
|
41
|
+
1,200 Codex session records, then serialize a compact JSON report.
|
|
42
|
+
sources:
|
|
43
|
+
router_log: >-
|
|
44
|
+
C:\Users\daniel.yun.WING\AppData\Roaming\ciel-runtime\
|
|
45
|
+
router-instances\9140-f895679997f4\router.log
|
|
46
|
+
input_log: >-
|
|
47
|
+
C:\Users\daniel.yun.WING\AppData\Roaming\ciel-runtime\
|
|
48
|
+
workspaces\f895679997f4\runtime-inputs.jsonl
|
|
49
|
+
session_log: >-
|
|
50
|
+
C:\Users\daniel.yun.WING\.codex\sessions\2026\08\21\
|
|
51
|
+
rollout-2026-08-21T10-44-11-01a024fe-7666-79e3-9c1a-98f46e26af5f.jsonl
|
|
52
|
+
critical_expression: >-
|
|
53
|
+
Get-Content -LiteralPath $sessionLog -Tail 1200
|
|
54
|
+
|
|
55
|
+
isolation:
|
|
56
|
+
router_tail:
|
|
57
|
+
expression: "Get-Content router.log -Tail 1000 plus event filter"
|
|
58
|
+
result: "11 records in 206 ms"
|
|
59
|
+
input_tail:
|
|
60
|
+
expression: "Get-Content runtime-inputs.jsonl -Tail 12 plus JSON parsing"
|
|
61
|
+
result: "12 records in 281 ms"
|
|
62
|
+
session_tail:
|
|
63
|
+
expression: "Get-Content session JSONL -Tail 1200 without JSON parsing"
|
|
64
|
+
result: >-
|
|
65
|
+
Did not complete within 10 seconds; a new service-session PowerShell
|
|
66
|
+
process remained alive and its working set rose from 61,512 KB to
|
|
67
|
+
67,352 KB before termination.
|
|
68
|
+
session_file:
|
|
69
|
+
bytes: 8055707
|
|
70
|
+
lines: 2893
|
|
71
|
+
maximum_line_bytes: 281563
|
|
72
|
+
line_endings: "LF=2893, CR=0"
|
|
73
|
+
null_bytes: 0
|
|
74
|
+
excluded:
|
|
75
|
+
- >-
|
|
76
|
+
The three source files total approximately 10 MB, so source file size
|
|
77
|
+
alone does not account for the observed 63 GB working set.
|
|
78
|
+
- >-
|
|
79
|
+
ConvertFrom-Json and ConvertTo-Json are downstream of the independently
|
|
80
|
+
reproduced stall and are not required to reproduce it.
|
|
81
|
+
|
|
82
|
+
confirmed_cause_scope: >-
|
|
83
|
+
The runaway is reproduced at Windows PowerShell 5.1.20348.4294 executing
|
|
84
|
+
Get-Content -Tail 1200 against the identified Codex LF-only JSONL file.
|
|
85
|
+
Available evidence does not establish the deeper internal PowerShell
|
|
86
|
+
implementation defect, so no more specific mechanism is asserted.
|
|
87
|
+
|
|
88
|
+
remediation:
|
|
89
|
+
pid_7940: "terminated"
|
|
90
|
+
reproduction_pid_18032: "terminated"
|
|
91
|
+
aborted_measurement_pid_18700: "terminated"
|
|
92
|
+
remaining_powershell: >-
|
|
93
|
+
PID 10808 in the user's RDP session, approximately 105 MB; not modified.
|
|
94
|
+
final_check:
|
|
95
|
+
runaway_process_present: false
|
|
96
|
+
free_physical_memory_kb: 40509592
|
|
97
|
+
|
|
98
|
+
accountability: >-
|
|
99
|
+
The diagnostic command was issued by this Codex session. It exceeded the
|
|
100
|
+
20-second observation window, and failure to immediately follow up and
|
|
101
|
+
terminate the still-running remote process allowed it to remain active.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
okf_version: "1.0"
|
|
2
|
+
knowledge:
|
|
3
|
+
task:
|
|
4
|
+
id: wing-repeated-reasoning-tool-turn-repair-20260821
|
|
5
|
+
date: "2026-08-21"
|
|
6
|
+
objective: >-
|
|
7
|
+
Determine from live Wing evidence why a routed Codex session repeatedly
|
|
8
|
+
restarts the same reasoning after Ciel reports a reasoning-only upstream
|
|
9
|
+
response, then correct the general protocol boundary.
|
|
10
|
+
scope:
|
|
11
|
+
machine_exception_added: false
|
|
12
|
+
user_exception_added: false
|
|
13
|
+
provider_name_exception_added: false
|
|
14
|
+
|
|
15
|
+
environment:
|
|
16
|
+
wing:
|
|
17
|
+
host: WING
|
|
18
|
+
user: "wing\\daniel.yun"
|
|
19
|
+
tailscale_address: 100.124.160.62
|
|
20
|
+
ssh_port: 1004
|
|
21
|
+
workspace: "C:\\Users\\daniel.yun.WING"
|
|
22
|
+
affected_runtime:
|
|
23
|
+
version: 0.2.22-nightly.20260821-172735.c8d920e
|
|
24
|
+
provider: ollama-cloud
|
|
25
|
+
upstream_model: "deepseek-v4-pro:0813"
|
|
26
|
+
transcript: >-
|
|
27
|
+
C:\Users\daniel.yun.WING\.codex\sessions\2026\08\21\
|
|
28
|
+
rollout-2026-08-21T10-44-11-01a024fe-7666-79e3-9c1a-98f46e26af5f.jsonl
|
|
29
|
+
router_log: >-
|
|
30
|
+
C:\Users\daniel.yun.WING\AppData\Roaming\ciel-runtime\
|
|
31
|
+
router-instances\9139-f895679997f4\router.log
|
|
32
|
+
|
|
33
|
+
evidence:
|
|
34
|
+
live_router:
|
|
35
|
+
reasoning_only_markers:
|
|
36
|
+
- "2026-08-21T14:02:35"
|
|
37
|
+
- "2026-08-21T14:02:41"
|
|
38
|
+
observed_classification: preamble_only
|
|
39
|
+
request_growth:
|
|
40
|
+
first_observed_tokens: 59879
|
|
41
|
+
later_observed_tokens: 61480
|
|
42
|
+
first_observed_bytes: 247671
|
|
43
|
+
later_observed_bytes: 254077
|
|
44
|
+
historical_blocks_discarded:
|
|
45
|
+
earlier_pair_count: 509
|
|
46
|
+
later_pair_count: 551
|
|
47
|
+
log_marker: discarded unmatched historical Anthropic tool blocks
|
|
48
|
+
transcript_sequence:
|
|
49
|
+
inspected_lines: "2460-2590"
|
|
50
|
+
repeated_tools:
|
|
51
|
+
- list_mcp_resources
|
|
52
|
+
- list_mcp_resource_templates
|
|
53
|
+
call_arguments_sha256_prefix: 44136FA355B3678A
|
|
54
|
+
resources_result_sha256_prefix: 5470BCB5A8C4539D
|
|
55
|
+
templates_result_sha256_prefix: 87854A2460A872FF
|
|
56
|
+
repeated_reasoning_sha256_prefixes:
|
|
57
|
+
- E38C5BDE35754197
|
|
58
|
+
- 3CD26012D6413F6E
|
|
59
|
+
confirmed_behavior: >-
|
|
60
|
+
The same reasoning, the same two empty-argument tool calls, and the same
|
|
61
|
+
two tool results recur with only newly generated call IDs. The tools were
|
|
62
|
+
actually executed; this was not a display-only repetition.
|
|
63
|
+
source_boundary:
|
|
64
|
+
responses_projection: >-
|
|
65
|
+
openai_responses_to_anthropic_messages emitted each consecutive
|
|
66
|
+
function_call as a separate assistant message and each consecutive
|
|
67
|
+
function_call_output as a separate user message.
|
|
68
|
+
provider_normalization: >-
|
|
69
|
+
normalize_historical_anthropic_tool_turns retains a tool use only when
|
|
70
|
+
the immediately following user message contains its matching result.
|
|
71
|
+
confirmed_interaction: >-
|
|
72
|
+
For the observed Responses order of call, call, result, result, neither
|
|
73
|
+
assistant message was immediately followed by its matching user result.
|
|
74
|
+
The normalizer therefore removed both calls and both results before the
|
|
75
|
+
next upstream request.
|
|
76
|
+
regression_test:
|
|
77
|
+
before_repair: >-
|
|
78
|
+
test_parallel_responses_tool_turn_survives_provider_normalization failed;
|
|
79
|
+
normalized roles were [assistant] instead of [assistant, user].
|
|
80
|
+
after_repair: >-
|
|
81
|
+
Provider wire normalization passed 6 tests and Codex turn recovery
|
|
82
|
+
passed 29 tests.
|
|
83
|
+
|
|
84
|
+
repair:
|
|
85
|
+
tool_turn_projection: >-
|
|
86
|
+
Consecutive Responses function calls are grouped into one Anthropic
|
|
87
|
+
assistant turn, and consecutive outputs are grouped into one Anthropic
|
|
88
|
+
user turn. Matching call IDs and result IDs therefore survive the existing
|
|
89
|
+
strict provider normalization.
|
|
90
|
+
reasoning_only_recovery: >-
|
|
91
|
+
Reasoning-only content shape is recognized independently of provider
|
|
92
|
+
name. The synthetic runtime notice is excluded from retry history, one
|
|
93
|
+
bounded continuation is performed, and either real tool work or a visible
|
|
94
|
+
final answer may complete the recovery.
|
|
95
|
+
invariants:
|
|
96
|
+
- Recovery remains bounded to one extra upstream call.
|
|
97
|
+
- Empty responses after recovery preserve the original notice.
|
|
98
|
+
- Kimi follow-up-promise wording remains Kimi-specific.
|
|
99
|
+
- No Wing, user, model, CLI, or agent exception was introduced.
|
|
100
|
+
|
|
101
|
+
verification:
|
|
102
|
+
focused:
|
|
103
|
+
provider_wire_normalization: "6 passed"
|
|
104
|
+
codex_turn_recovery: "29 passed"
|
|
105
|
+
ruff: passed
|
|
106
|
+
git_diff_check: passed
|
|
107
|
+
complete_groups:
|
|
108
|
+
unit: "1113 passed, 44 skipped"
|
|
109
|
+
router: "906 passed"
|
|
110
|
+
channel: "379 passed, 80 skipped"
|
|
111
|
+
runtime: "248 passed, 12 skipped"
|
|
112
|
+
total: "2646 passed, 136 skipped"
|