Skip to content

feat(agents): assign #1208 coding-harness tools to relevant built-in agents#1214

Merged
senamakel merged 1 commit intotinyhumansai:mainfrom
senamakel:feat/assign-coding-tools-to-agents
May 5, 2026
Merged

feat(agents): assign #1208 coding-harness tools to relevant built-in agents#1214
senamakel merged 1 commit intotinyhumansai:mainfrom
senamakel:feat/assign-coding-tools-to-agents

Conversation

@senamakel
Copy link
Copy Markdown
Member

@senamakel senamakel commented May 5, 2026

Summary

  • feat(tools): coding-harness baseline primitives (#1205) #1208 added 9 coding-harness primitives (grep, glob, list, edit, apply_patch, todowrite, plan_exit, web_fetch, lsp) to the global all_tools registry, but did not wire them into any agent's [tools] named allowlist.
  • Result: only wildcard = {} agents (e.g. tools_agent) could actually see them. The agents that would benefit most — code_executor, planner, researcher, orchestrator — were silently still on the legacy surface.
  • This PR distributes the new tools per-agent based on each agent's role and sandbox_mode.

Distribution

Agent Sandbox Added
code_executor sandboxed full set: grep, glob, list, edit, apply_patch, todowrite, plan_exit, web_fetch, lsp
planner read_only read-only nav (grep, glob, list) + todowrite + plan_exit + web_fetch
researcher none read-only nav (grep, glob, list) + web_fetch (the simple URL-GET sibling of http_request, same allowed_domains gate)
orchestrator n/a todowrite + plan_exit only — the orchestrator coordinates, it doesn't edit files

planner deliberately does NOT receive edit / apply_patch / lspsandbox_mode = "read_only" forbids workspace mutations and downstream agents do the writing.

Other agents (archivist, critic, summarizer, help, welcome, integrations_agent, tool_maker, trigger_triage, trigger_reactor, morning_briefing) are intentionally untouched — their narrow named allowlists reflect domain-specific surfaces (memory ops, composio meta-tools, gitbooks, onboarding) that the new coding primitives don't fit.

lsp is capability-gated by OPENHUMAN_LSP_ENABLED; listing it in code_executor's allowlist is harmless when the gate is off (the tool is simply not registered into the runtime).

Test plan

  • cargo test --lib agent::agents::loader — 20/20 pass (covers code_executor_*, planner_is_read_only_with_composio_meta_tools, researcher_has_curl_for_artifact_downloads, orchestrator_has_reasoning_hint_and_named_tools, all_builtins_parse)
  • cargo check --manifest-path Cargo.toml clean
  • Manual: spin up a coding session, confirm code_executor actually sees grep / edit / apply_patch in its tool catalog

Impact

  • TOML-only change to 4 agent definitions. No code, no schema, no migration.
  • Backwards compatible: pure additions to existing named = [...] allowlists.
  • Branch was pushed with --no-verify because the repo's pre-push hook fails on pre-existing app/ ESLint warnings (mascot / commands code) and a Tailwind class lint check — none of which this PR touches. Per CLAUDE.md (If a pre-push hook fails on something unrelated to your changes ... push with --no-verify and call it out in the PR body.)

Related

Summary by CodeRabbit

New Features

  • Enhanced Agent Capabilities
    • Expanded toolsets across multiple system agents with new navigation, search, and analysis tools
    • Code executor gains enhanced editing and task coordination support
    • Planner and researcher agents equipped with improved search and research primitives
    • System-wide improvements to agent coordination and workflow management

tinyhumansai#1208 added 9 coding-harness primitives (grep, glob, list, edit,
apply_patch, todowrite, plan_exit, web_fetch, lsp) to the global
all_tools registry but did not wire them into any agent's [tools]
named allowlist — only wildcard agents (tools_agent) could see them.

Distribution:
- code_executor: full set (sandboxed coder writes/edits files and runs them)
- planner: read-only nav (grep/glob/list) + todowrite + plan_exit + web_fetch
  (sandbox_mode = read_only forbids edit/apply_patch/lsp anyway)
- researcher: read-only nav (grep/glob/list) + web_fetch (the simple URL-GET
  sibling of http_request, same allowed_domains gate)
- orchestrator: todowrite + plan_exit (coordination markers; the orchestrator
  delegates editing to downstream agents)

Other agents (archivist, critic, summarizer, help, welcome,
integrations_agent, tool_maker, trigger_*) intentionally untouched —
their narrow named allowlists reflect domain-specific surfaces that
the new coding tools don't fit.

Verified by `cargo test --lib agent::agents::loader` (20/20 pass).
@senamakel senamakel requested a review from a team May 5, 2026 08:52
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

📝 Walkthrough

Walkthrough

Four agent TOML configuration files are updated to expand their permitted tool allowlists. The code executor gains navigation and editing tools plus task flow helpers; the orchestrator adds todo and plan exit handlers; the planner gains read-only navigation and plan output tools; the researcher adds web fetch and read-only search capabilities.

Changes

Agent Tool Allowlist Expansion

Layer / File(s) Summary
Tool Registry Configuration
src/openhuman/agent/agents/code_executor/agent.toml, src/openhuman/agent/agents/orchestrator/agent.toml, src/openhuman/agent/agents/planner/agent.toml, src/openhuman/agent/agents/researcher/agent.toml
Each agent's [tools].named list is expanded with tools aligned to its role: code executor receives full capabilities (grep, glob, list, edit, apply_patch, todowrite, plan_exit, web_fetch, lsp); orchestrator receives plan handoff tools (todowrite, plan_exit); planner receives read-only navigation and plan output (grep, glob, list, todowrite, plan_exit, web_fetch); researcher receives web and search capabilities (web_fetch, grep, glob, list).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • tinyhumansai/openhuman#500: Directly modifies the same four agent TOML configuration files to expand tool allowlists across code executor, orchestrator, planner, and researcher agents.

Poem

🐰 A rabbit hops with toolbox in hand,
Expanding capabilities across the land!
Executors execute, planners now plan,
Researchers research with web-fetch so grand.
Each agent equipped for their destined role!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the main change: assigning coding-harness tools to agent configurations, which aligns with the PR's core objective of wiring nine primitives into per-agent tool allowlists.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/openhuman/agent/agents/code_executor/agent.toml (1)

26-43: ⚡ Quick win

Add a regression assertion for this exact tool surface.

Given Line 26 through Line 43 materially expands executor capabilities, it’s worth adding/expanding a loader test that asserts expected tools for code_executor (and complementary exclusions for planner) so future edits don’t silently drift.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/openhuman/agent/agents/code_executor/agent.toml` around lines 26 - 43,
Add a regression unit test that asserts the exact tool surface loaded for the
code_executor agent (the "named" list that currently contains
"shell","file_read","file_write","git_operations","node_exec","npm_exec","curl","grep","glob","list","edit","apply_patch","todowrite","plan_exit","web_fetch","lsp")
and also asserts complementary exclusions for the planner agent so changes are
caught. Implement this in the existing loader/agent tests (e.g., add a test
named test_code_executor_tool_surface_regression or augment test_load_agents) by
loading the agent configuration, reading the tool names for the agent identified
as code_executor, and comparing against the exact expected list (order-sensitive
or order-insensitive per your test conventions); likewise assert planner’s tool
list does not include these executor-only tools. Ensure the test fails on any
divergence so future edits must update the asserted list.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/openhuman/agent/agents/code_executor/agent.toml`:
- Around line 26-43: Add a regression unit test that asserts the exact tool
surface loaded for the code_executor agent (the "named" list that currently
contains
"shell","file_read","file_write","git_operations","node_exec","npm_exec","curl","grep","glob","list","edit","apply_patch","todowrite","plan_exit","web_fetch","lsp")
and also asserts complementary exclusions for the planner agent so changes are
caught. Implement this in the existing loader/agent tests (e.g., add a test
named test_code_executor_tool_surface_regression or augment test_load_agents) by
loading the agent configuration, reading the tool names for the agent identified
as code_executor, and comparing against the exact expected list (order-sensitive
or order-insensitive per your test conventions); likewise assert planner’s tool
list does not include these executor-only tools. Ensure the test fails on any
divergence so future edits must update the asserted list.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4fe2044c-a275-4fe5-8081-ffaee1ae6b0d

📥 Commits

Reviewing files that changed from the base of the PR and between e945390 and 5da460f.

📒 Files selected for processing (4)
  • src/openhuman/agent/agents/code_executor/agent.toml
  • src/openhuman/agent/agents/orchestrator/agent.toml
  • src/openhuman/agent/agents/planner/agent.toml
  • src/openhuman/agent/agents/researcher/agent.toml

@senamakel senamakel merged commit a01231f into tinyhumansai:main May 5, 2026
17 of 20 checks passed
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