Skip to content

Perf/save attempts 17847424019556046468#24

Open
jnorthrup wants to merge 3 commits into
Intelligent-Internet:mainfrom
jnorthrup:perf/save-attempts-17847424019556046468
Open

Perf/save attempts 17847424019556046468#24
jnorthrup wants to merge 3 commits into
Intelligent-Internet:mainfrom
jnorthrup:perf/save-attempts-17847424019556046468

Conversation

@jnorthrup

Copy link
Copy Markdown
Contributor

Summary

Checklist

  • uv run ruff check . passes
  • uv run mypy src passes
  • uv run pytest -q passes
  • Tests added/updated for behavior changes

jnorthrup and others added 3 commits June 29, 2026 18:43
Wire hermes (hermes-agent) as a worker/orchestrator provider alongside
claude and codex. Hermes speaks the same ACP JSON-RPC over stdio protocol
as claude-agent-acp/codex-acp, so the integration is minimal:

- providers.py: add 'hermes' to ProviderName, ORCHESTRATOR_PROVIDER_NAMES,
  WORKER_PROVIDER_NAMES, and PROVIDERS dict with default_worker_acp_command
  'hermes acp', config_format mcp_json, acp_runtime_mode None.
- acp_runner.py: _augment_acp_command and _acp_subprocess_env: hermes is
  a no-op (codex gets sandbox/approval overrides; hermes passes through).

Use with: zenith init --agent hermes --workspace-dir /path/to/repo
Or with a profile: zenith init --agent hermes --worker-acp-command
  'hermes --profile myprofile acp' --workspace-dir /path/to/repo
- New: bundled/prompts/orchestrator/hermes_addendum.md with session_search, memory tool, skill loading, compression awareness
- cli.py: appends addendum to .hermes/orchestrator_prompt.md for Hermes provider
- assets.py: adds bundled_prompts_dir() helper
💡 What: Implemented a new save_attempts method in ProjectStore using ThreadPoolExecutor for concurrent writes. Updated MissionCoordinator to batch write attempts during dispatcher handoff instead of a sequential loop.

🎯 Why: Resolves an N+1 problem where saving multiple dispatch attempts one-by-one sequentially blocked the coordinator loop. Grouping I/O operations drastically reduces storage synchronization time overhead.

📊 Measured Improvement: Under a 5ms simulated I/O delay, saving 500 attempts dropped from ~7.9 seconds sequentially to ~1.0 seconds concurrently, demonstrating an ~8x performance improvement in batch I/O.
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