hermes - ✅(Solved) Fix Persistent canonical role sessions with governed skill policy [1 pull requests, 2 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#15153Fetched 2026-04-25 06:24:08
View on GitHub
Comments
2
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
labeled ×3commented ×2cross-referenced ×1

Root Cause

This issue is intended to preserve and discuss the architecture before/alongside PR review, especially because the role runtime is a workflow-level design change rather than a small isolated bug fix.

Fix Action

Fixed

PR fix notes

PR #15156: Add persistent role team runtime

Description (problem / solution / changelog)

Summary

This PR prototypes persistent canonical role sessions for Hermes and adds governed per-role skill policy/loading.

Related issue: #15153

What changed

  • Adds SessionDB-backed persistent role sessions keyed by (plan_id, canonical_role).
  • Adds role metadata persistence, role prompt helpers, retire/reopen semantics, and history replay for role runs.
  • Updates invoke_role plumbing so role invocations can create/resume persistent role sessions and write role execution artifacts.
  • Adds structured findings ingestion from deterministic JSON/fenced JSON while keeping findings pending Lead review.
  • Adds dashboard/API projection fields for role runtime lineage, waivers, mode mismatches, and missing required roles.
  • Adds org-chart skill policy in the registry/generated data with required/recommended/triggered skills for canonical roles.
  • Loads required role skills where available from installed Hermes skills or workspace skill docs, with verified/partial skill-compliance metadata.
  • Preserves local Hermes customization changes around Codex model catalog/auxiliary provider handling, with tests.

Validation

venv/bin/python -m pytest tests/tools/test_role_invocation_tool.py tests/agent/test_role_skill_policy.py tests/agent/test_role_sessions.py -q
25 passed
venv/bin/python -m pytest tests/agent/test_auxiliary_client.py tests/hermes_cli/test_codex_models.py tests/hermes_cli/test_managed_installs.py -q
115 passed
venv/bin/python -m py_compile agent/auxiliary_client.py hermes_cli/codex_models.py hermes_cli/config.py hermes_cli/main.py tools/role_invocation_tool.py agent/role_runtime.py web/scripts/generate_org_chart_data.py
git diff --cached --check

Additional validation performed during development included web build checks, staged security scans, and independent reviewer passes on the persistent role-runtime and role skill-loading slices.

Follow-up / discussion

  • Recommended and triggered skill content loading can be hardened after required-skill loading is accepted.
  • The plan snapshot is included in .hermes/plans/... to preserve design context for this prototype branch; maintainers may prefer moving this into formal docs before merge.

Changed files

  • .hermes/plans/2026-04-22_164051-role-team-hybrid-runtime.md (added, +1017/-0)
  • acp_adapter/server.py (modified, +12/-2)
  • acp_adapter/session.py (modified, +44/-7)
  • acp_adapter/tools.py (modified, +11/-0)
  • agent/auxiliary_client.py (modified, +142/-30)
  • agent/plan_bundle.py (added, +756/-0)
  • agent/role_runtime.py (added, +431/-0)
  • gateway/platforms/api_server.py (modified, +17/-0)
  • hermes_cli/codex_models.py (modified, +22/-3)
  • hermes_cli/config.py (modified, +104/-1)
  • hermes_cli/main.py (modified, +17/-1)
  • hermes_cli/web_server.py (modified, +419/-0)
  • model_tools.py (modified, +5/-0)
  • run_agent.py (modified, +44/-5)
  • tests/acp/test_role_sessions.py (added, +126/-0)
  • tests/acp/test_tools.py (modified, +25/-1)
  • tests/agent/test_auxiliary_client.py (modified, +148/-3)
  • tests/agent/test_plan_bundle.py (added, +201/-0)
  • tests/agent/test_role_sessions.py (added, +281/-0)
  • tests/agent/test_role_skill_policy.py (added, +70/-0)
  • tests/gateway/test_api_server_role_sessions.py (added, +107/-0)
  • tests/hermes_cli/test_codex_models.py (modified, +30/-1)
  • tests/hermes_cli/test_managed_installs.py (modified, +61/-0)
  • tests/hermes_cli/test_web_server.py (modified, +255/-0)
  • tests/run_agent/test_lead_findings_loop.py (added, +209/-0)
  • tests/run_agent/test_run_agent.py (modified, +78/-0)
  • tests/tools/test_role_invocation_tool.py (added, +721/-0)
  • tools/role_invocation_tool.py (added, +801/-0)
  • toolsets.py (modified, +2/-2)
  • web/scripts/generate_org_chart_data.py (added, +215/-0)
  • web/src/App.tsx (modified, +4/-0)
  • web/src/data/hermesOrgChart.generated.ts (added, +1095/-0)
  • web/src/data/hermesOrgChart.registry.yaml (added, +681/-0)
  • web/src/lib/api.ts (modified, +105/-0)
  • web/src/pages/AnalyticsPage.tsx (modified, +86/-0)
  • web/src/pages/OrgChartPage.tsx (added, +446/-0)
  • web/src/pages/SessionsPage.tsx (modified, +19/-0)

Code Example

venv/bin/python -m pytest tests/tools/test_role_invocation_tool.py tests/agent/test_role_skill_policy.py tests/agent/test_role_sessions.py -q
25 passed

---

venv/bin/python -m pytest tests/agent/test_auxiliary_client.py tests/hermes_cli/test_codex_models.py tests/hermes_cli/test_managed_installs.py -q
115 passed

---

venv/bin/python -m py_compile agent/auxiliary_client.py hermes_cli/codex_models.py hermes_cli/config.py hermes_cli/main.py tools/role_invocation_tool.py agent/role_runtime.py web/scripts/generate_org_chart_data.py
git diff --cached --check
RAW_BUFFERClick to expand / collapse

Problem

Hermes can currently execute delegated work, but role/team workflows need first-class persistent role instances rather than throwaway subagents or artifact-only metadata.

For long-running product/engineering workflows, the desired behavior is:

  • stable canonical role identities, e.g. Lead / PM, Planner, Developer, Validator, Release Manager;
  • real persisted role sessions with durable history;
  • role isolation by plan/work item and canonical role;
  • the ability to retire/reopen a role session without losing history;
  • Lead-mediated findings ingestion instead of automatic remediation loops;
  • visible role runtime metadata for dashboards/API consumers;
  • explicit per-role skill policy so role behavior is consistent and evolvable.

Proposed direction

Add a persistent role-team runtime that treats canonical roles as durable SessionDB-backed role instances. Roles should be resumable by stable (plan_id, canonical_role) identity and expose machine-readable runtime/skill evidence in execution artifacts.

Skill policy should be a governed asset rather than prompt drift:

  • role-required skills;
  • role-recommended skills;
  • domain-triggered specialist skills;
  • compliance metadata showing whether required skills were loaded.

Prototype branch

A prototype branch is available here:

  • stefanpieter/hermes-agent:role-team-runtime-overhaul

Key commits:

  • de01b531 Implement persistent role team runtime
  • de836dd4 Add role skill policy loading
  • ba871923 chore: preserve local Hermes runtime customizations

Validation performed locally

Focused runtime / role skill validation:

venv/bin/python -m pytest tests/tools/test_role_invocation_tool.py tests/agent/test_role_skill_policy.py tests/agent/test_role_sessions.py -q
25 passed

Auxiliary/Codex/config local-preservation validation:

venv/bin/python -m pytest tests/agent/test_auxiliary_client.py tests/hermes_cli/test_codex_models.py tests/hermes_cli/test_managed_installs.py -q
115 passed

Additional checks:

venv/bin/python -m py_compile agent/auxiliary_client.py hermes_cli/codex_models.py hermes_cli/config.py hermes_cli/main.py tools/role_invocation_tool.py agent/role_runtime.py web/scripts/generate_org_chart_data.py
git diff --cached --check

Independent review was run on the role-runtime and skill-loading slices, and a final independent code review of the local-preservation code diff returned no blocking security or logic issues.

Notes

This issue is intended to preserve and discuss the architecture before/alongside PR review, especially because the role runtime is a workflow-level design change rather than a small isolated bug fix.

extent analysis

TL;DR

Implement a persistent role-team runtime with durable SessionDB-backed role instances to achieve stable canonical role identities and real persisted role sessions.

Guidance

  • Review the prototype branch stefanpieter/hermes-agent:role-team-runtime-overhaul and key commits to understand the proposed changes.
  • Verify the implementation of persistent role team runtime and role skill policy loading using the provided test cases and validation scripts.
  • Evaluate the impact of the changes on the existing workflow and role management system.
  • Consider the security and logic implications of the changes, as reviewed by independent code review.

Example

No code snippet is provided as the issue does not contain specific code that needs to be modified or implemented.

Notes

The issue is focused on discussing the architecture and design changes rather than a specific bug fix, and the proposed solution is a significant overhaul of the role runtime system.

Recommendation

Apply the workaround by implementing the persistent role-team runtime as proposed in the prototype branch, as it addresses the desired behavior for long-running product/engineering workflows and provides a more stable and consistent role management system.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Persistent canonical role sessions with governed skill policy [1 pull requests, 2 comments, 1 participants]