Skip to content

feat(embed): replace the local agent loop with native OpenHuman workers - #13

Merged
senamakel merged 5 commits into
mainfrom
medulla-12-embed
Oct 10, 2026
Merged

senamakel merged 5 commits into
mainfrom
medulla-12-embed

Conversation

@senamakel

@senamakel senamakel commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Replace Medulla’s in-process agent loop with one daemon-owned OpenHuman embed runtime. Native openhuman workers keep their existing routing and event entry point, use native session storage, and receive per-turn cwd, scrubbed subprocess environments, grant-checked fleet/workflow tools, workflow skills, command hooks, inline approvals, usage budgets, and awaited abort/idle cleanup.

Delete the old agent/history/tool loop, local provider adapter, direct tinyagents submodule/dependencies, and obsolete embedded-core environment handling in the same change. Existing thread files are deliberately not imported. Claude, Codex, OpenCode and their subprocess transports remain supported; native OpenHuman must be selected explicitly and requires a configured inference route and model.

Depends on tinyhumansai/openhuman#7305. The vendored feature commit 4bf97045b2 supplies the scoped embed APIs; the submodule URL stays canonical. This is the sole Medulla PR for issue #12. The workflow umbrella companion, https://github.com/tinyhumansai/workflow-medulla/pull/31, updates cross-repository contracts and removes the obsolete serve-chain harness.

Validation:

  • make ci: 4,699 tests passed (13 existing ignored tests), formatting, Clippy with warnings denied, and the locked all-target build.
  • Native integration fixture exercises concurrent worker isolation, account-home refusal, session resume, revoked tool/skill snapshots, approvals, hook payloads, secret scrubbing, budget refusal, abort/idle child cleanup, and cancellation during Stop hooks. Revoked-skill, daemon-discovery and Stop-hook fixes were checked red before green.
  • Instrumented cargo llvm-cov --locked --no-clean -p medulla --test feature_embed_agents --summary-only: native fixture passed, including idle child cleanup.
  • make e2e-native: real native daemon, encrypted UDP coordination, loopback mock inference.
  • Umbrella make cross-repo: 18 spanning tests and five prerequisite unit tests using the actual backend package and Rust native adapter.
  • Dependency duplicate/pin guard; fresh fetch of the feature SHA from the canonical OpenHuman repository.

Linux measurements and raw data are published in the OpenHuman prerequisite, with the exact measured source revision and cgroup conditions. The 500-agent median meets the 3.54 MiB marginal-RSS target; the 50- and 100-agent medians exceed it, and the swap-disabled 500-agent sample narrowly exceeds it. These are mock-provider measurements on a shared build host, not production provider/tool capacity. The named historical probe executables were unavailable; native integration and OpenHuman route/hook tests exercise their seams instead.

Tinyagents/tinyinference remain only inside the transitive OpenHuman/workflow dependency graph; the adapter uses the exact embed-exported tool traits. Workflow-engine and backend-client pins remain independent. Budgets stop between model calls and do not reserve tokens across concurrent in-flight calls. Supervised native approval requests require an attached input surface and otherwise fail closed; the explicit permission-bypass option is honored. Command Stop hooks dispatch by event regardless of tool matchers.

An additional cargo check --locked -p medulla --no-default-features hits existing ungated workflow references in unchanged harness_transcript and config/types/orchestration.rs. The normal workspace gate above passes; this optional SDK feature combination is not claimed green.

Closes #12

senamakel and others added 2 commits October 10, 2026 20:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T17:47:51.884989Z f055708 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 115 billable files and costs up to $28.75.

View limit details

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4405924c-b596-4d32-9d86-ab335dd693d2

📥 Commits

Reviewing files that changed from the base of the PR and between 5c9e502 and c8186a1.


⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock

📒 Files selected for processing (115)
  • .github/actions/free-disk/action.yml
  • .github/actions/sccache/action.yml
  • .github/workflows/ci.yml
  • .gitmodules
  • Cargo.toml
  • Makefile
  • config.example.toml
  • docs/TERMINOLOGY.md
  • docs/attribution-proxy.md
  • docs/vendoring.md
  • e2e/coordination/Dockerfile
  • e2e/coordination/harness.sh
  • e2e/coordination/medulla.openhuman.json
  • e2e/coordination/run.sh
  • gitbooks/developers/harness-integration.md
  • gitbooks/developers/sdk.md
  • gitbooks/developers/vendoring.md
  • scripts/init-submodules.sh
  • src/sdk/Cargo.toml
  • src/sdk/src/README.md
  • src/sdk/src/agent/harness.rs
  • src/sdk/src/agent/history/mod.rs
  • src/sdk/src/agent/history/store.rs
  • src/sdk/src/agent/history/tests.rs
  • src/sdk/src/agent/history/types.rs
  • src/sdk/src/agent/mod.rs
  • src/sdk/src/agent/tools/env/tests.rs
  • src/sdk/src/agent/tools/fs/list.rs
  • src/sdk/src/agent/tools/fs/mod.rs
  • src/sdk/src/agent/tools/fs/read.rs
  • src/sdk/src/agent/tools/fs/tests.rs
  • src/sdk/src/agent/tools/fs/types.rs
  • src/sdk/src/agent/tools/fs/write.rs
  • src/sdk/src/agent/tools/guard/mod.rs
  • src/sdk/src/agent/tools/guard/tests.rs
  • src/sdk/src/agent/tools/mod.rs
  • src/sdk/src/agent/tools/shell/mod.rs
  • src/sdk/src/agent/tools/shell/tests.rs
  • src/sdk/src/agent/turn.rs
  • src/sdk/src/config/custom_harnesses.rs
  • src/sdk/src/control_socket/tests/protocol/mod.rs
  • src/sdk/src/daemon/capabilities/mod.rs
  • src/sdk/src/daemon/entry_tests.rs
  • src/sdk/src/daemon/flags/mod.rs
  • src/sdk/src/daemon/providers/acp/execution.rs
  • src/sdk/src/daemon/providers/acp/tests/execution.rs
  • src/sdk/src/daemon/providers/codex_server/execution.rs
  • src/sdk/src/daemon/providers/codex_server/tests.rs
  • src/sdk/src/daemon/providers/detect.rs
  • src/sdk/src/daemon/providers/embed/budget.rs
  • src/sdk/src/daemon/providers/embed/environment/mod.rs
  • src/sdk/src/daemon/providers/embed/environment/tests.rs
  • src/sdk/src/daemon/providers/embed/hooks.rs
  • src/sdk/src/daemon/providers/embed/host.rs
  • src/sdk/src/daemon/providers/embed/mod.rs
  • src/sdk/src/daemon/providers/embed/model_selection.rs
  • src/sdk/src/daemon/providers/embed/native_session.rs
  • src/sdk/src/daemon/providers/embed/permissions.rs
  • src/sdk/src/daemon/providers/embed/routing.rs
  • src/sdk/src/daemon/providers/embed/routing_tests.rs
  • src/sdk/src/daemon/providers/embed/run/events.rs
  • src/sdk/src/daemon/providers/embed/run/execution.rs
  • src/sdk/src/daemon/providers/embed/run/mod.rs
  • src/sdk/src/daemon/providers/embed/run/progress.rs
  • src/sdk/src/daemon/providers/embed/run/tests.rs
  • src/sdk/src/daemon/providers/embed/run/types.rs
  • src/sdk/src/daemon/providers/embed/run/watchdog.rs
  • src/sdk/src/daemon/providers/embed/tests.rs
  • src/sdk/src/daemon/providers/embed/tools.rs
  • src/sdk/src/daemon/providers/execute.rs
  • src/sdk/src/daemon/providers/local/mod.rs
  • src/sdk/src/daemon/providers/local/model.rs
  • src/sdk/src/daemon/providers/local/router.rs
  • src/sdk/src/daemon/providers/local/run/execution.rs
  • src/sdk/src/daemon/providers/mod.rs
  • src/sdk/src/daemon/providers/tests.rs
  • src/sdk/src/daemon/providers/types.rs
  • src/sdk/src/daemon/runtime.rs
  • src/sdk/src/daemon/task_loop/plain.rs
  • src/sdk/src/daemon/task_loop/run.rs
  • src/sdk/src/daemon/task_loop/workflow/dispatch.rs
  • src/sdk/src/daemon/types.rs
  • src/sdk/src/inference_proxy/serve.rs
  • src/sdk/src/lib.rs
  • src/sdk/src/mcp/mod.rs
  • src/sdk/src/protocol/env.rs
  • src/sdk/src/protocol/env_tests.rs
  • src/sdk/src/protocol/frames/types.rs
  • src/sdk/src/sessions/interactive/session/mod.rs
  • src/sdk/src/sessions/manager/mod.rs
  • src/sdk/src/sessions/manager/turns.rs
  • src/sdk/src/sessions/manager/types.rs
  • src/sdk/src/tokio_tuning.rs
  • src/sdk/src/wrapper/run/child/mod.rs
  • src/sdk/src/wrapper/run/child/tests.rs
  • src/sdk/src/wrapper/run/mod.rs
  • src/sdk/src/wrapper/run/tests/mod.rs
  • src/sdk/tests/e2e_codex_app_server.rs
  • src/sdk/tests/e2e_daemon_providers.rs
  • src/sdk/tests/e2e_daemon_router.rs
  • src/sdk/tests/feature_embed_agents.rs
  • src/tui/src/commands/workflow.rs
  • src/tui/src/local_host/mod.rs
  • src/tui/src/local_host/tests/dispatch.rs
  • src/tui/src/ui/harness_pane/spawn.rs
  • src/tui/src/ui/harness_pane/tests/shells.rs
  • src/tui/src/ui/harness_pane/tests/spawn.rs
  • src/tui/src/worker/executor/launch.rs
  • src/tui/src/worker/executor_tests/live.rs
  • src/tui/src/worker/executor_tests/mod.rs
  • src/tui/src/worker/executor_tests/plumbing.rs
  • src/tui/tests/e2e_codex_rename.rs
  • src/tui/tests/e2e_login.rs
  • vendor/openhuman
  • vendor/tinyagents

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f055708775

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/sdk/src/daemon/providers/embed/run/execution.rs Outdated
Comment thread src/tui/src/ui/harness_pane/spawn.rs
Comment thread src/sdk/src/daemon/providers/embed/hooks.rs Outdated
@tinysweeper

tinysweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

⚠️ Review failed for c8186a1ca819. the review of #13 did not finish within 900s

senamakel and others added 3 commits October 10, 2026 21:06
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…leanup

Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@senamakel
senamakel merged commit dd19879 into main Oct 10, 2026
9 of 10 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.

Hard cut: run Medulla's in-process agents on openhuman-embed and drop the tinyagents loop

1 participant