Skip to content

mcp-dashboard loads history, cron and mcp_core at start-up and never uses them #23053

Closed

Description

@Pearcekieser

Existing issues

  • I searched open issues and this is not already reported.

KiroCrew version

main at 3d6cda4

Release channel

Not sure

How is it installed?

Source checkout

Platform

Linux

What happened

Every kirocrew mcp-dashboard process loads about 1150 modules and 67 MiB of private memory before it reads its first request, even when nothing ever calls it. Most of that is application code the dashboard server does not use at start-up: history, knowledge, skills, messaging, the cron service, the app bridges and every app manager module.

This matters when many copies run. A Codex thread starts every server in the operator's ~/.codex/config.toml, so an operator who lists kirocrew mcp-dashboard there gets one full copy per Codex thread. Codex-acp's title threads start their own copy and never call it (agentclientprotocol/codex-acp#629 and #661). One host had 29 direct dashboard helpers, 3.81 GiB RSS between them.

Two import chains carry the cost:

  1. The slim start calls prime_extension_config_keys(), which imports kiro_crew.apps.manager. kiro_crew/apps/__init__.py imports apps.bridges and the manager facade eagerly, and the bridges import history, cron and sessions. That adds 520 modules, about 30 MiB and 0.66 s.
  2. kiro_crew.mcp_tools.table and kiro_crew.mcp_tools.dashboard_client import kiro_crew.mcp_core at module scope, but use it only when a tool is called. mcp_core loads history, knowledge and skills.

Steps to reproduce

Run this from a checkout, with a throwaway home:

HOME=$(mktemp -d) KIROCREW_HOME=$HOME/home python -B -c "
from kiro_crew.mcp_entry import slim_server; slim_server(['mcp-dashboard'])
import sys; print(len(sys.modules), [l for l in open('/proc/self/status') if l.startswith('RssAnon')])
print([m for m in ('kiro_crew.mcp_core','kiro_crew.history','kiro_crew.apps.bridges') if m in sys.modules])"

On main it prints about 1150 modules, about 66 MiB RssAnon, and all three modules.

Anything else

This is start-up cost, not a leak. The full CLI import is not involved, because kirocrew mcp-dashboard already starts through kiro_crew.mcp_entry.

Activity

  1. added
    tier:T1Bug: behaviour does not match intent; fix keeps the design
    on Oct 22, 2026
  2. KiroCrewCaptain commented on Oct 22, 2026

    @KiroCrewCaptain
    Collaborator

    Thanks for the report. This issue has been triaged by Crew Captain and will be assigned to a maintainer, who will follow up here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tier:T1Bug: behaviour does not match intent; fix keeps the design

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions