Skip to content

Env robustness: context-safe prompting + tool arg normalization#22

Closed
shannonsands wants to merge 1 commit into
mainfrom
atropos-integrations-pr
Closed

Env robustness: context-safe prompting + tool arg normalization#22
shannonsands wants to merge 1 commit into
mainfrom
atropos-integrations-pr

Conversation

@shannonsands

Copy link
Copy Markdown
Contributor
  • Preserve full trajectory while truncating prompt view per turn (avoids context overflow)
  • Add max_context_tokens support and wire from env config
  • Normalize tool call arguments robustly (dict / stringified JSON / plain string)
  • Avoid double-encoding tool arguments in Hermes parser
  • Add tool-call metrics to AgentResult for debugging/optional shaping

Scope: environments/* only

Too many conflicts with main, splitting it into 2, second PR for the additional sandboxing options. This one is just the changes for handling oversize long trajectories and some robustness around tool handling (found malformed tool calls, eg invalid stringified json inside the responses crashed stuff in a live run)

- Preserve full trajectory while truncating prompt view per turn (avoids context overflow)
- Add max_context_tokens support and wire from env config
- Normalize tool call arguments robustly (dict / stringified JSON / plain string)
- Avoid double-encoding tool arguments in Hermes parser
- Add tool-call metrics to AgentResult for debugging/optional shaping

Scope: environments/* only
@teknium1 teknium1 closed this Feb 28, 2026
sudo-yf pushed a commit to sudo-yf/hermes-agent that referenced this pull request Apr 5, 2026
…e tree

- File preview auto-close: clearPreview() extracted as named function
  and called from loadDir(). Navigating directories (breadcrumbs, up
  button, folder clicks) now automatically closes the right panel
  file preview instead of leaving stale content visible.

- Thinking/reasoning display: assistant messages with structured content
  arrays containing type=thinking or type=reasoning blocks now render
  as collapsible gold-themed cards above the response text. Collapsed
  by default, click header to expand. Works with Claude extended thinking
  and o3 reasoning tokens when preserved in the message array.

- Workspace tree view (Issue NousResearch#22): directories expand/collapse in-place
  with toggle arrows. Single-click toggles, double-click navigates
  (breadcrumb view). Subdirectory contents fetched lazily and cached.
  Indentation shows nesting depth. Empty directories show "(empty)".
  S._expandedDirs tracks open state, S._dirCache caches fetched entries.

Tests: 295 passed, 23 pre-existing failures, 0 regressions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
h4x3rotab pushed a commit to Clawdi-AI/hermes-agent that referenced this pull request Apr 10, 2026
Adds skipHydration to Zustand persist, defers settings init to useEffect, adds mounted guard to ThemeToggleMini.

Fixes NousResearch#22
Co-authored-by: clawjasper56
h4x3rotab pushed a commit to Clawdi-AI/hermes-agent that referenced this pull request Apr 10, 2026
…ousResearch#22)

Co-authored-by: dontcallmejames <dontcallmejames@users.noreply.github.com>
linxule added a commit to linxule/hermes-agent that referenced this pull request Apr 27, 2026
NousResearch#22)

Parity port of linxule/hermes-kimi-plugin's room-state eviction work.
Adds _BoundedLRU(OrderedDict) primitive + room_cache_max_entries
config knob (default 500) + retrofits _rooms,
_last_message_id_per_room, _probe_msg_id_room_counts to use it.

Same docstring + same tests as the standalone repo; legacy variant
remains a faithful inspection ref for the upstream PR pitch.

Three-agent review applied to the standalone first; this is the
mirror commit. See linxule/hermes-kimi-plugin@main for the review-
synthesised docstring + README rationale, including the three
observable side effects of eviction under cardinality pressure
(resumed-room first-seen DEBUG log, probe sample-phase reset,
cold-resume + transient RPC failure).

Tests: 175 passed locally (158 prior + 11 new + 6 plugin-
integration).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dhi9

dhi9 commented May 26, 2026

Copy link
Copy Markdown

PR-22 (POS Repo) ready for merge. No conflicts detected.

waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request May 27, 2026
- action='deps' parses YAML frontmatter from SKILL.md
- Extracts depends_on list (inline and multi-line YAML)
- Resolves each dependency against installed skills dir
- Returns found/missing counts with per-dep status

Battleship: NousResearch#22 item reduced from 4 to 3 gaps (~372 total)
bluefishs added a commit to bluefishs/hermes-agent that referenced this pull request Jun 3, 2026
- ADR-CK-003:整合 CK_Missive#0023/NousResearch#22/NousResearch#31 + CK_AaaP#0020,定調多意識體聯邦
  (各平臺後端=會成長意識體/Hermes=介面/meta=AaaP 大腦/平臺定址)
- S1(meta SOUL 代問語意)A/B 測試否決還原(0/3 vs baseline 3/3)
- S2.5 β spike(MCP 真 tool missive_query):基礎設施成立但 dispatch 未改善
  (0/3 寫成文字),瓶頸=模型 tool_call 可靠度非 terminal-vs-tool,暫不投入 α,已還原
- RESTART_CHECKLIST 2026-06-03:版本對齊 v2026.5.22、spike 全還原、baseline GO 1821
difeizheng pushed a commit to difeizheng/zdf-hermes-agent that referenced this pull request Jun 3, 2026
Fixes 12 remaining MEDIUM issues from the deep audit (19 total, 7 fixed in Round 12):

design_agent:
- NousResearch#15: add asyncio.wait_for(300s) around LLM API call to prevent infinite hangs
- NousResearch#17: replace 2x hardcoded 'claude-opus-4-8' with shared DEFAULT_MODEL constant

qa_agent / validate_agent:
- NousResearch#20,NousResearch#22,NousResearch#23: already fixed in Round 12 (verified — dynamic timeout/threshold values used)

memory.py:
- NousResearch#24: frontmatter parser uses regex r'^---$' instead of str.split('---',2),
  preventing false splits on content containing '---' (SQL, markdown tables)
- NousResearch#25: parse and preserve 'description' field from frontmatter in metadata,
  fixing write→load roundtrip data loss

profiles.py:
- NousResearch#26: ProfileConfig now frozen=True (immutable dataclass per coding standards)

deploy_agent:
- NousResearch#31: replace 2x sync subprocess.run with asyncio.create_subprocess_exec
- fix 5x .decode() → .decode('utf-8', errors='replace') for Windows CJK safety
- remove unused import subprocess

db.py:
- NousResearch#27: add class docstring explaining RLock + _unlocked pattern
- NousResearch#28: FK constraints already in DDL (verified PRAGMA foreign_keys=ON active)
- NousResearch#29: add _ensure_connection() with PRAGMA integrity_check(1) + auto-reconnect
       on 4 critical methods (create_task, get_task, claim_task, submit_result)
- extract _create_connection() static method for reuse by reconnect

Tests: 79 passed, 0 failed
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.

3 participants