Releases: elvatis/elvatis-mcp
v1.2.4 — Stale-output detection + model-aware timeouts
Changes
Stale-output detection for CLI subprocesses
spawnLocal() now monitors stdout/stderr activity and kills hung processes early instead of waiting for the full hard timeout. Check interval: 10s.
Model-aware stale timeouts for Claude
- Opus: 90s (long-form generation needs think time)
- Sonnet: 60s (real-world tool reasoning with many tools takes 28-50s)
- Haiku: 30s (fast model, if silent for 30s it is hung)
Matches the same fix in openclaw-cli-bridge-elvatis v3.9.1. Previously there was no stale detection — a hung Sonnet process would block for the full 60-300s hard timeout.
v1.2.3 — Fix JSON parsing for raw newlines
Fix
Same fix as openclaw-cli-bridge-elvatis v3.8.2: models embed actual newline bytes (0x0A) inside JSON strings, which is invalid JSON and causes JSON.parse to fail. Now sanitizes control characters before parsing Claude CLI output.
v1.2.2 — Sonnet-first, Opus as fallback only
Changes
No preemptive Opus escalation
Sonnet now handles all Claude requests by default. Opus is only used as a fallback when Sonnet fails. This reduces cost significantly while maintaining reliability since the cwd root cause (v1.2.1) fixed Sonnet's 90% failure rate.
Updated documentation
claude_runtool doc comment updated to reflect homedir-only cwd and Opus-only session resumeworking_directoryparameter description clarified: ignored for Claude (always homedir)- Known issues section updated with "no preemptive Opus escalation" policy
Verification
Orchestration test (openclaw-cli-bridge-elvatis): 30/30 pass across all 5 CLI providers (Opus, Sonnet, Haiku, Gemini Flash, Codex) with simple, tools, and large (30KB) prompts.
v1.2.1 — Fix: Claude cwd must be homedir(), session resume Opus-only
Root Cause Fix (from openclaw-cli-bridge-elvatis v3.8.0)
Running claude -p from a project directory triggers Claude Code's agentic mode, which ignores prompt instructions and treats tool injection as "prompt injection attempts". This caused 90%+ failure rates when working_directory was set to a project path.
Fixes
Claude cwd forced to homedir()
The claude_run tool now always spawns Claude from the user's home directory, regardless of the working_directory parameter. This prevents agentic mode activation. Gemini and Codex are unaffected and still respect working_directory.
Session resume: Opus only
Session resume (--session-id/--resume) is now disabled for Sonnet and Haiku. These models have a 45% hang rate with session resume due to corrupted sessions after SIGTERM kills. Opus keeps session resume for context continuity.
"Already in use" session handling
Added "already in use" to session invalidation triggers, preventing stuck session loops when a killed process holds the session lock.
Evidence
Orchestration testing (openclaw-cli-bridge-elvatis test/orchestration-test.ts) showed:
- All 5 CLI providers pass 100% from homedir() (45/45 tests)
- Sonnet fails when cwd is set to a workspace directory
v1.2.0: CLI session resume for sub-agents
What's new in v1.2.0
CLI session resume for claude_run, gemini_run, codex_run
Spawning a fresh CLI process for every request forced the model to re-tokenize the full conversation history (18-25 KB) from scratch. This caused:
- ~50% silent hang rate with Claude Sonnet on large prompts
- 80-120s response times instead of 5-10s
- Wasted tokens on every call
Session resume fixes this by maintaining a persistent session per model. Subsequent requests send only the new message.
| Metric | Before | After |
|---|---|---|
| Prompt size per request | 18-25 KB | <1 KB |
| Sonnet response time | 80-120s (50% hang rate) | 5-10s |
| Silent hang rate | ~50% | Near 0% |
Sessions persist to ~/.openclaw/cli-bridge/cli-sessions.json and expire after 2 hours of inactivity or 50 requests. The session_id is returned in every response.
Changes
src/session-registry.ts(new): persistent session registry with TTL and request-count rotationsrc/spawn.ts: addedstdinDataparameter for piping prompts via stdinsrc/tools/claude.ts:--session-idon first request,--resumeon subsequent;bypassPermissionsflagssrc/tools/gemini.ts: always passes--resume(Gemini creates session on unknown UUID);--approval-mode yolosrc/tools/codex.ts: removed--ephemeral; usescodex exec resume <id>subcommand for subsequent requests