hermes - ✅(Solved) Fix ACP: add /goal and /subgoal parity with gateway/CLI standing goals [1 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#28640Fetched 2026-05-20 04:02:59
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #28641: acp: add /goal and /subgoal parity

Description (problem / solution / changelog)

PR: Add ACP /goal and /subgoal parity

Summary

This draft PR tracks ACP support for Hermes standing goals by adding /goal and /subgoal to the ACP adapter. The intent is parity with the existing gateway/CLI GoalManager behavior, especially for Zed and other ACP clients.

ACP currently advertises slash commands such as /steer and /queue, but not /goal or /subgoal. This leaves ACP users without the standing-goal workflow that already exists elsewhere in Hermes.

Scope

  • Advertise goal and subgoal in ACP available_commands_update.
  • Dispatch /goal and /subgoal locally in the ACP adapter.
  • Reuse hermes_cli.goals.GoalManager for all goal state, status, subgoals, pause/resume/clear, and post-turn evaluation.
  • Queue kickoff and continuation prompts through ACP's existing state.queued_prompts / session draining flow.
  • Preserve existing ACP slash commands, especially /steer and /queue.

Implementation Notes

  • /goal should support:
    • /goal
    • /goal status
    • /goal <text>
    • /goal pause
    • /goal resume
    • /goal clear
  • /subgoal should support:
    • /subgoal
    • /subgoal <text>
    • /subgoal remove <n>
    • /subgoal clear
  • /goal <text> should set the active goal through GoalManager and queue the initial goal text through state.queued_prompts.
  • After each successful non-slash ACP agent turn, ACP should call GoalManager.evaluate_after_turn(final_response, user_initiated=True).
  • If GoalManager says to continue, ACP should enqueue the synthetic continuation prompt using the existing queued prompt/session flow.
  • Pause and clear should remove only synthetic goal continuation prompts and must preserve normal user /queue prompts.
  • The implementation should avoid duplicate continuation prompts and should not evaluate goals for slash commands, interrupted turns, or empty final responses.

Acceptance Criteria

  • goal and subgoal appear in ACP advertised commands with useful input hints.
  • /goal status works when no goal is active.
  • /goal <text> creates an active goal and queues kickoff work.
  • /goal pause, /goal resume, and /goal clear behave consistently with gateway/CLI semantics.
  • /subgoal list/add/remove/clear works against the active goal state.
  • ACP post-turn handling evaluates active goals and queues continuation prompts when appropriate.
  • Done, paused, and cleared goals do not continue looping.
  • User-created queued prompts are not removed when clearing synthetic goal continuations.
  • Existing ACP /steer and /queue behavior remains unchanged.

Test Plan

Focused tests:

scripts/run_tests.sh tests/acp/test_server.py -q
scripts/run_tests.sh tests/acp_adapter/test_acp_commands.py -q
scripts/run_tests.sh tests/acp/test_server.py tests/acp_adapter/test_acp_commands.py -q

Syntax sanity:

python -m py_compile acp_adapter/server.py tests/acp/test_server.py tests/acp_adapter/test_acp_commands.py

Non-goals

  • No new goal engine.
  • No redesign of GoalManager.
  • No gateway/CLI behavior rewrite.
  • No broad ACP/gateway abstraction refactor.
  • No unrelated ACP slash-command changes.

Tracking

Refs #28640

Changed files

  • acp_adapter/server.py (modified, +162/-0)
  • docs/plans/2026-05-19-acp-goal-subgoal-plan.md (added, +815/-0)
  • tests/acp/test_server.py (modified, +12/-0)
  • tests/acp_adapter/test_acp_commands.py (modified, +238/-0)

Code Example

scripts/run_tests.sh tests/acp/test_server.py tests/acp_adapter/test_acp_commands.py -q
RAW_BUFFERClick to expand / collapse

Add ACP support for /goal and /subgoal

Problem

Hermes already supports standing goals through the existing gateway and CLI GoalManager flow, but ACP clients such as Zed do not currently get that same workflow.

ACP currently advertises local slash commands such as /steer and /queue, but it does not advertise or handle /goal or /subgoal. As a result, users connected through Zed/ACP cannot set a standing goal, manage subgoals, or rely on Hermes to continue work across turns the way gateway and CLI users can.

Repro

  1. Start the ACP adapter, for example with hermes acp.
  2. Connect from Zed or another ACP client.
  3. Inspect available slash commands or type /goal fix the failing ACP test.
  4. Observe that /goal and /subgoal are missing from the advertised ACP command list and are not handled with the existing standing-goal behavior.

Expected Behavior

ACP should provide parity with the existing gateway/CLI goal workflow:

  • ACP advertises /goal and /subgoal alongside existing local commands such as /steer and /queue.
  • /goal uses the existing hermes_cli.goals.GoalManager; it does not introduce a new goal engine.
  • /subgoal mutates the same persisted goal state used by the rest of Hermes.
  • After a normal ACP agent turn, active goals are evaluated with GoalManager.evaluate_after_turn().
  • If the goal should continue, ACP queues the synthetic continuation prompt through the existing queued_prompts / session flow.
  • If the goal is done, paused, or cleared, ACP does not queue another continuation.

Proposed Scope

Keep this narrow to ACP parity for existing behavior:

  • Add goal and subgoal to ACP advertised slash commands.
  • Add ACP slash handlers for:
    • /goal
    • /goal status
    • /goal <text>
    • /goal pause
    • /goal resume
    • /goal clear
    • /subgoal
    • /subgoal <text>
    • /subgoal remove <n>
    • /subgoal clear
  • Reuse GoalManager for all goal state and decisions.
  • Reuse ACP's existing queued prompt draining path for kickoff and continuation prompts.
  • Preserve existing /steer, /queue, /help, /model, and other ACP command behavior.

Non-goals

  • No redesign of the goal system.
  • No new ACP-specific goal engine.
  • No broad refactor shared between gateway, CLI, and ACP.
  • No change to gateway or CLI goal semantics except where unavoidable for compatibility.

Acceptance Criteria

  • available_commands_update includes goal and subgoal.
  • /goal status reports empty state when no goal is active.
  • /goal <text> creates an active standing goal and queues kickoff work through ACP session state.
  • /goal pause pauses the goal and removes only synthetic goal continuations from state.queued_prompts.
  • /goal resume resumes the existing goal without changing unrelated queued prompts.
  • /goal clear clears the goal and preserves normal user /queue prompts.
  • /subgoal list/add/remove/clear works against the active GoalManager state.
  • Completed normal ACP turns call GoalManager.evaluate_after_turn().
  • Continuing goals append at most one synthetic continuation prompt to state.queued_prompts.
  • Done, paused, cleared, interrupted, or empty turns do not create continuation loops.
  • Existing ACP /steer and /queue tests continue to pass.

Suggested Tests

  • Extend ACP command advertisement tests to include goal and subgoal.
  • Add ACP slash-command tests for /goal status/set/pause/resume/clear.
  • Add ACP slash-command tests for /subgoal list/add/remove/clear and invalid input.
  • Add post-turn continuation tests that verify continuation prompts use the existing queued_prompts / session flow.
  • Run the focused ACP suites:
scripts/run_tests.sh tests/acp/test_server.py tests/acp_adapter/test_acp_commands.py -q

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 ACP: add /goal and /subgoal parity with gateway/CLI standing goals [1 pull requests, 1 participants]