fix(reactive): SimpleToolAgent only executes first tool — skill tools at later indices are ignored #974

Closed
opened 2026-03-16 10:54:35 +00:00 by hurui200320 · 0 comments
Member

Metadata

  • Commit Message: fix(reactive): implement multi-tool pipeline in SimpleToolAgent
  • Branch: fix/simple-tool-agent-multi-tool

Background and Context

SimpleToolAgent.process() in src/cleveragents/reactive/stream_router.py only executes self.tools[0]. When the --skill flag injects additional tools into an agent's tool list (via _register_agents_from_config() in application.py), the skill tools at indices 1, 2, ... are never executed. The user believes skills are being applied, but they have zero runtime effect for agents with existing tools.

Discovered during review of PR !971 (issue #887--skill flag implementation). The --skill flag correctly adds tools to the agent's tool list, but the execution pipeline only processes one tool.

Spec reference: SimpleToolAgent is expected to execute all configured tools, not just the first one.

Expected Behavior

When --skill injects tools into an agent that already has tools, all tools (including skill tools) should participate in the execution pipeline. This could be via:

  • A sequential pipeline that executes all tools in order
  • Tool routing based on operation type
  • LLM-based tool selection for appropriate tools

Acceptance Criteria

  • SimpleToolAgent.process() executes all tools in its tool list, not just tools[0]
  • Skill-injected tools with operation: identity pass through content unchanged
  • Existing single-tool behavior is preserved (backward-compatible)
  • Tests verify multi-tool execution with skill-injected tools

Subtasks

  • Design multi-tool execution strategy (pipeline, routing, or selection)
  • Implement multi-tool execution in SimpleToolAgent.process()
  • Tests (Behave): Multi-tool execution scenarios
  • Tests (Robot): Integration test with --skill and multi-tool agent
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
## Metadata - **Commit Message**: `fix(reactive): implement multi-tool pipeline in SimpleToolAgent` - **Branch**: `fix/simple-tool-agent-multi-tool` ## Background and Context `SimpleToolAgent.process()` in `src/cleveragents/reactive/stream_router.py` only executes `self.tools[0]`. When the `--skill` flag injects additional tools into an agent's tool list (via `_register_agents_from_config()` in `application.py`), the skill tools at indices 1, 2, ... are never executed. The user believes skills are being applied, but they have zero runtime effect for agents with existing tools. Discovered during review of PR !971 (issue #887 — `--skill` flag implementation). The `--skill` flag correctly adds tools to the agent's tool list, but the execution pipeline only processes one tool. **Spec reference**: `SimpleToolAgent` is expected to execute all configured tools, not just the first one. ## Expected Behavior When `--skill` injects tools into an agent that already has tools, all tools (including skill tools) should participate in the execution pipeline. This could be via: - A sequential pipeline that executes all tools in order - Tool routing based on operation type - LLM-based tool selection for appropriate tools ## Acceptance Criteria - [ ] `SimpleToolAgent.process()` executes all tools in its tool list, not just `tools[0]` - [ ] Skill-injected tools with `operation: identity` pass through content unchanged - [ ] Existing single-tool behavior is preserved (backward-compatible) - [ ] Tests verify multi-tool execution with skill-injected tools ## Subtasks - [ ] Design multi-tool execution strategy (pipeline, routing, or selection) - [ ] Implement multi-tool execution in `SimpleToolAgent.process()` - [ ] Tests (Behave): Multi-tool execution scenarios - [ ] Tests (Robot): Integration test with `--skill` and multi-tool agent - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done.
hurui200320 added this to the v3.4.0 milestone 2026-03-16 10:54:35 +00:00
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#974
No description provided.