perf(cli): cache MCP listTools results to avoid redundant RPCs per loop step#7922
Merged
marius-kilocode merged 1 commit intomainfrom Mar 30, 2026
Merged
perf(cli): cache MCP listTools results to avoid redundant RPCs per loop step#7922marius-kilocode merged 1 commit intomainfrom
marius-kilocode merged 1 commit intomainfrom
Conversation
Contributor
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Other Observations (not in diff)No additional issues found outside the diff. Fix these issues in Kilo Cloud Files Reviewed (1 files)
Reviewed by gpt-5.4-20260305 · 317,343 tokens |
…op step MCP.tools() called client.listTools() for every connected server on every agent loop iteration. With multiple servers this added hundreds of milliseconds of overhead per step (measured ~300-750ms for remote servers like Vercel). Cache listTools results in a module-level Map and return them on subsequent calls. The cache is invalidated on: - ToolListChangedNotification from the MCP server - Server add/connect/disconnect - Instance dispose (config change, project switch, shutdown)
77ace42 to
8d9f07b
Compare
chrarnoldus
approved these changes
Mar 30, 2026
imanolmzd-svg
pushed a commit
that referenced
this pull request
Mar 30, 2026
…op step (#7922) MCP.tools() called client.listTools() for every connected server on every agent loop iteration. With multiple servers this added hundreds of milliseconds of overhead per step (measured ~300-750ms for remote servers like Vercel). Cache listTools results in a module-level Map and return them on subsequent calls. The cache is invalidated on: - ToolListChangedNotification from the MCP server - Server add/connect/disconnect - Instance dispose (config change, project switch, shutdown)
imanolmzd-svg
added a commit
that referenced
this pull request
Mar 31, 2026
* feat(vscode): detect sessions in old extension
* feat(vscode): added session types
* feat(cli): add endpoints for inserting a session
* feat(vscode): use session types from sdk for parsing
* feat(kilo-vscode): parsing session project
* feat(vscode): parse legacy session details
* feat(kilo-vscode): refactoring
* feat(vscode): parse legacy session messages
* feat(vscode): parse legacy session parts
* feat(vscode): added testing files and id creation
* feat(vscode): merge tool parts on imported session
* feat(vscode): session message part refactoring
* feat(vscode): cover provider-specific reasoning parts on session migration
* feat(kilo-vscode): handle completion result parts
* feat: type hardening on session migration
* feat(kilo-vscode): create tool part correctly
* feat(kilo-vscode): adjust session part processing
* feat(vscode): persist migrated session in kilo.db
* feat(vscode): add error handling to session migration
* feat(vscode): add directory field to session migration
* feat(kilo-vscode): display completion check on session migration
* feat(vscode): prevent migrating sessions twice
* feat(cli): use correct project id when inserting migrated session
* feat(kilo-vscode): Use correct project id for session migration
* feat(kilo-vscode): load sessions on migration complete
* feat(kilo-vscode): ignore environment details user part when migrating sessions
* feat(cli): create project details following current backend logic
* feat(kilo-vscode): cleaner messages without environment_details parts
* feat(kilo-vscode): refactoring
* feat(kilo-vscode): refactoring and organization
* feat(kilo-vscode): method renaming to improve clarity
* feat(kilo-vscode): added session migration test strategy
* test(kilo-vscode): implement legacy migration unit tests for all migration modules
Replace todo stubs with full test implementations across messages,
parts, tools, reasoning, parser, migrate, project, and session test
files. Add new project.test.ts and session.test.ts covering project
construction, session metadata, and deterministic ID generation.
* style(kilo-vscode): apply prettier formatting across legacy migration source and test files
* fix(legacy-migration): filter out non-user/assistant entries before parsing messages
Exclude system and other non-conversational roles from the conversation
array prior to mapping, ensuring parentID references remain consistent
across imported messages when skipped entries exist.
* refactor(parts): skip part generation for non-conversational message roles
Entries with roles other than user or assistant should not produce
parts, keeping part output consistent with the messages that are
actually imported during legacy migration.
* fix(ids): use semantic kind strings to prevent part ID collisions for reasoning entries
Replace numeric indices with descriptive kind strings ("reasoning",
"provider-reasoning") in extra part ID generation to avoid collisions
between reasoning parts and regular content parts within the same
message.
Introduce `createExtraPartID` to distinguish reasoning-specific IDs
from standard sequential part IDs produced by `createPartID`.
* refactor(session-import): guard against empty worktree in legacy project import
Prevent silent misattribution of migrated sessions by rejecting empty
worktree paths before resolving the project directory. Without this
check, an empty string would fall back to the current process directory,
causing the imported session to be attached to the wrong project.
* perf(cli): cache MCP listTools results to avoid redundant RPCs per loop step (#7922)
MCP.tools() called client.listTools() for every connected server on
every agent loop iteration. With multiple servers this added hundreds
of milliseconds of overhead per step (measured ~300-750ms for remote
servers like Vercel).
Cache listTools results in a module-level Map and return them on
subsequent calls. The cache is invalidated on:
- ToolListChangedNotification from the MCP server
- Server add/connect/disconnect
- Instance dispose (config change, project switch, shutdown)
* fix(agent-manager): add retries to worktree cleanup for macOS .app bundles (#7921)
* chore: hide non-English localization files in GitHub PR diffs
Mark all non-English i18n locale files as linguist-generated=true so
they are collapsed by default in GitHub PR diffs, reducing noise when
reviewing changes that touch translation files.
* feat(vscode): add Browse Marketplace button to MCP settings
Add a "Browse Marketplace" button to the MCP Servers subtab in Agent
Behaviour settings, guiding users to discover and install MCPs from the
marketplace rather than only configuring them manually.
- Add button above the MCP server list that opens the Marketplace panel
- Add openMarketplacePanel webview message type and handler
- Add translations for all 18 supported languages
* fix(vscode): preserve project directory when opening marketplace from settings
Pass the current panel's project directory through to the marketplace
panel so project-scoped MCP installs work correctly in multi-root
workspaces. Without this, the marketplace panel would fall back to
null project directory since there is no active text editor when
clicking from a webview.
* feat(vscode): add Browse Marketplace button to agents and skills tabs
Add the Browse Marketplace button to the Agents and Skills subtabs in
Agent Behaviour settings, matching the existing button in the MCP
Servers subtab. This lets users discover marketplace items from any
of the three configuration tabs.
- Agents tab: added as a ghost button in the header row alongside
Import and Create Mode buttons
- Skills tab: added as a secondary button at the top-right, matching
the MCP tab layout
- Extracted the browse handler to the component scope for reuse
* chore: update kilo-vscode visual regression baselines
* perf(agent-manager): extend slimPart to strip heavy tool metadata for faster session switching (#7927)
Extend slim-metadata.ts to handle apply_patch, multiedit, write, and bash
tools in addition to edit. Previously only edit tool parts had their heavy
metadata stripped before IPC serialization. apply_patch parts carried full
file before/after contents per file, write parts carried the entire written
file, and bash parts carried up to 30KB of output — all serialized on every
session switch.
This reduces session-switch time by ~2x for sessions with many tool calls.
* style(legacy-migration): reformat long reasoning push call for readability
* refactor(legacy-migration): filter non-user/assistant entries before indexing
Move the role filter from inside `parseParts` to `parsePartsFromConversation`
so that message indices are derived only from the filtered list. This ensures
part message IDs stay aligned with the imported messages and skipped entries
(e.g. system role) do not cause index gaps in the generated IDs.
* fix(legacy-migration): add `_migrated_` infix to generated IDs
Prefix all migrated entity IDs (sessions, messages, parts) with a
`_migrated_` segment so they are clearly distinguishable from IDs
produced by the regular runtime. Updates tests to assert the new
prefix format.
* refactor(legacy-migration): consolidate conversation parsing into `parseSession`
Remove the intermediate `createMessages` and `createParts` async
wrappers that each independently read and parsed the conversation
file. The file is now fetched and parsed once in `parseSession`,
with the resulting conversation passed directly to
`parseMessagesFromConversation` and `parsePartsFromConversation`,
eliminating redundant I/O.
* fix(parts-builder): remove `toTextWithinMessage` and use `toText` directly
`toTextWithinMessage` was a duplicate of `toText` with identical
behavior. Replace all call sites with `toText` and delete the
redundant function.
* fix(parts-builder): skip provider-specific reasoning when explicit reasoning entry exists
Guard `isProviderSpecificReasoning` with `!isReasoning` to prevent
duplicate reasoning parts when an entry carries both a `type:
"reasoning"` field and a provider-specific reasoning field (e.g.
`reasoning_content`). The explicit reasoning entry takes precedence.
* test(legacy-migration): add coverage for edge cases in parts and tools parsing
Add unit tests for two previously uncovered scenarios:
- Task block extraction: verify only the content inside `<task>` tags
is kept when text exists outside the legacy task wrapper
- Empty tool result: verify the tool name is used as fallback output
when `tool_result` carries no readable text content
Also replace the dynamic `FileType.Directory` workaround with the
direct `vscode.FileType.Directory` enum reference, and harden
`parseFile` to throw on non-array JSON instead of silently returning
an empty array.
* feat(legacy-migration): remove session migration tracking from global state
Drop the `readSessionsToMigrate` filter and the post-migration
`globalState` flag that tracked which sessions had already been
migrated. Detection now returns all sessions found in global storage
without filtering by prior migration status.
* fix(session-import): skip duplicate session imports and child data
Check for an existing session row before inserting and return a
`skipped: true` flag when the session already exists. The migration
client honours this flag to bypass message and part imports, avoiding
redundant work when migration is re-run.
Replace `onConflictDoUpdate` with `onConflictDoNothing` on the session
insert path to align with the new pre-check behaviour. Propagate the
optional `skipped` field through the result types and generated SDK
types for project, session, message, and part responses.
* refactor(parts-builder): mark legacy system error text parts as ignored
Tag text parts whose content begins with `[ERROR]` with `ignored: true`
and a `legacy-system-error` metadata source. Introduces a new
`isLegacySystemErrorText` utility in `parts-util` to encapsulate the
detection logic.
* feat(parts-util): extract feedback text from tool_result content into visible parts
Parse `<feedback>` tags embedded in `tool_result` content and emit a
dedicated text part so user feedback is surfaced as a visible message
rather than buried inside tool result data.
Introduces `getFeedbackText` utility to extract and trim the inner
content of `<feedback>` blocks from arbitrary input.
* fix: formatting
---------
Co-authored-by: Marius <marius@kilocode.ai>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: Mark IJbema <mark@kilocode.ai>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
imanolmzd-svg
added a commit
that referenced
this pull request
Mar 31, 2026
* feat(vscode): detect sessions in old extension
* feat(vscode): added session types
* feat(cli): add endpoints for inserting a session
* feat(vscode): use session types from sdk for parsing
* feat(kilo-vscode): parsing session project
* feat(vscode): parse legacy session details
* feat(kilo-vscode): refactoring
* feat(vscode): parse legacy session messages
* feat(vscode): parse legacy session parts
* feat(vscode): added testing files and id creation
* feat(vscode): merge tool parts on imported session
* feat(vscode): session message part refactoring
* feat(vscode): cover provider-specific reasoning parts on session migration
* feat(kilo-vscode): handle completion result parts
* feat: type hardening on session migration
* feat(kilo-vscode): create tool part correctly
* feat(kilo-vscode): adjust session part processing
* feat(vscode): persist migrated session in kilo.db
* feat(vscode): add error handling to session migration
* feat(vscode): add directory field to session migration
* feat(kilo-vscode): display completion check on session migration
* feat(vscode): prevent migrating sessions twice
* feat(cli): use correct project id when inserting migrated session
* feat(kilo-vscode): Use correct project id for session migration
* feat(kilo-vscode): load sessions on migration complete
* feat(kilo-vscode): ignore environment details user part when migrating sessions
* feat(cli): create project details following current backend logic
* feat(kilo-vscode): cleaner messages without environment_details parts
* feat(kilo-vscode): refactoring
* feat(kilo-vscode): refactoring and organization
* feat(kilo-vscode): method renaming to improve clarity
* feat(kilo-vscode): added session migration test strategy
* test(kilo-vscode): implement legacy migration unit tests for all migration modules
Replace todo stubs with full test implementations across messages,
parts, tools, reasoning, parser, migrate, project, and session test
files. Add new project.test.ts and session.test.ts covering project
construction, session metadata, and deterministic ID generation.
* style(kilo-vscode): apply prettier formatting across legacy migration source and test files
* fix(legacy-migration): filter out non-user/assistant entries before parsing messages
Exclude system and other non-conversational roles from the conversation
array prior to mapping, ensuring parentID references remain consistent
across imported messages when skipped entries exist.
* refactor(parts): skip part generation for non-conversational message roles
Entries with roles other than user or assistant should not produce
parts, keeping part output consistent with the messages that are
actually imported during legacy migration.
* fix(ids): use semantic kind strings to prevent part ID collisions for reasoning entries
Replace numeric indices with descriptive kind strings ("reasoning",
"provider-reasoning") in extra part ID generation to avoid collisions
between reasoning parts and regular content parts within the same
message.
Introduce `createExtraPartID` to distinguish reasoning-specific IDs
from standard sequential part IDs produced by `createPartID`.
* refactor(session-import): guard against empty worktree in legacy project import
Prevent silent misattribution of migrated sessions by rejecting empty
worktree paths before resolving the project directory. Without this
check, an empty string would fall back to the current process directory,
causing the imported session to be attached to the wrong project.
* perf(cli): cache MCP listTools results to avoid redundant RPCs per loop step (#7922)
MCP.tools() called client.listTools() for every connected server on
every agent loop iteration. With multiple servers this added hundreds
of milliseconds of overhead per step (measured ~300-750ms for remote
servers like Vercel).
Cache listTools results in a module-level Map and return them on
subsequent calls. The cache is invalidated on:
- ToolListChangedNotification from the MCP server
- Server add/connect/disconnect
- Instance dispose (config change, project switch, shutdown)
* fix(agent-manager): add retries to worktree cleanup for macOS .app bundles (#7921)
* chore: hide non-English localization files in GitHub PR diffs
Mark all non-English i18n locale files as linguist-generated=true so
they are collapsed by default in GitHub PR diffs, reducing noise when
reviewing changes that touch translation files.
* feat(vscode): add Browse Marketplace button to MCP settings
Add a "Browse Marketplace" button to the MCP Servers subtab in Agent
Behaviour settings, guiding users to discover and install MCPs from the
marketplace rather than only configuring them manually.
- Add button above the MCP server list that opens the Marketplace panel
- Add openMarketplacePanel webview message type and handler
- Add translations for all 18 supported languages
* fix(vscode): preserve project directory when opening marketplace from settings
Pass the current panel's project directory through to the marketplace
panel so project-scoped MCP installs work correctly in multi-root
workspaces. Without this, the marketplace panel would fall back to
null project directory since there is no active text editor when
clicking from a webview.
* feat(vscode): add Browse Marketplace button to agents and skills tabs
Add the Browse Marketplace button to the Agents and Skills subtabs in
Agent Behaviour settings, matching the existing button in the MCP
Servers subtab. This lets users discover marketplace items from any
of the three configuration tabs.
- Agents tab: added as a ghost button in the header row alongside
Import and Create Mode buttons
- Skills tab: added as a secondary button at the top-right, matching
the MCP tab layout
- Extracted the browse handler to the component scope for reuse
* chore: update kilo-vscode visual regression baselines
* perf(agent-manager): extend slimPart to strip heavy tool metadata for faster session switching (#7927)
Extend slim-metadata.ts to handle apply_patch, multiedit, write, and bash
tools in addition to edit. Previously only edit tool parts had their heavy
metadata stripped before IPC serialization. apply_patch parts carried full
file before/after contents per file, write parts carried the entire written
file, and bash parts carried up to 30KB of output — all serialized on every
session switch.
This reduces session-switch time by ~2x for sessions with many tool calls.
* style(legacy-migration): reformat long reasoning push call for readability
* refactor(legacy-migration): filter non-user/assistant entries before indexing
Move the role filter from inside `parseParts` to `parsePartsFromConversation`
so that message indices are derived only from the filtered list. This ensures
part message IDs stay aligned with the imported messages and skipped entries
(e.g. system role) do not cause index gaps in the generated IDs.
* fix(legacy-migration): add `_migrated_` infix to generated IDs
Prefix all migrated entity IDs (sessions, messages, parts) with a
`_migrated_` segment so they are clearly distinguishable from IDs
produced by the regular runtime. Updates tests to assert the new
prefix format.
* refactor(legacy-migration): consolidate conversation parsing into `parseSession`
Remove the intermediate `createMessages` and `createParts` async
wrappers that each independently read and parsed the conversation
file. The file is now fetched and parsed once in `parseSession`,
with the resulting conversation passed directly to
`parseMessagesFromConversation` and `parsePartsFromConversation`,
eliminating redundant I/O.
* fix(parts-builder): remove `toTextWithinMessage` and use `toText` directly
`toTextWithinMessage` was a duplicate of `toText` with identical
behavior. Replace all call sites with `toText` and delete the
redundant function.
* fix(parts-builder): skip provider-specific reasoning when explicit reasoning entry exists
Guard `isProviderSpecificReasoning` with `!isReasoning` to prevent
duplicate reasoning parts when an entry carries both a `type:
"reasoning"` field and a provider-specific reasoning field (e.g.
`reasoning_content`). The explicit reasoning entry takes precedence.
* test(legacy-migration): add coverage for edge cases in parts and tools parsing
Add unit tests for two previously uncovered scenarios:
- Task block extraction: verify only the content inside `<task>` tags
is kept when text exists outside the legacy task wrapper
- Empty tool result: verify the tool name is used as fallback output
when `tool_result` carries no readable text content
Also replace the dynamic `FileType.Directory` workaround with the
direct `vscode.FileType.Directory` enum reference, and harden
`parseFile` to throw on non-array JSON instead of silently returning
an empty array.
* fix(migration): require all items to succeed before marking migration complete
Tighten the completion condition so migration is only marked "completed"
when every item succeeds, not just when at least one does. Introduce a
dedicated "error" phase in the wizard UI so partial failures are surfaced
clearly rather than silently collapsed into the "done" state.
- `handleStartLegacyMigration`: gate `setMigrationStatus("completed")` on
`!failed && success` instead of `success` alone
- `migrate`: propagate the actual `Error.message` from a failed session
migration instead of a generic fallback string
- `MigrationWizard`: add `"error"` phase, show per-group error messages
inline, add a "Continue" button to proceed past the error screen, and
trigger `loadSessions` on completion
- `migration.css`: add `.migration-wizard__error-text` style using
`--vscode-errorForeground`
* fix(migration): defer disposeGlobal and loadSessions until after error check
Move `disposeGlobal` call inside the success-only branch so the
extension is not torn down when migration partially fails. Similarly,
defer the `loadSessions` webview message to the "Continue" button on
the error screen so sessions are only reloaded after the user
acknowledges the failure.
- `handleStartLegacyMigration`: move `disposeGlobal` inside the
`!failed && success` guard to avoid disposing on partial failure
- `MigrationWizard`: skip `loadSessions` post-message when errors are
present; send it from the "Continue" button instead
* refactor(migration): extract MigrationError component and error selector utilities
Replace inline error text rendering in MigrationWizard with a dedicated
MigrationError component that displays a structured error box with a
copy-to-clipboard action. Extract error parsing logic into reusable
selector functions in a separate module.
- Add `MigrationError` component with header, detail text, and
preformatted error code block; copy button writes error to clipboard
and shows a success toast
- Add `error-selectors.ts` with `getMigrationError` (strips error type
prefix), `getSessionMigrationError`, and `getSessionMigrationErrorDetail`
- Replace `<Show>` + raw `error-text` div in MigrationWizard sessions
row with `<MigrationError>` using the new selector-derived signals
* feat(migration): introduce view-model module for migration state derivations
Extract `ProgressEntry` type and inline derived-state functions from
`MigrationWizard` into a dedicated `migration-view-model.ts` module,
and update call sites to use the new public API.
- Add `migration-view-model.ts` exporting `ProgressEntry`, `getGroupStatus`,
`getGroupMessage`, `getSuccessCount`, `getTotalCount`,
`getCurrentSessionError`, and `getCurrentSessionErrorDetail`
- Remove duplicated logic from `MigrationWizard` and delegate to the
new module, keeping the component focused on rendering concerns
- Consolidate the `getGroupMessage` resolver used by error selectors so
it is derived from a single source of truth
* refactor(legacy-migration): split shared types into dedicated modules
Move `MigrationResultItem` out of `legacy-types.ts` into a new
`migration-types.ts` module, and introduce a `MigrationFailure`
typed error structure in `errors/migration-failure.ts`.
- Add `migration-types.ts` exporting `MigrationResultItem` to separate
runtime migration result types from legacy configuration types
- Add `errors/migration-failure.ts` defining `MigrationFailure` and
`MigrationFailureKind` for structured error classification
- Remove `MigrationResultItem` from `legacy-types.ts` to eliminate
the coupling between legacy config shapes and migration output types
- Update `migration-service.ts` import to reference the new module
* feat(errors): add migration error normalization utilities
Introduce `migration-error.ts` with `normalizeMigrationError` and
`getMigrationErrorMessage` to convert arbitrary thrown values into
typed `MigrationFailure` objects.
- Classify errors by kind (`http`, `sdk`, `generic`, `unknown`) based
on the presence of `status`, `data`, `body`, or `Error` instance
- Extract human-readable message from `message`, `body`, `data`, or
raw string fallback, defaulting to "Unknown migration error"
- Compose a `detail` string from status code, body, and data fields
when they differ from the primary message
- Propagate nested `cause` text for additional diagnostic context
* refactor(migrate): wrap migrate return in typed Result and normalize errors
* chore(migration): inline view-model helpers and remove extracted modules
Remove the separately extracted `migration-view-model.ts`, `error-selectors.ts`,
`MigrationError.tsx`, and `MigrationFailure` type in favour of inlined logic
directly in `MigrationWizard` and a simplified `getMigrationErrorMessage`
utility.
- Delete `MigrationFailure` type and `normalizeMigrationError`; replace with
a flat `getMigrationErrorMessage` function
- Inline `ProgressEntry` interface, group-status logic, and count helpers
into `MigrationWizard`
- Replace `MigrationError` component with inline clipboard copy handler
using `showToast`
- Simplify session migrate result shape: drop structured `error` field,
surface plain `message` string instead
* feat(i18n): add migration error copy-to-clipboard translations across all locales
* style(migration): add error box and copy button styles for migration wizard
Add CSS for the error display box and copy-to-clipboard button in the
migration wizard, including layout, typography, theming via VSCode CSS
variables, hover/active/focus-visible states, and high-contrast border
overrides. Also align wizard items to flex-start for multi-line content.
* fix: merge conflict issues resolved
* fix: formatting
* i18n(migration): add localized strings for session migration progress and errors
* fix:formatting
* feat(session-import): remove temporary test error from project import
* fix(vscode): remove unused migration progress translations
* fix: formatting
* fix(migration): track individual session progress instead of grouping all sessions
Replace the single "Chat sessions" progress item with per-session
tracking, passing the session ID directly to onProgress calls and
mapping each session to its own pending item in the wizard's progress
list.
* fix: formatting
---------
Co-authored-by: Marius <marius@kilocode.ai>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: Mark IJbema <mark@kilocode.ai>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
nickorlabs
added a commit
to outlawresearchlabs/arcx-agent
that referenced
this pull request
Apr 5, 2026
Manually applied from Kilo Code v7.0-v7.1 upstream: Tier 1 (critical fixes + features): - Prevent infinite loop on empty tool-calls (Kilo-Org#7756) - Handle tool-call without prior tool-input-start event - Improved subagent permissions handling (Kilo-Org#7348) - Isolate checkpoints per worktree (Kilo-Org#7690) - Recover from 413 via auto-compaction (#14707) - Filter tool diagnostics to edited files only (-50-77% payload) (Kilo-Org#6241) Tier 2 (nice to have): - Cache MCP listTools results to avoid redundant RPCs (Kilo-Org#7922) - Inject environment_details ephemerally with ISO 8601 timestamps - Prevent unbounded log file growth with size-based rotation (Kilo-Org#8136) - Kill orphaned MCP child processes on shutdown (#15516) Tier 3 (workspace/platform): - Rework workspace integration and adaptor interface (#15895) - Basic remote workspace support (#15120) - Add workspace-serve command (experimental) (#14960) - Workspace context and SSE infrastructure
4 tasks
nickorlabs
added a commit
to outlawresearchlabs/arcx-agent
that referenced
this pull request
Apr 5, 2026
* fix(cli): prevent infinite loop on empty tool-calls (Kilo-Org#7756) * fix(cli): handle tool-call without prior tool-input-start event * feat: cherry-pick upstream v7 enhancements (tiers 1-3) Manually applied from Kilo Code v7.0-v7.1 upstream: Tier 1 (critical fixes + features): - Prevent infinite loop on empty tool-calls (Kilo-Org#7756) - Handle tool-call without prior tool-input-start event - Improved subagent permissions handling (Kilo-Org#7348) - Isolate checkpoints per worktree (Kilo-Org#7690) - Recover from 413 via auto-compaction (#14707) - Filter tool diagnostics to edited files only (-50-77% payload) (Kilo-Org#6241) Tier 2 (nice to have): - Cache MCP listTools results to avoid redundant RPCs (Kilo-Org#7922) - Inject environment_details ephemerally with ISO 8601 timestamps - Prevent unbounded log file growth with size-based rotation (Kilo-Org#8136) - Kill orphaned MCP child processes on shutdown (#15516) Tier 3 (workspace/platform): - Rework workspace integration and adaptor interface (#15895) - Basic remote workspace support (#15120) - Add workspace-serve command (experimental) (#14960) - Workspace context and SSE infrastructure * fix: remaining @kilocode imports → @arcx-agent across entire codebase * fix: restore plugin/src/index.ts (emptied by sed) * fix: final sweep — all @kilocode/ subpath imports → @arcx-agent/ * fix: typecheck errors — use fs.writeFile in snapshot, install rotating-file-stream --------- Co-authored-by: nickmaxxsure <130688404+nickmaxxsure@users.noreply.github.com>
nickorlabs
added a commit
to outlawresearchlabs/arcx-agent
that referenced
this pull request
Apr 5, 2026
…v7 cherry-picks * rebrand: kilo code → arcx agent, strip auth + telemetry, configure providers - Rename all packages from @kilocode/* to @arcx-agent/* - Rename kilo-vscode → arcx-agent-vscode, kilo-ui → arcx-ui, etc. - Update all VS Code command IDs (kilo-code.new.* → arcx-agent.*) - Update publisher to outlawresearchlabs - Strip Kilo Gateway device auth (delete auth flows, stub API endpoints) - Neuter Kilo telemetry (keep OTEL scaffolding, all sends are no-ops) - Remove Kilo provider from BUNDLED_PROVIDERS and INTERNAL_PLUGINS - Configure Ollama as default provider (192.168.1.252:11434) - Add Anthropic + OpenAI as BYOK options - Replace kilo.ai URLs with TODOs - Preserve all kilocode_change upstream markers * fix: Ollama URL to Docker DNS, add MiniMax BYOK provider - Ollama baseURL: 192.168.1.252:11434 → ollama:11434 (Docker service) - Add MiniMax as BYOK provider (api.minimaxi.chat, M1 + M2.7 models) - Add MiniMax to popular providers list * Cherry-pick upstream v7 enhancements (tiers 1-3) * fix(cli): prevent infinite loop on empty tool-calls (Kilo-Org#7756) * fix(cli): handle tool-call without prior tool-input-start event * feat: cherry-pick upstream v7 enhancements (tiers 1-3) Manually applied from Kilo Code v7.0-v7.1 upstream: Tier 1 (critical fixes + features): - Prevent infinite loop on empty tool-calls (Kilo-Org#7756) - Handle tool-call without prior tool-input-start event - Improved subagent permissions handling (Kilo-Org#7348) - Isolate checkpoints per worktree (Kilo-Org#7690) - Recover from 413 via auto-compaction (#14707) - Filter tool diagnostics to edited files only (-50-77% payload) (Kilo-Org#6241) Tier 2 (nice to have): - Cache MCP listTools results to avoid redundant RPCs (Kilo-Org#7922) - Inject environment_details ephemerally with ISO 8601 timestamps - Prevent unbounded log file growth with size-based rotation (Kilo-Org#8136) - Kill orphaned MCP child processes on shutdown (#15516) Tier 3 (workspace/platform): - Rework workspace integration and adaptor interface (#15895) - Basic remote workspace support (#15120) - Add workspace-serve command (experimental) (#14960) - Workspace context and SSE infrastructure * fix: remaining @kilocode imports → @arcx-agent across entire codebase * fix: restore plugin/src/index.ts (emptied by sed) * fix: final sweep — all @kilocode/ subpath imports → @arcx-agent/ * fix: typecheck errors — use fs.writeFile in snapshot, install rotating-file-stream --------- Co-authored-by: nickmaxxsure <130688404+nickmaxxsure@users.noreply.github.com> --------- Co-authored-by: nickmaxxsure <130688404+nickmaxxsure@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
listTools()results per server so they aren't re-fetched on every agent loop iterationclient.listTools()for all connected MCP servers — adding 300-750ms overhead per step for remote servers (e.g. Vercel MCP)ToolListChangedNotification, server add/connect/disconnect, and instance dispose (config change/project switch)This optimization is most likely missing on the upstream. Because of the impact (but small blast radius) I suggest we fix it here directly.
Measured impact (3 MCP servers)
Profiled in the extension:
MCP.tools()per step (cached)