Skip to content

config: orient_task_aware off on all profiles + --orient/--no-orient CLI flag#343

Merged
FMXExpress merged 2 commits into
mainfrom
claude/orient-cli-flag
Jun 24, 2026
Merged

config: orient_task_aware off on all profiles + --orient/--no-orient CLI flag#343
FMXExpress merged 2 commits into
mainfrom
claude/orient-cli-flag

Conversation

@FMXExpress

Copy link
Copy Markdown
Owner

What

Makes task-aware MEMORY slicing (orient_task_aware, PasClaw.Agent.Orient) off by default on every profile, and adds a per-run CLI flag to toggle it:

pasclaw agent --orient    -m ""   # force task-aware MEMORY slicing on for this run
pasclaw agent --no-orient -m ""   # force whole-file injection (overrides config.json)

Why

#314 flipped OrientTaskAware to on-by-default in TConfig.Create and in the stock / low-token / all-on profiles — but left several places still describing it as off:

  • docs/configuration.md table → false
  • onboarding (PromptOrientTaskAware) → default N, comment "Cfg default off"
  • loop_shaping_defaults_tests → asserted OrientTaskAware False

That inconsistency (only the code default + 3 profiles got flipped, nothing else) strongly suggests the on-flip was unintended. This PR reverts it and makes enabling it an explicit, per-invocation choice — whole-file injection is the long-standing contract, and slicing changes what the model sees, so it shouldn't be silently on.

Changes

Default & serialization (PasClaw.Config.pas)

  • TConfig.Create: OrientTaskAware := False.
  • SaveConfig: emit orient_task_aware only when on (emit-when-on, matching the off default) so fresh configs stay tidy and an opt-in round-trips.

Profiles (PasClaw.Config.Profile.pas)

  • Drop orient_task_aware:true from stock, low-token, and all-on (and therefore max-build, which inherits low-token). No built-in profile enables it. Descriptions updated; stock stays in lockstep with TConfig.Create.

CLI (PasClaw.Cmd.Agent.pas)

  • New TOrientOverride tri-state (ooUnset/ooOn/ooOff); --orient/--no-orient parse into it; applied right after LoadConfig(A.Profile) so the flag overrides whatever config/profile resolved to. Usage text updated. Forwarded automatically by pasclaw build (it passes through agent flags).

Tests

  • config_profile_tests: assert no profile enables orient and the inherit chain keeps it off; the round-trip test now exercises orient as an opt-in (default-off) round-trip.
  • loop_shaping_defaults_tests: was already red on main (config: adopt lean-edit shape for stock defaults + hashline opt-in onboarding #314 reverted vault/web_fetch to off without updating it) — brought fully in line with the actual current TConfig.Create defaults (vault/web off, orient off), so make test is green again.

Docs: configuration.md, memory.md, README.md note the --orient/--no-orient flag and that it's off on every profile.

Verification

  • make all clean.
  • make test-config-profile, make test-loop-shaping-defaults, make test-orient, make test-plan-build-mode all pass (loop-shaping went from red→green).
  • Binary usage now lists [--orient|--no-orient].

🤖 Generated with Claude Code


Generated by Claude Code

claude added 2 commits June 24, 2026 00:24
…CLI flag

PR #314 flipped OrientTaskAware to on-by-default in TConfig.Create and in
the stock/low-token/all-on profiles, but left docs/configuration.md,
onboarding (PromptOrientTaskAware default N), and the loop-shaping test
all describing it as off -- a drift that strongly suggests the flip was
unintended. Revert it to off-by-default everywhere and make it a
per-invocation choice instead:

- TConfig.Create: OrientTaskAware := False; SaveConfig emits the key only
  when on (emit-when-on, since default is now off again).
- Profiles: drop orient_task_aware from stock, low-token, and all-on
  (and thus max-build, which inherits low-token). No profile enables it.
- New `pasclaw agent --orient` / `--no-orient` tri-state override
  (TOrientOverride) applied right after LoadConfig, on top of whatever
  config.json resolved to. --orient is the no-edit way to try task-aware
  MEMORY slicing; --no-orient forces whole-file injection.

Tests: config_profile + loop_shaping_defaults brought in line with the
actual current defaults (loop_shaping was already red on main from #314's
vault/web revert -- now green). orient_task_aware round-trip kept as an
opt-in case. Docs (configuration.md, memory.md, README) note the flag.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGQKz579j1ZnDRwmr6h1V6
@FMXExpress FMXExpress merged commit e723eca into main Jun 24, 2026
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