Skip to content

[AGX1-82] /linear AGX1-82 Remove the agents command from the CLI in sc#273

Closed
danielmillerp wants to merge 1 commit intomainfrom
dm/swe-destroyer-agx1-82
Closed

[AGX1-82] /linear AGX1-82 Remove the agents command from the CLI in sc#273
danielmillerp wants to merge 1 commit intomainfrom
dm/swe-destroyer-agx1-82

Conversation

@danielmillerp
Copy link
Contributor

@danielmillerp danielmillerp commented Feb 24, 2026

Automated PR from SWE Destroyer agent.

Prompt: /linear AGX1-82 Remove the agents command from the CLI in scale-agentex-python

Greptile Summary

This PR removes the agentex agents CLI subcommand group (get, list, delete, cleanup_workflows, build, package, run, deploy) by deleting agents.py, removing its registration from main.py, and dropping the related CLI-level tests from test_agent_handlers.py. The underlying handler modules (agent_handlers.py, deploy_handlers.py, cleanup_handlers.py) are preserved.

  • Deletes src/agentex/lib/cli/commands/agents.py (447 lines) which contained all agent CLI subcommands
  • Removes the agents typer registration from the main CLI app
  • Removes TestPackageCommand CLI tests while preserving handler-level unit tests
  • Issue: Many files across the codebase still reference agentex agents run/build/deploy — including the init command's post-scaffold instructions, shell scripts that invoke the CLI, documentation, and templates. These should be updated to avoid broken user-facing guidance and runtime failures.

Confidence Score: 2/5

  • The CLI removal is clean, but many files still reference the removed agentex agents command which will cause broken instructions and failing scripts.
  • The three changed files are correctly modified, but the PR misses updating ~70+ references to agentex agents across init.py, shell scripts, templates, and docs. Notably, init.py will print broken CLI instructions to new users, and run_agent_test.sh/launch-tutorials.sh will fail at runtime.
  • src/agentex/lib/cli/commands/init.py, examples/tutorials/run_agent_test.sh, examples/launch-tutorials.sh, CLAUDE.md, CLI template README files under src/agentex/lib/cli/templates/

Important Files Changed

Filename Overview
src/agentex/lib/cli/commands/agents.py Entire file deleted — removes all CLI subcommands (get, list, delete, cleanup_workflows, build, package, run, deploy) from the agents typer group. The deletion itself is clean.
src/agentex/lib/cli/commands/main.py Removes the agents import and app.add_typer registration. Correct for removing the command, but many files still reference agentex agents (init.py instructions, shell scripts, docs).
tests/lib/cli/test_agent_handlers.py Removes CLI-level TestPackageCommand tests and the CliRunner/agents imports. The remaining handler-level tests are kept intact. Clean removal with no unused imports.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[agentex CLI - main.py] -->|removed| B[agents subcommand group]
    A --> C[tasks]
    A --> D[secrets]
    A --> E[uv]
    A --> F[init]
    B -->|was| G[get / list / delete]
    B -->|was| H[build / package]
    B -->|was| I[run]
    B -->|was| J[deploy]
    B -->|was| K[cleanup_workflows]
    
    I -.->|handler preserved| L[agent_handlers.py]
    H -.->|handler preserved| L
    J -.->|handler preserved| M[deploy_handlers.py]
    K -.->|handler preserved| N[cleanup_handlers.py]
    
    F -->|still references| B
    
    style B fill:#f96,stroke:#333,color:#000
    style G fill:#f96,stroke:#333,color:#000
    style H fill:#f96,stroke:#333,color:#000
    style I fill:#f96,stroke:#333,color:#000
    style J fill:#f96,stroke:#333,color:#000
    style K fill:#f96,stroke:#333,color:#000
Loading

Last reviewed commit: da63b4d

Removes the `agentex agents` subcommand and its implementation file,
along with the corresponding CLI tests that depended on it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link

greptile-apps bot commented Feb 24, 2026

Additional Comments (1)

src/agentex/lib/cli/commands/main.py
Stale references to agentex agents across the codebase

The agents command is removed from the CLI, but there are numerous references to agentex agents run, agentex agents build, and agentex agents deploy throughout the codebase that were not updated:

  • CLAUDE.md (lines 32, 39-41) — documents agentex agents as a main CLI command
  • src/agentex/lib/cli/commands/init.py (lines 297, 358, 378) — the init command prints post-init instructions referencing agentex agents run, agentex agents build, and agentex agents deploy
  • .cursor/rules/30_cli_and_commands.mdc (lines 9, 17) — references the agents subcommand
  • Multiple README templates under src/agentex/lib/cli/templates/ (e.g., default/README.md.j2, sync/README.md.j2, temporal/README.md.j2, etc.)
  • Tutorial READMEs, test files, and shell scripts under examples/
  • examples/tutorials/run_agent_test.sh and examples/launch-tutorials.sh — these scripts invoke agentex agents run and will break at runtime

At minimum, the init.py instructions and the shell scripts that invoke agentex agents run should be updated, since they will produce broken commands for users.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agentex/lib/cli/commands/main.py
Line: 1-6

Comment:
**Stale references to `agentex agents` across the codebase**

The `agents` command is removed from the CLI, but there are numerous references to `agentex agents run`, `agentex agents build`, and `agentex agents deploy` throughout the codebase that were not updated:

- `CLAUDE.md` (lines 32, 39-41) — documents `agentex agents` as a main CLI command
- `src/agentex/lib/cli/commands/init.py` (lines 297, 358, 378) — the `init` command prints post-init instructions referencing `agentex agents run`, `agentex agents build`, and `agentex agents deploy`
- `.cursor/rules/30_cli_and_commands.mdc` (lines 9, 17) — references the agents subcommand
- Multiple README templates under `src/agentex/lib/cli/templates/` (e.g., `default/README.md.j2`, `sync/README.md.j2`, `temporal/README.md.j2`, etc.)
- Tutorial READMEs, test files, and shell scripts under `examples/`
- `examples/tutorials/run_agent_test.sh` and `examples/launch-tutorials.sh` — these scripts invoke `agentex agents run` and will break at runtime

At minimum, the `init.py` instructions and the shell scripts that invoke `agentex agents run` should be updated, since they will produce broken commands for users.

How can I resolve this? If you propose a fix, please make it concise.

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.

1 participant