hermes - 💡(How to fix) Fix [Feature]: Publish effective ACP mode after mode changes [1 pull requests]

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…

Root Cause

  • Returning Hermes-specific _meta.hermes.currentModeId in direct responses. This helps request/response clients, but it does not help passive observers and is less protocol-native than CurrentModeUpdate.
  • Re-sending the full availableModes list on every mutation. That seems unnecessary because available modes are already advertised during session creation/load/resume.
  • Adding new top-level fields to ACP response schemas. That would require schema changes and is unnecessary for the current mode-state synchronization problem.
  • Leaving clients to issue a follow-up state query. That adds round trips and still leaves avoidable ambiguity around immediately effective state.

Fix Action

Fixed

Code Example

{
  "sessionUpdate": "current_mode_update",
  "currentModeId": "accept_edits"
}
RAW_BUFFERClick to expand / collapse

Problem or Use Case

ACP clients can change Hermes session mode through both session/set_mode and session/set_config_option with configId: "edit_approval_policy", but those handlers currently return protocol-minimal responses without publishing the effective mode back to the client.

That makes normalization and mapping hard for clients to observe:

  • session/set_mode normalizes/validates the requested mode and falls back to default for unknown values.
  • session/set_config_option(configId="edit_approval_policy", ...) maps approval-policy values such as workspace_session to an ACP mode such as accept_edits, and falls back to default for unknown values.
  • The session already exposes authoritative mode state during session/new, session/load, and session/resume, but not after these mutation requests.

As a result, a client can receive a successful empty response while still not knowing whether the requested value became the active mode, was mapped to another mode, or fell back to default.

Proposed Solution

After a successful effective-mode mutation, emit ACP's protocol-native CurrentModeUpdate notification:

{
  "sessionUpdate": "current_mode_update",
  "currentModeId": "accept_edits"
}

Emit it from:

  • set_session_mode, using the normalized effective mode.
  • set_config_option only when configId == "edit_approval_policy", using the mapped effective mode.

Keep the existing direct response shapes unchanged (SetSessionModeResponse / SetSessionConfigOptionResponse) and avoid emitting mode updates for unrelated config options or missing sessions.

Treat session/set_model as a separate follow-up: it has similar empty-response ergonomics, but ACP does not currently expose an equivalent current_model_update payload.

Alternatives Considered

  • Returning Hermes-specific _meta.hermes.currentModeId in direct responses. This helps request/response clients, but it does not help passive observers and is less protocol-native than CurrentModeUpdate.
  • Re-sending the full availableModes list on every mutation. That seems unnecessary because available modes are already advertised during session creation/load/resume.
  • Adding new top-level fields to ACP response schemas. That would require schema changes and is unnecessary for the current mode-state synchronization problem.
  • Leaving clients to issue a follow-up state query. That adds round trips and still leaves avoidable ambiguity around immediately effective state.

Feature Type

Other — ACP adapter / client integration behavior.

Scope

Medium (few files, under 300 lines).

Contribution

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

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