Observed
jcode api-bridge panics on list_sessions when $JCODE_HOME/sessions exists and is empty:
thread 'tokio-runtime-worker' panicked at crates/jcode-harness-api-server/src/translate.rs:1707:38:
chunk size must be non-zero
The API socket then resets. A subsequent create_session on the same client fails with a broken pipe / harness connection closed.
Measured on jcode v0.81.5 (f46f9c354) with an isolated JCODE_HOME.
Controls
Isolated JCODE_HOME, jcode api-bridge --api-socket ... --no-update, handshake hello with min_version: 1, max_version: 1, then list_sessions:
| home |
result |
no sessions/ directory |
{"ev":"sessions","sessions":[]} then create_session succeeds |
empty sessions/ directory |
panic at translate.rs:1707:38, socket reset, create_session BrokenPipe |
Ask
stored_session_ids should treat a zero-length directory listing as an empty session list instead of dividing by a zero chunk count.
This is independently the root of Cotal-AI/Cotal#1293: a managed seat whose private home has an empty sessions/ directory cannot start.
Observed
jcode api-bridgepanics onlist_sessionswhen$JCODE_HOME/sessionsexists and is empty:The API socket then resets. A subsequent
create_sessionon the same client fails with a broken pipe / harness connection closed.Measured on
jcode v0.81.5 (f46f9c354)with an isolatedJCODE_HOME.Controls
Isolated
JCODE_HOME,jcode api-bridge --api-socket ... --no-update, handshakehellowithmin_version: 1, max_version: 1, thenlist_sessions:sessions/directory{"ev":"sessions","sessions":[]}thencreate_sessionsucceedssessions/directorytranslate.rs:1707:38, socket reset,create_sessionBrokenPipeAsk
stored_session_idsshould treat a zero-length directory listing as an empty session list instead of dividing by a zero chunk count.This is independently the root of Cotal-AI/Cotal#1293: a managed seat whose private home has an empty
sessions/directory cannot start.