Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

826 B
Raw Blame
"""ACP agent stuck mid-turn: it never answers a prompt and ignores session/cancel."""

import json
import sys


def send(value):
    sys.stdout.write(json.dumps({"jsonrpc": "2.0", **value}) + "\n")
    sys.stdout.flush()


for line in sys.stdin:
    message = json.loads(line)
    method = message.get("method")
    if method == "initialize":
        send({"id": message["id"], "result": {"protocolVersion": 1, "agentCapabilities": {"loadSession": False}}})
    elif method == "session/new":
        send({"id": message["id"], "result": {"sessionId": "stuck"}})
    elif method == "session/prompt":
        text = {"type": "text", "text": "Working on it"}
        update = {"sessionUpdate": "agent_message_chunk", "content": text}
        send({"method": "session/update", "params": {"sessionId": "stuck", "update": update}})