zcode-acp-server 0.11.0 → 0.11.3

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.
@@ -68,12 +68,35 @@ a hardcoded version string — read the message text to identify the root cause.
68
68
  **Common causes:**
69
69
 
70
70
  | Message fragment | Cause |
71
- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
71
+ | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
72
72
  | `reader exited (backend dead)` | The zcode subprocess crashed/exited. Restart the editor session. |
73
- | `timeout` | The per-attempt 10s subscribe deadline elapsed. The bridge retries transient timeouts up to 3× (the backend can be briefly busy finalising a cancelled turn after a preempt / `session/stop`); if all retries fail, the backend was unresponsive for ~30s. |
73
+ | `timeout` | The per-attempt 5s subscribe deadline elapsed. The bridge retries transient timeouts once (2 attempts total, ~10.5s worst case); if both fail, the backend was unresponsive for that window. |
74
74
  | `pipe broken` | The stdin pipe to the zcode subprocess broke (process died mid-write). |
75
75
  | `method not found (code -32601)` | The CLI genuinely is too old (< 0.14.8). Upgrade. |
76
- | session-level business error | The target session no longer exists or was evicted. |
76
+ | `Session is not active` (-32004) | The backend evicted the session's resident runtime (idle ~10min, or its LRU cap). The bridge self-heals via `session/resume` (see below). |
77
+
78
+ **`Session is not active` (code -32004) in detail:**
79
+
80
+ The zcode backend keeps session runtimes ("residents") in memory and evicts
81
+ them after ~10 minutes idle (log event `session.resident_deactivated`,
82
+ `reason: "idle_timeout"`) or under its resident LRU cap. An evicted session
83
+ fails every session-scoped RPC with `-32004` while the session file stays
84
+ intact — the editor still shows its local copy of the conversation, but
85
+ sending a message errors and remote clients replay an empty session.
86
+
87
+ The bridge self-heals on every entry point:
88
+
89
+ - `session/prompt` reloads the session via `session/resume` and retries the
90
+ subscribe once when it sees this error;
91
+ - the "loaded in backend" verification carries a 5-minute TTL
92
+ (`BACKEND_RESIDENT_TTL_MS`), so `session/load` / `session/resume` re-issue
93
+ the backend resume RPC instead of trusting a stale in-memory flag;
94
+ - `ensureRealSession` (config/slash/extension entry points) reloads a stale
95
+ mapping before use, unless a turn is in flight.
96
+
97
+ If the error still surfaces, the resume itself is failing — check the backend
98
+ log (`~/.zcode/cli/log/zcode-YYYY-MM-DD.jsonl`) for the underlying cause
99
+ (corrupt session file, lock contention from another zcode process).
77
100
 
78
101
  **Troubleshooting steps:**
79
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcode-acp-server",
3
- "version": "0.11.0",
3
+ "version": "0.11.3",
4
4
  "description": "Agent Client Protocol (ACP) server bridging headless ZCode to editors like Zed and JetBrains.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",