Skip to content

feat(cli): Add maxConcurrentFileReads configuration support#4996

Merged
marius-kilocode merged 1 commit intomainfrom
schaltwerk/2-add-maxconcurrentfilereads-to
Jan 13, 2026
Merged

feat(cli): Add maxConcurrentFileReads configuration support#4996
marius-kilocode merged 1 commit intomainfrom
schaltwerk/2-add-maxconcurrentfilereads-to

Conversation

@marius-kilocode
Copy link
Collaborator

@marius-kilocode marius-kilocode commented Jan 13, 2026

Summary

Adds support for maxConcurrentFileReads configuration in the CLI, matching the extension's behavior from the recent Roo merge.

image

Changes

Core Implementation

  • packages/core-schemas/src/config/cli-config.ts: Added DEFAULT_MAX_CONCURRENT_FILE_READS = 5 constant and updated Zod schema to use it
  • cli/src/config/mapper.ts: Import constant from @kilocode/core-schemas and use it for default value mapping
  • cli/src/host/ExtensionHost.ts: Syncs the setting to the extension via updateSettings message
  • cli/src/config/schema.json: JSON schema with default: 5, minimum: 1

Documentation

  • cli/README.md: Added "Context Management Configuration" section explaining the option

Testing

  • All 1725 CLI tests pass
  • Existing tests in cli/src/config/__tests__/mapper.test.ts cover the mapping behavior

Configuration

{
  "maxConcurrentFileReads": 5
}
  • Default: 5 (matches extension)
  • Minimum: 1 (effectively disables multi-file reads)
  • Effect: Limits files per read_file tool request; AI is informed of this limit in its system prompt

Architecture Notes

The constant is defined in @kilocode/core-schemas which is a CLI-specific package, keeping the implementation CLI-specific while maintaining a single source of truth for the default value.

@changeset-bot
Copy link

changeset-bot bot commented Jan 13, 2026

🦋 Changeset detected

Latest commit: d278dd8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kilocode/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@marius-kilocode marius-kilocode requested a review from a team January 13, 2026 17:21
@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 13, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds maxConcurrentFileReads configuration support to the CLI. The implementation is clean and well-structured:

  • Schema definition in packages/core-schemas/src/config/cli-config.ts with proper Zod validation (z.number().min(1).default(5).optional())
  • Default constant DEFAULT_MAX_CONCURRENT_FILE_READS = 5 exported for reuse
  • Config mapping in cli/src/config/mapper.ts correctly applies the default when not specified
  • Settings synchronization in cli/src/host/ExtensionHost.ts properly sends the setting to the extension
  • JSON schema updated in cli/src/config/schema.json for config file validation
  • Documentation added to cli/README.md explaining the configuration option
  • Test coverage added in cli/src/config/__tests__/mapper.test.ts covering default value, custom value, and minimum value (1) scenarios

The code follows existing patterns in the codebase and the changeset is properly formatted.

Files Reviewed (7 files)
  • .changeset/cli-max-concurrent-file-reads.md
  • cli/README.md
  • cli/src/config/__tests__/mapper.test.ts
  • cli/src/config/mapper.ts
  • cli/src/config/schema.json
  • cli/src/host/ExtensionHost.ts
  • packages/core-schemas/src/config/cli-config.ts

@marius-kilocode marius-kilocode enabled auto-merge (squash) January 13, 2026 17:22
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.

2 participants