Skip to content

refactor: move disable_session_naming into AgentConfig#7062

Merged
codefromthecrypt merged 1 commit intomainfrom
adrian/session-disable
Feb 7, 2026
Merged

refactor: move disable_session_naming into AgentConfig#7062
codefromthecrypt merged 1 commit intomainfrom
adrian/session-disable

Conversation

@codefromthecrypt
Copy link
Collaborator

Summary

Move disable_session_naming from a global config read into an injectable AgentConfig parameter, following the goose_mode pattern.

  • Promote disable_session_naming to AgentConfig and AcpServerConfig
  • ACP tests set true, removing the openai_session_description.json fixture and session rename intercept
  • Scenario tests set true, re-recorded OpenAI scenarios without the session naming interaction

Type of Change

  • Refactor / Code quality
  • Tests

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

All existing tests pass with cargo test and scripts/clippy-lint.sh.

To re-record OpenAI scenarios:

rm crates/goose-cli/src/scenario_tests/recordings/openai/*.json
OPENAI_API_KEY=sk-... cargo test -p goose-cli scenario

Related Issues

Builds on #7052

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the session-naming disable switch so it can be passed via AgentConfig/AcpServerConfig (instead of being read directly at the point of use), and updates ACP/scenario tests + OpenAI scenario recordings accordingly.

Changes:

  • Add disable_session_naming: bool to AgentConfig and thread it into the agent’s session-naming logic.
  • Promote the same flag into AcpServerConfig, update ACP fixtures/tests to disable naming, and remove the session-rename interception/fixture.
  • Update scenario test runner config and re-record OpenAI scenario fixtures to remove the extra session-naming interaction.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/goose/src/agents/agent.rs Adds disable_session_naming to AgentConfig and gates async session naming on the config value.
crates/goose/src/execution/manager.rs Passes the global disable flag into AgentConfig::new when creating agents via AgentManager.
crates/goose/tests/agent.rs Updates unit tests to the new AgentConfig::new signature.
crates/goose-cli/src/scenario_tests/scenario_runner.rs Sets disable_session_naming = true for scenario tests to keep recordings stable.
crates/goose-cli/src/scenario_tests/recordings/openai/what_is_your_name.json Re-recorded OpenAI scenario without the session-naming interaction.
crates/goose-cli/src/scenario_tests/recordings/openai/weather_tool.json Re-recorded OpenAI scenario without the session-naming interaction.
crates/goose-cli/src/scenario_tests/recordings/openai/image_analysis.json Re-recorded OpenAI scenario without the session-naming interaction.
crates/goose-acp/src/server.rs Adds disable_session_naming to AcpServerConfig and passes it into AgentConfig.
crates/goose-acp/src/server_factory.rs Constructs AcpServerConfig for ACP server creation (currently hard-codes the new flag).
crates/goose-acp/tests/fixtures/mod.rs Removes session-rename interception and sets disable_session_naming = true in ACP test config.
crates/goose-acp/tests/test_data/openai_session_description.json Removes no-longer-needed fixture used for session rename interception.
clippy-baselines/too_many_lines.txt Updates clippy baseline entries impacted by unrelated code movement/line count changes.

Replace the Config::global() read in reply_internal with an AgentConfig
parameter, following the goose_mode pattern. ACP tests and scenario
tests set the flag to true, removing canned fixtures and session naming
from recorded interactions.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

@codefromthecrypt codefromthecrypt added this pull request to the merge queue Feb 7, 2026
Merged via the queue into main with commit 948cb91 Feb 7, 2026
24 checks passed
@codefromthecrypt codefromthecrypt deleted the adrian/session-disable branch February 7, 2026 01:01
zanesq added a commit that referenced this pull request Feb 7, 2026
* 'main' of github.com:block/goose:
  refactor: move disable_session_naming into AgentConfig (#7062)
  Add global config switch to disable automatic session naming (#7052)
  docs: add blog post - 8 Things You Didn't Know About Code Mode (#7059)
  fix: ensure animated elements are visible when prefers-reduced-motion is enabled (#7047)
  Show recommended model on failture (#7040)
  feat(ui): add session content search via API (#7050)
  docs: fix img url (#7053)
  Desktop UI for deleting custom providers (#7042)
  Add blog post: How I Used RPI to Build an OpenClaw Alternative (#7051)
kuccello pushed a commit to kuccello/goose that referenced this pull request Feb 7, 2026
Signed-off-by: Adrian Cole <adrian@tetrate.io>
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