Skip to content

[Bug]: Context engine context_chunking not found during first auxiliary agent initialization despite plugin being available #61839

Description

@abdalawood

Bug Description

Environment

  • Hermes Agent v0.18.2 (2026.7.7.2)
  • Docker installation
  • OpenAI Codex provider
  • Context engine: context_chunking

Problem

The logs show:

Context engine 'context_chunking' not found — falling back to built-in compressor

However:

  • context.engine is set to context_chunking

  • plugin is enabled

  • plugin exists in:

    /opt/data/plugins/context_chunking/

  • plugin discovery reports:

    plugin_context_engine =
    ('context_chunking',
    'hermes_plugins.context_chunking',
    'ContextChunkingEngine')

The native directory:

/opt/hermes/plugins/context_engine/context_chunking/

does not exist.

Observations

  • The first direct loader fails.
  • The general plugin fallback successfully finds ContextChunkingEngine.
  • After creating a new auxiliary agent, the warning no longer appears.
  • The system works correctly despite the warning.

Expected

If the plugin fallback succeeds, the warning should not be emitted.

Steps to Reproduce

  1. Configure:

context:
engine: context_chunking

plugins:
enabled:
- context_chunking

  1. Ensure the plugin exists under:

/opt/data/plugins/context_chunking/

  1. Start Hermes.

  2. Trigger creation of an auxiliary agent (for example during automatic context compression or when a new helper agent is spawned).

  3. Observe the logs.

Expected Behavior

When context.engine is configured as "context_chunking" and the plugin is enabled and successfully discovered by the plugin system, Hermes should load the ContextChunkingEngine without emitting any warning.

If the plugin fallback succeeds, no "Context engine not found" warning should be logged.

Actual Behavior

Hermes logs:

Context engine 'context_chunking' not found — falling back to built-in compressor

However, the plugin is actually present and discoverable through the general plugin system.

Plugin discovery reports:

plugin_context_engine =
('context_chunking',
'hermes_plugins.context_chunking',
'ContextChunkingEngine')

After initialization, the plugin works correctly and the warning may no longer appear.

Affected Component

Agent Core (conversation loop, context compression, memory)

Messaging Platform (if gateway-related)

Telegram

Debug Report

Output of:

hermes debug share --local

was too large for the GitHub issue form (>65k characters).

Attached separately / available on request.

Relevant environment:

Hermes 0.18.2
Python 3.11.15
WSL2
Docker
Provider: openai-codex (gpt-5.5)

Operating System

WSL2 Ubuntu 24.04

Python Version

3.11.15

Hermes Version

Hermes Agent v0.18.2 (2026.7.7.2)

Additional Logs / Traceback (optional)

WARNING run_agent: Context engine 'context_chunking' not found — falling back to built-in compressor

Root Cause Analysis (optional)

The plugin is not available as a built-in context engine under:

/opt/hermes/plugins/context_engine/context_chunking/

However, it is installed as a user plugin under:

/opt/data/plugins/context_chunking/

The direct context engine loader fails, but the general plugin registry successfully discovers:

ContextChunkingEngine

This suggests a possible initialization-order issue or inconsistency between the direct context engine loader and the plugin fallback during auxiliary agent creation.

Proposed Fix (optional)

If the general plugin registry successfully resolves the requested context engine, Hermes should not emit:

Context engine 'context_chunking' not found

The warning should only be logged if both the native loader and the plugin fallback fail.

Alternatively, ensure that plugin registration is completed before auxiliary agents attempt to resolve the configured context engine.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havebugcomp/agentCore agent runtime: loop, agent_init, prompt builder, context-compression, responses endpointcomp/pluginsPlugin system and bundled pluginstype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions