Skip to content

Bug: concore stop can kill unrelated processes (false positive pattern matching) #623

Open

Description

@Somya-jain0811

Description

concore stop uses broad substring matching to identify processes to kill. This matches any process whose command line contains the word concore - including editors, git operations, IDEs, and other tools that happen to have concore files open.

Steps to Reproduce

  1. Open a concore file in VS Code: code concore/README.md
  2. Run concore stop
  3. VS Code gets killed because its cmdline contains concore

Other false positives:

  • git -C concore pull
  • grep -r concore ./src
  • vim concore/concore_base.py
  • notepad.exe C:\repos\concore\concore.py

Expected Behavior

concore stop should only kill actual concore study processes, not editors, git, or other tools that happen to reference concore files.

Affected Files

  • concore_cli/commands/stop.py (L24-L32)
  • concore_cli/commands/status.py (same detection logic)

Proposed Fix

Replace the broad substring check with strict multi-tier detection:

  1. PID registry - trust concorekill_pids.txt written at study startup
  2. concorekill.bat - only spawned by concore itself
  3. Regex matching - only match actual concore executions
  4. CLI token matching - match concore stop, concore build, etc.
  5. cwd marker files - check for concore.iport + concore.py in working directory

Status

PR already opened: #622

Activity

  1. github-actions commented on Oct 29, 2026

    @github-actions

    👋 Welcome to the CONTROL-CORE Project, @Somya-jain0811! Thank you for opening your first issue in concore.
    We appreciate your contribution to the organization and will review it as soon as possible.

    Before we get started, please check out these resources:

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions