fix: preserve native ACP permissions in remote Council sessions#412
Merged
DylenTurnbull merged 4 commits intoJul 21, 2026
Merged
Conversation
Remove Council-owned permission injection from interactive and remote Thor sessions so Codex remains authoritative for its native session configuration. Keep the explicit headless permission flag as the separate headless-only policy path, while retaining Mjolnir-enforced read-only boundaries for Loki and Eitri Explore. Expose the native Codex Mode in the remote viewer as read-only live session status rather than a Mjolnir-controlled selector. The remote UI cannot mutate it, and stale or direct Mode updates are rejected, avoiding a second permission authority while still making the current native setting visible. Route the confirmed native MCP approval form for Mjolnir-injected Loki and Eitri Explore tools through explicit remote Allow once/session/always or Decline choices. Unsupported elicitation forms remain safely declined. This prevents the remote host from cancelling the supported MCP approval before the read-only worker starts.
Rename the read-only remote session Mode label and help text from Codex-specific wording to native ACP harness wording. The status remains live and non-editable, accurately covering every harness that advertises an ACP Mode option without implying that Mjolnir owns or infers its effective permissions.
This was referenced Jul 20, 2026
Align existing all-targets fixtures with the native Mode status and bounded remote approval types. No production behavior changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #403.
This change removes Mjolnir as a competing permission-policy authority for interactive and remote ACP-backed Council sessions. It preserves the ACP harness as the authority for Thor and Eitri-code native session behavior, while retaining Mjolnir-owned role boundaries for Loki and Eitri Explore.
The original report correctly identified a confusing remote Mode control and cancelled Loki/Eitri flows. Live remote protocol capture refined the root cause: the observed cancellation occurred before either worker started, when the active harness requested approval for an injected Mjolnir MCP tool and the remote host automatically cancelled an unsupported ACP elicitation form. The fix addresses both the authority mismatch and that concrete remote approval route without treating a Mode label as proof of effective harness permissions.
Key Changes:
--permission-modepath as a separate, deliberate headless response policy.Native session modestatus. Mjolnir does not infer a security level from that label, persist it, set it, or reapply it.mj-loki-pull/pull_adviceandmj-code-agent/explore_agentthrough explicit remote choices: Allow once, Allow for session, Allow always, or Decline.Why these choices:
Mjolnir previously applied a Council preset to provider-native configuration and hid the provider control to avoid two contradictory controls. That design coupled Mjolnir to provider-specific permission semantics and made a remote selector look like a Council-wide authority. It also required lifecycle reapplication of a setting whose real enforcement belongs to the harness.
This PR instead uses a single-source-of-truth model: the active ACP harness defines its own session configuration and permission behavior; Mjolnir enforces role-specific constraints that it genuinely owns. The read-only Mode display is intentionally informational, not an effective-permission attestation: an ACP Mode label does not universally prove the sandbox or approval policy currently enforced by an adapter.
The remote MCP path is deliberately narrow. The live capture showed the native request requires a structured
persistscope answer, not a generic yes/no response. Accepting only the two known injected Mjolnir tools and returning the user-selected native scope fixes the demonstrated flow without converting the remote viewer into a general-purpose ACP elicitation broker.UI/Session Evidence:
pull_advice; Eitri Exploreexplore_agent.Native session modestatus, with an active-ACP-harness explanation behind a?pop-up.?pop-up were confirmed.Touch Points:
Validation:
cargo fmt --checkcargo checkcargo build --releasegit diff --checkpull_advice: Allow once and Allow for session both returned the exact nativepersistscope and completed without error.explore_agent: Allow once returned the exact nativepersistscope; the worker started, completed, and returned its read-only report.user cancelled MCP tool call/user rejected MCP tool callresult in the successful retest.?pop-up in the remote viewer.