continue icon indicating copy to clipboard operation
continue copied to clipboard

Failure to parse "rules" block with custom config and using CLI

Open ahungry opened this issue 11 months ago • 2 comments

Before submitting your bug report

Relevant environment info

- OS: arch linux (and Ubuntu)
- Continue version: 1.5.26
- IDE version: CLI
- Model: N/A
- config:
  
name: Rules
version: 1.0.0
schema: v1

rules:
  - "simple string rule"
  

Description

I am attempting to do a CLI test via:

echo test | cn -p --readonly --config ~/continue.yaml --model fake

and the parser continually breaks (adding invisible rules I suppose?) with this error:

❯ echo test | cn -p --readonly --config ~/continue.yaml --model fake
{"status":"error","message":"Failed to parse config: rules.1: Invalid input"}

Which doesn't make sense, as I don't have a "1" rule, as it seems to count from 0 (it is always 1 higher than my total rule count - if I have 3 rules, it will complain about rules.3).

This sample config is a minimal reproduction, with model blocks removed for privacy (local ollama on an internal IP was in the original, but is irrelevant here).

If I include the --rule flag it "works" (as in, it doesn't show this error), however I never get a response back from the remote.

If someone could help guide me into the cn equivalent of a single read only interaction via the CLI (using a non-default model option), that would be appreciated - I would expect it to print a response to my echo input (and I would define, in the models block, my apiBase:, plus the name/provider/model values).

To reproduce

See description

Log output

See description

ahungry avatar Dec 16 '25 19:12 ahungry

Related Issues

Found several related issues:

Rules parsing:

  • #8885 - Some rules are treated as prompts
  • #6076 - Incorrect docs for rules and prompts

CLI-specific issues:

  • #7327 - [Continue CLI] Fatal error: Cannot read properties of undefined (reading 'startsWith')
  • #7658 - Ollama apiBase endpoint differs from VSCode to "cn"
  • #8643 - Tool calling no longer works in the CLI

Config parsing:

  • #6339 - Failed to parse config (workspace path in WSL2)

continue avatar Dec 16 '25 19:12 continue

I think you will need to have a uses: <link-to-rule-md-file> or hub-block

It is better to have rule.md file as they are automatically picked up when in the codebase or inside ~/.continue folder

more on this here: https://docs.continue.dev/customize/deep-dives/rules

Also you get the parsing error because the parser expects a uses syntax inside rules block.

uinstinct avatar Jan 23 '26 06:01 uinstinct