Skip to content

Fix session/new failing when kate-mcp-server is included#4

Open
molove wants to merge 11 commits intoundefinedopcode:mainfrom
molove:main
Open

Fix session/new failing when kate-mcp-server is included#4
molove wants to merge 11 commits intoundefinedopcode:mainfrom
molove:main

Conversation

@molove
Copy link
Copy Markdown

@molove molove commented Apr 18, 2026

The MCP server entry in the session/new mcpServers array included a "type": "stdio" field. The claude-agent-acp handler branches on the presence of a "type" key: with it, the entry is treated as HTTP/SSE and only url/headers are read (command is ignored, url is undefined); without it, the entry is treated as stdio and command/args/env are read correctly.

Removing the "type" field causes the ACP agent to take the stdio branch and successfully launch kate-mcp-server, fixing the Internal error -32603 "Query closed before response received" that prevented sessions from being created.

piers and others added 11 commits April 18, 2026 18:57
The MCP server entry in the session/new mcpServers array included a
"type": "stdio" field. The claude-agent-acp handler branches on the
presence of a "type" key: with it, the entry is treated as HTTP/SSE
and only url/headers are read (command is ignored, url is undefined);
without it, the entry is treated as stdio and command/args/env are
read correctly.

Removing the "type" field causes the ACP agent to take the stdio
branch and successfully launch kate-mcp-server, fixing the Internal
error -32603 "Query closed before response received" that prevented
sessions from being created.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Builds from molove/kate-code which includes the fix for the
kate-mcp-server stdio type field issue. Revert this line once
the fix is merged upstream into undefinedopcode/kate-code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r fixes

- Named session picker on connect with resume-by-ID support
- Session notes via katecode_set_session_note MCP tool
- Flag concern button on permission requests
- Material Symbols variable font integration
- Fix diff text invisible: propagate foreground colours to CSS variables
- Fix terminal output invisible: derive terminal-fg from code background
  lightness rather than KDE UI theme (fixes mismatch between Kate editor
  theme and KDE system theme)
- Add session picker, concern flag, and MCP tool handlers to D-Bus service

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Exposes the current kate-code session ID via a new MCP tool so that
Claude can retrieve it programmatically rather than parsing the
"Connected! Session ID:" system message.

This makes it straightforward to call katecode_set_session_note at the
end of any session without requiring the user to copy/paste the ID.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude-code-acp is a symlink created by the AUR package pointing to
claude-agent-acp. On a fresh install without the AUR symlink, the
plugin would fail to connect. Use the canonical binary name instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- System install requires --prefix /usr on Arch (cmake defaults to /usr/local)
- Update all claude-code-acp binary references to claude-agent-acp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MCP tool parameters (old_string/new_string) travel via the MCP protocol
directly to kate-mcp-server, not through ACP's rawInput field, so live
tool_call events always had rawInput={} and no diff data to display.

Fix for mcp__kate__katecode_edit: EditorDBusService emits editApplied()
after a successful D-Bus edit. ChatWidget queues this data and injects
it into the diff display when tool_call_update arrives.

Fix for built-in Edit tool: ACPSession captures the old file content
before writing in handleFsWriteTextFile() and emits fsEditApplied(),
which feeds into the same ChatWidget queue.

A new setToolCallDiff() JS function updates the stored tool call's
oldText/newText and re-renders the message, so diffs appear correctly
for both code paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tools

- katecode_read_clipboard: reads current clipboard text via QGuiApplication::clipboard()
- katecode_paste_to_terminal: sends text to Kate's embedded terminal without executing
  (no Enter key) via TerminalInterface, searching the main window widget tree for the
  KonsolePart
- Add KF6::Parts dependency for kde_terminal_interface.h

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant