fix(acp): goal-unavailable notice gating on resume#503
Merged
CSRessel merged 4 commits intoJun 8, 2026
Conversation
5 tasks
…sume On resume into a non-MCP session, only Active goals emitted the "/goal is unavailable" notice; Paused/Blocked/UsageLimited goals fell through to resume_notice, which suggests `/goal resume` even though `/goal` is disabled for non-MCP agents. Centralize the decision in a new ThreadGoalState::resume_notice_for that surfaces the unavailable notice for any in-play goal when automation is absent.
emit_goal_unavailable routed through emit_client_event, which records SessionUpdateInfo to the transcript. Since the transcript replays on resume, every /goal op in a non-MCP session accumulated a duplicate "unavailable" notice — contradicting the design where resume notices are deliberately not persisted. Emit it directly to the client channel instead, like the resume-notice path.
Reflect the resume_notice_for gating (unavailable notice for any in-play goal in a non-MCP session, never a misleading /goal resume affordance) and that op-time/resume goal notices are emitted directly to the client without transcript recording.
Move EnvGuard from part5 into tests/mod.rs so the goal resume tests in part4 can use it instead of a manual restore closure that leaks MOCK_AGENT_MCP_HTTP into later #[serial] tests if an assertion panics before the restore runs.
2f44df8 to
8f05bbd
Compare
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.
Summary
Goal-notice fixes for nori-client MCP goal resume, split out from the original combined cleanup PR (the browser-CDP fixes now live in #505 targeting main).
EnvGuardacross the goal resume tests.Targets
feat/nori-client-mcp-cleanup.Test plan
cargo test -p nori-acp(574 pass, with the feat-branch mock agent built)cargo clippy -p nori-acp --tests(clean)cargo fmt --check