UAT: agents project context set stores ACMS config globally instead of per-view — ACMS options not isolated per phase view #5586

Open
opened 2026-04-09 07:40:42 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Context Assembly Pipeline — agents project context set command

Severity: Critical (milestone-blocking — v3.4.0 deliverable #1: "Context policies configurable with view-specific settings")

What Was Tested

Code-level analysis of src/cleveragents/cli/commands/project_context.py against the specification's JSON schema for context view configuration (spec §35304–§35441).

Expected Behavior (from spec)

The spec's JSON schema for context view configuration (lines 35304–35441) defines hot_max_tokens, warm_max_decisions, cold_max_decisions, query_limit, strategy, default_breadth, default_depth, depth_gradient, skeleton_ratio, temporal_scope, and auto_refresh as per-view settings. Each view (strategize, execute, apply, default) should have its own independent ACMS configuration.

For example:

agents project context set --view strategize --hot-max-tokens 12000 local/api-service
agents project context set --view execute --hot-max-tokens 4000 local/api-service

Should result in strategize view having hot_max_tokens=12000 and execute view having hot_max_tokens=4000.

Actual Behavior (from code)

In src/cleveragents/cli/commands/project_context.py, the context_set command (line 395) reads and writes a single acms_config dict that is shared across all views:

acms = _read_acms_config(session_factory, project)  # Single global dict
# ... updates acms dict ...
_write_policy(session_factory, project, policy, acms)  # Writes back globally

The _read_acms_config function (line 128) reads from a single acms_config key in the policy JSON blob, regardless of which --view is specified. When --view strategize is passed, the ACMS config is still stored globally, not under the strategize view.

This means:

  • Setting --hot-max-tokens 12000 --view strategize overwrites the global ACMS config
  • Setting --hot-max-tokens 4000 --view execute then overwrites it again
  • There is no way to have different hot_max_tokens for strategize vs execute views

Code Location

  • src/cleveragents/cli/commands/project_context.py lines 128–155 (_read_acms_config, _default_acms_config)
  • src/cleveragents/cli/commands/project_context.py lines 156–175 (_write_policy)
  • src/cleveragents/cli/commands/project_context.py lines 395–760 (context_set command)

Impact

  • ACMS pipeline parameters (hot_max_tokens, warm_max_decisions, cold_max_decisions, strategy, default_breadth, default_depth, skeleton_ratio, temporal_scope, auto_refresh) cannot be configured independently per phase view
  • The spec's deliverable #1 ("Context policies configurable with view-specific settings") is not fully met
  • Users who set different strategies for strategize vs execute phases will have their settings overwritten

Fix Direction

The acms_config should be stored per-view (e.g., acms_config_strategize, acms_config_execute, etc.) or the ContextView domain model should be extended to include ACMS pipeline parameters, matching the spec's JSON schema which includes all these fields as view-level properties.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area**: Context Assembly Pipeline — `agents project context set` command **Severity**: Critical (milestone-blocking — v3.4.0 deliverable #1: "Context policies configurable with view-specific settings") ### What Was Tested Code-level analysis of `src/cleveragents/cli/commands/project_context.py` against the specification's JSON schema for context view configuration (spec §35304–§35441). ### Expected Behavior (from spec) The spec's JSON schema for context view configuration (lines 35304–35441) defines `hot_max_tokens`, `warm_max_decisions`, `cold_max_decisions`, `query_limit`, `strategy`, `default_breadth`, `default_depth`, `depth_gradient`, `skeleton_ratio`, `temporal_scope`, and `auto_refresh` as **per-view** settings. Each view (`strategize`, `execute`, `apply`, `default`) should have its own independent ACMS configuration. For example: ```bash agents project context set --view strategize --hot-max-tokens 12000 local/api-service agents project context set --view execute --hot-max-tokens 4000 local/api-service ``` Should result in strategize view having `hot_max_tokens=12000` and execute view having `hot_max_tokens=4000`. ### Actual Behavior (from code) In `src/cleveragents/cli/commands/project_context.py`, the `context_set` command (line 395) reads and writes a **single** `acms_config` dict that is shared across all views: ```python acms = _read_acms_config(session_factory, project) # Single global dict # ... updates acms dict ... _write_policy(session_factory, project, policy, acms) # Writes back globally ``` The `_read_acms_config` function (line 128) reads from a single `acms_config` key in the policy JSON blob, regardless of which `--view` is specified. When `--view strategize` is passed, the ACMS config is still stored globally, not under the strategize view. This means: - Setting `--hot-max-tokens 12000 --view strategize` overwrites the global ACMS config - Setting `--hot-max-tokens 4000 --view execute` then overwrites it again - There is no way to have different `hot_max_tokens` for strategize vs execute views ### Code Location - `src/cleveragents/cli/commands/project_context.py` lines 128–155 (`_read_acms_config`, `_default_acms_config`) - `src/cleveragents/cli/commands/project_context.py` lines 156–175 (`_write_policy`) - `src/cleveragents/cli/commands/project_context.py` lines 395–760 (`context_set` command) ### Impact - ACMS pipeline parameters (`hot_max_tokens`, `warm_max_decisions`, `cold_max_decisions`, `strategy`, `default_breadth`, `default_depth`, `skeleton_ratio`, `temporal_scope`, `auto_refresh`) cannot be configured independently per phase view - The spec's deliverable #1 ("Context policies configurable with view-specific settings") is not fully met - Users who set different strategies for strategize vs execute phases will have their settings overwritten ### Fix Direction The `acms_config` should be stored per-view (e.g., `acms_config_strategize`, `acms_config_execute`, etc.) or the `ContextView` domain model should be extended to include ACMS pipeline parameters, matching the spec's JSON schema which includes all these fields as view-level properties. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 07:45:12 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#5586
No description provided.