UAT: [FA-01] plan execute JSON output reports truncated sandbox branch name (8 chars instead of full ULID) #7802

Open
opened 2026-04-12 04:04:39 +00:00 by HAL9000 · 4 comments
Owner

Bug Report

Feature Area: FA-01 Plan Lifecycle
Command: agents plan execute --format json
Severity: Medium

What Was Tested

Code analysis of _execute_output_dict() in src/cleveragents/cli/commands/plan.py against the actual branch name used in _apply_sandbox_changes().

Expected Behavior (from spec)

The JSON output for agents plan execute should report the correct sandbox branch name that matches the actual git branch created for the plan sandbox. Per the spec, the branch name is cleveragents/plan-<plan_id> where <plan_id> is the full 26-character ULID.

Actual Behavior

In _execute_output_dict() (line ~370 of src/cleveragents/cli/commands/plan.py), the sandbox branch name is constructed as:

"branch": f"cleveragents/plan-{plan_id[:8]}",

This truncates the plan ID to only 8 characters, producing a branch name like cleveragents/plan-01HXM8C2 instead of the full cleveragents/plan-01HXM8C2ZK4Q7C2B3F2R4VYV6J.

However, in _apply_sandbox_changes() (line ~1427), the actual branch name used for the git merge is:

branch_name = f"cleveragents/plan-{plan_id}"

This uses the full 26-character ULID.

Impact

  • Users inspecting the JSON output of plan execute get a wrong branch name
  • If a user tries to manually inspect or interact with the sandbox branch using the name from the JSON output, they will get a "branch not found" error
  • The mismatch between reported and actual branch names is confusing and incorrect

Steps to Reproduce

  1. Create a plan: agents plan use <action> <project>
  2. Execute the plan: agents plan execute <plan_id> --format json
  3. Inspect the data.sandbox.branch field in the output
  4. Compare with the actual git branch: git branch | grep cleveragents

Code Location

  • Bug location: src/cleveragents/cli/commands/plan.py, _execute_output_dict() function, line ~370
  • Correct branch name: src/cleveragents/cli/commands/plan.py, _apply_sandbox_changes() function, line ~1427

Fix

Change:

"branch": f"cleveragents/plan-{plan_id[:8]}",

To:

"branch": f"cleveragents/plan-{plan_id}",

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

## Bug Report **Feature Area**: FA-01 Plan Lifecycle **Command**: `agents plan execute --format json` **Severity**: Medium ## What Was Tested Code analysis of `_execute_output_dict()` in `src/cleveragents/cli/commands/plan.py` against the actual branch name used in `_apply_sandbox_changes()`. ## Expected Behavior (from spec) The JSON output for `agents plan execute` should report the correct sandbox branch name that matches the actual git branch created for the plan sandbox. Per the spec, the branch name is `cleveragents/plan-<plan_id>` where `<plan_id>` is the full 26-character ULID. ## Actual Behavior In `_execute_output_dict()` (line ~370 of `src/cleveragents/cli/commands/plan.py`), the sandbox branch name is constructed as: ```python "branch": f"cleveragents/plan-{plan_id[:8]}", ``` This truncates the plan ID to only 8 characters, producing a branch name like `cleveragents/plan-01HXM8C2` instead of the full `cleveragents/plan-01HXM8C2ZK4Q7C2B3F2R4VYV6J`. However, in `_apply_sandbox_changes()` (line ~1427), the actual branch name used for the git merge is: ```python branch_name = f"cleveragents/plan-{plan_id}" ``` This uses the full 26-character ULID. ## Impact - Users inspecting the JSON output of `plan execute` get a wrong branch name - If a user tries to manually inspect or interact with the sandbox branch using the name from the JSON output, they will get a "branch not found" error - The mismatch between reported and actual branch names is confusing and incorrect ## Steps to Reproduce 1. Create a plan: `agents plan use <action> <project>` 2. Execute the plan: `agents plan execute <plan_id> --format json` 3. Inspect the `data.sandbox.branch` field in the output 4. Compare with the actual git branch: `git branch | grep cleveragents` ## Code Location - **Bug location**: `src/cleveragents/cli/commands/plan.py`, `_execute_output_dict()` function, line ~370 - **Correct branch name**: `src/cleveragents/cli/commands/plan.py`, `_apply_sandbox_changes()` function, line ~1427 ## Fix Change: ```python "branch": f"cleveragents/plan-{plan_id[:8]}", ``` To: ```python "branch": f"cleveragents/plan-{plan_id}", ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-12 04:23:12 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels: Type/Bug, State/Unverified, Priority/Backlog
  • Reason: Per CONTRIBUTING.md, all issues require State/, Type/, and Priority/* labels

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

Label compliance fix applied: - Added missing labels: Type/Bug, State/Unverified, Priority/Backlog - Reason: Per CONTRIBUTING.md, all issues require State/*, Type/*, and Priority/* labels --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Author
Owner

Verified — UAT bug: plan execute JSON output reports truncated sandbox branch name. MoSCoW: Should-have. Priority: Medium.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Verified** — UAT bug: plan execute JSON output reports truncated sandbox branch name. MoSCoW: Should-have. Priority: Medium. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — UAT bug: plan execute JSON output reports truncated sandbox branch name. MoSCoW: Should-have. Priority: Medium.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Verified** — UAT bug: plan execute JSON output reports truncated sandbox branch name. MoSCoW: Should-have. Priority: Medium. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — UAT bug: plan execute JSON output reports truncated sandbox branch name. MoSCoW: Should-have. Priority: Medium.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Verified** — UAT bug: plan execute JSON output reports truncated sandbox branch name. MoSCoW: Should-have. Priority: Medium. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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.

Dependencies

No dependencies set.

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