hermes - ✅(Solved) Fix [Bug]: ACP Copilot: 'types.SimpleNamespace' object is not iterable [2 pull requests, 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#11732Fetched 2026-04-18 05:59:09
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×2labeled ×1

Error Message

error

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

PR fix notes

PR #11738: fix(acp): accept wrapped prompt payloads

Description (problem / solution / changelog)

What does this PR do?

Fixes #11732: some ACP clients can call the adapter with a request-like wrapper object instead of passing the raw prompt block list directly. The current ACP adapter assumes prompt is always iterable, so _extract_text() crashes with TypeError: 'types.SimpleNamespace' object is not iterable before Hermes ever reaches the model.

This PR keeps the fix narrow to the ACP boundary:

  • accept prompt payloads passed either as the normal block list or as a wrapper object exposing .prompt
  • keep the existing text extraction behavior once the block list is normalized
  • add a regression test that exercises agent.prompt(prompt=SimpleNamespace(prompt=[...]))

Related Issue

Fixes #11732

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • acp_adapter/server.py: normalize ACP prompt payloads that arrive as wrapper objects with a .prompt attribute before iterating blocks in _extract_text()
  • tests/acp/test_server.py: add a regression test proving wrapped prompt payloads no longer crash and still call run_conversation() with the extracted text

How to Test

  1. Reproduce the old failing shape by calling the ACP adapter with a wrapped payload, e.g. prompt=SimpleNamespace(prompt=[TextContentBlock(type="text", text="hello")])
  2. Confirm the ACP adapter no longer raises TypeError and instead forwards hello into run_conversation()
  3. Run: pytest -o addopts='' tests/acp/test_server.py -q
  4. Run: pytest -o addopts='' tests/acp -q

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Linux (local dev environment)

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

Validation run:

  • pytest -o addopts='' tests/acp/test_server.py -q42 passed
  • pytest -o addopts='' tests/acp -q128 passed

Changed files

  • acp_adapter/server.py (modified, +13/-1)
  • tests/acp/test_server.py (modified, +28/-0)

PR #11780: fix(streaming): handle final responses from non-streaming adapters

Description (problem / solution / changelog)

Summary

  • detect adapters that accept \ but return a final response object
  • disable streaming for the rest of the session instead of iterating a non-stream response
  • cover the ACP Copilot regression with a focused streaming fallback test

Testing

  • python3 -m pytest -o addopts='' tests/run_agent/test_streaming.py -k 'text_only_response or response_object_disables_streaming_and_returns_final_response'

Closes #11732

Changed files

  • run_agent.py (modified, +29/-0)
  • tests/run_agent/test_streaming.py (modified, +47/-0)

Code Example

Report     https://paste.rs/8nSVy
  agent.log  https://paste.rs/bPk8G

---
RAW_BUFFERClick to expand / collapse

Bug Description

GH Copilot ACP is not working. Just with the firest message.

Steps to Reproduce

hermes say hi

Expected Behavior

salute back

Actual Behavior

error 'types.SimpleNamespace' object is not iterable

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

Report     https://paste.rs/8nSVy
  agent.log  https://paste.rs/bPk8G

Operating System

ubuntu

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

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

extent analysis

TL;DR

The issue is likely caused by an incompatibility or bug in the GH Copilot ACP, and a potential fix could involve investigating the error message "'types.SimpleNamespace' object is not iterable" in the context of the interactive chat CLI.

Guidance

  • Investigate the types.SimpleNamespace error in the context of the interactive chat CLI to understand why it's not iterable.
  • Review the provided debug reports (https://paste.rs/8nSVy and https://paste.rs/bPk8G) for more detailed information on the error.
  • Check the compatibility of the GH Copilot ACP with the current setup, including the operating system (Ubuntu) and potential versions of dependent components.
  • Consider reaching out to the maintainers or community of GH Copilot ACP for further assistance, given the lack of information on Python and Hermes versions.

Notes

The provided information lacks specific details about the Python and Hermes versions, which could be crucial for diagnosing the issue accurately. Without this information, it's challenging to provide a precise fix.

Recommendation

Apply workaround: Given the incomplete information and the specific nature of the error, attempting a workaround or seeking additional support from the GH Copilot ACP community might be the most viable next step.

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 [Bug]: ACP Copilot: 'types.SimpleNamespace' object is not iterable [2 pull requests, 1 participants]