You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add --no-context-files (-nc) flag to skip AGENTS.md / CLAUDE.md loading
Summary
Add a CLI flag that disables automatic loading of AGENTS.md / CLAUDE.md / JCODE.md context files at session start. Useful for: scripts that want a clean baseline, evaluations, reproducing user-reported bugs without their local context, and CI smoke tests.
Today every session inherits whatever AGENTS.md chain the cwd produces. Reproducing a bug means temporarily renaming files — error-prone.
Required for sound benchmarks of "core jcode behavior" without project-specific overrides.
Small, isolated change with no behavioral impact when not set.
Current state in jcode
jcode loads AGENTS.md automatically (this very repo's AGENTS.md is consumed every session). No flag turns it off.
Grep finds no no_context_files, no-context-files, skip_agents_md.
Implementation checklist
1. CLI flag
Add a global flag in src/cli/args.rs:
/// Skip loading AGENTS.md / CLAUDE.md / JCODE.md context files for this session.#[arg(long = "no-context-files", short = 'n', global = true)]pub(crate) no_context_files:bool,
(Choose a non-conflicting short alias; -nc directly is two chars, so prefer the long form.)
Plumb through to the existing context loader (src/prompt.rs and/or wherever AGENTS.md is consumed).
2. Env var
Honor JCODE_NO_CONTEXT_FILES=1 as an alternate path for scripts.
3. Settings
Add an loadContextFiles: bool = true setting in the user/project config so it can be permanently off in CI environments.
4. UX
When skipped, log a single line at session start: Context files disabled (--no-context-files). This is critical so users don't get confused why behavior changed.
Testing
Unit
With the flag set, the context-file loader returns an empty list even when fixture AGENTS.md is present.
Env var path and CLI path both work; CLI overrides settings.
Manual smoke
jcode --no-context-files run "What's in AGENTS.md?" — agent has no auto-loaded knowledge of it.
Acceptance criteria
Flag works for jcode, jcode run, jcode serve/connect.
Documented in --help and README.md.
Single-line log entry confirms the flag took effect.
Key blocking finding: the current PR adds the --no-context-files field to Args but never reads it — the actual gating is done via env vars. The CLI flag is therefore a no-op. See the review comment for the minimal fix (translate the flag → env var in cli/startup.rs, the way args.trace is handled today).
Add
--no-context-files(-nc) flag to skip AGENTS.md / CLAUDE.md loadingSummary
Add a CLI flag that disables automatic loading of
AGENTS.md/CLAUDE.md/JCODE.mdcontext files at session start. Useful for: scripts that want a clean baseline, evaluations, reproducing user-reported bugs without their local context, and CI smoke tests.Reference: pi
--no-context-files/-nc.Why
AGENTS.mdchain the cwd produces. Reproducing a bug means temporarily renaming files — error-prone.Current state in jcode
AGENTS.mdautomatically (this very repo'sAGENTS.mdis consumed every session). No flag turns it off.no_context_files,no-context-files,skip_agents_md.Implementation checklist
1. CLI flag
src/cli/args.rs:-ncdirectly is two chars, so prefer the long form.)src/prompt.rsand/or wherever AGENTS.md is consumed).2. Env var
JCODE_NO_CONTEXT_FILES=1as an alternate path for scripts.3. Settings
loadContextFiles: bool = truesetting in the user/project config so it can be permanently off in CI environments.4. UX
Context files disabled (--no-context-files). This is critical so users don't get confused why behavior changed.Testing
Unit
Manual smoke
jcode --no-context-files run "What's in AGENTS.md?"— agent has no auto-loaded knowledge of it.Acceptance criteria
jcode,jcode run,jcode serve/connect.--helpandREADME.md.References
--no-context-files.Implementation notes addendum (Devin gap-analysis pass, 2026-05-21)
Status
--no-context-filesfield toArgsbut never reads it — the actual gating is done via env vars. The CLI flag is therefore a no-op. See the review comment for the minimal fix (translate the flag → env var incli/startup.rs, the wayargs.traceis handled today).Verified jcode code paths
src/cli/args.rs(already has the field as of PR feat(cli): add --no-context-files flag to skip AGENTS.md loading #21).src/cli/startup.rsparse_and_prepare_args()— see howargs.traceis translated toJCODE_TRACE.load_agents_md_files_from_dir()insrc/prompt.rs.~/.jcode/config.tomlviasrc/config.rs.Acceptance criteria (carry-over from issue #9 original spec; restated for clarity)
--no-context-filesandJCODE_NO_CONTEXT_FILES=1work (CLI flag overrides env which overrides settings).Context files disabled (--no-context-files)is emitted on session start when active.loadContextFiles: bool = true.--no-context-filesworks forjcode,jcode run,jcode serve/connect.--helpupdated.Cross-references
/settingsUI for config inspection and edits #7/settings—loadContextFilesis a field the settings UI should expose.