Skip to content

Conversation

@codefromthecrypt
Copy link
Collaborator

Summary

Switch session correlation from goose-session-id/GOOSE_SESSION_ID to agent-session-id/AGENT_SESSION_ID.

This enables MCP servers and LLM gateways to add goose support without implying they need to hard-code every agent.

This comes out of a discussion in MCP gateway interest group where the most important correlation after otel is the agent session id.
While not all things call this "session", ACP does and that gives over a dozen agents a vocab mapping.

For us, all it means is s/goose/agent/g

Once merged, I'll update Envoy AI Gateway goose+otel example from goose-session-id -> agent-session-id.

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

just updates to test data

Copilot AI review requested due to automatic review settings January 22, 2026 01:06
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 standardizes session correlation from goose-session-id/GOOSE_SESSION_ID to agent-session-id/AGENT_SESSION_ID, enabling MCP servers and LLM gateways to support goose without hardcoding agent-specific identifiers.

Changes:

  • Updated session ID header constant from "goose-session-id" to "agent-session-id"
  • Renamed environment variable from GOOSE_SESSION_ID to AGENT_SESSION_ID across all shell configurations
  • Updated test replay files to use the new agent-session-id field in MCP metadata

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/goose/src/session_context.rs Updated SESSION_ID_HEADER constant from "goose-session-id" to "agent-session-id"
crates/goose-cli/src/commands/term.rs Updated shell configurations (bash, zsh, fish, powershell) to export AGENT_SESSION_ID and updated error messages referencing the environment variable
crates/goose/tests/mcp_replays/uvxmcp-server-fetch Updated test replay to use agent-session-id in MCP _meta field
crates/goose/tests/mcp_replays/npx-y@modelcontextprotocol_server-everything Updated test replay to use agent-session-id in MCP _meta field
crates/goose/tests/mcp_replays/github-mcp-serverstdio Updated test replay to use agent-session-id in MCP _meta field
crates/goose/tests/mcp_replays/cargorun--quiet-pgoose-server--bingoosed--mcpdeveloper Updated test replay to use agent-session-id in MCP _meta field

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt codefromthecrypt merged commit 967fe50 into main Jan 22, 2026
20 checks passed
@codefromthecrypt codefromthecrypt deleted the agent-session-id branch January 22, 2026 04:47
katzdave added a commit that referenced this pull request Jan 22, 2026
…ovider

* 'main' of github.com:block/goose:
  PR Code Review (#6043)
  fix(docs): use dynamic import for globby ESM module (#6636)
  chore: trigger CI
  Document tab completion (#6635)
  Install goose-mcp crate dependencies (#6632)
  feat(goose): standardize agent-session-id for session correlation (#6626)
  chore: tweak release docs (#6571)
  fix(goose): propagate session_id across providers and MCP (#6584)
wpfleger96 added a commit that referenced this pull request Jan 22, 2026
* main: (68 commits)
  fix(docs): use dynamic import for globby ESM module (#6636)
  chore: trigger CI
  Document tab completion (#6635)
  Install goose-mcp crate dependencies (#6632)
  feat(goose): standardize agent-session-id for session correlation (#6626)
  chore: tweak release docs (#6571)
  fix(goose): propagate session_id across providers and MCP (#6584)
  increase worker threads for ci (#6614)
  docs: todo tutorial update (#6613)
  Added goose doc map md file for goose agent to find relevant doc easily. (#6598)
  add back goose branding to home (#6617)
  fix: actually set the working dir for extensions from session (#6612)
  Multi chat (#6428)
  Lifei/fixed accumulated token count (#6587)
  Dont show MCP UI/Apps until tool is approved (#6492)
  docs: max tokens config (#6596)
  User configurable templates (#6420)
  docs: http proxy environment variables (#6594)
  feat: exclude subagent tool from code_execution filtering (#6531)
  Fix path for global agent skills (#6591)
  ...
wpfleger96 added a commit that referenced this pull request Jan 22, 2026
* main: (68 commits)
  fix(docs): use dynamic import for globby ESM module (#6636)
  chore: trigger CI
  Document tab completion (#6635)
  Install goose-mcp crate dependencies (#6632)
  feat(goose): standardize agent-session-id for session correlation (#6626)
  chore: tweak release docs (#6571)
  fix(goose): propagate session_id across providers and MCP (#6584)
  increase worker threads for ci (#6614)
  docs: todo tutorial update (#6613)
  Added goose doc map md file for goose agent to find relevant doc easily. (#6598)
  add back goose branding to home (#6617)
  fix: actually set the working dir for extensions from session (#6612)
  Multi chat (#6428)
  Lifei/fixed accumulated token count (#6587)
  Dont show MCP UI/Apps until tool is approved (#6492)
  docs: max tokens config (#6596)
  User configurable templates (#6420)
  docs: http proxy environment variables (#6594)
  feat: exclude subagent tool from code_execution filtering (#6531)
  Fix path for global agent skills (#6591)
  ...
wpfleger96 added a commit that referenced this pull request Jan 22, 2026
* main: (68 commits)
  fix(docs): use dynamic import for globby ESM module (#6636)
  chore: trigger CI
  Document tab completion (#6635)
  Install goose-mcp crate dependencies (#6632)
  feat(goose): standardize agent-session-id for session correlation (#6626)
  chore: tweak release docs (#6571)
  fix(goose): propagate session_id across providers and MCP (#6584)
  increase worker threads for ci (#6614)
  docs: todo tutorial update (#6613)
  Added goose doc map md file for goose agent to find relevant doc easily. (#6598)
  add back goose branding to home (#6617)
  fix: actually set the working dir for extensions from session (#6612)
  Multi chat (#6428)
  Lifei/fixed accumulated token count (#6587)
  Dont show MCP UI/Apps until tool is approved (#6492)
  docs: max tokens config (#6596)
  User configurable templates (#6420)
  docs: http proxy environment variables (#6594)
  feat: exclude subagent tool from code_execution filtering (#6531)
  Fix path for global agent skills (#6591)
  ...
lifeizhou-ap added a commit that referenced this pull request Jan 22, 2026
* main:
  docs: ml-based prompt injection detection (#6627)
  Strip the audience for compacting (#6646)
  chore(release): release version 1.21.0 (minor) (#6634)
  add collapsable chat nav (#6649)
  fix: capitalize Rust in CONTRIBUTING.md (#6640)
  chore(deps): bump lodash from 4.17.21 to 4.17.23 in /ui/desktop (#6623)
  Vibe mcp apps (#6569)
  Add session forking capability (#5882)
  chore(deps): bump lodash from 4.17.21 to 4.17.23 in /documentation (#6624)
  fix(docs): use named import for globby v13 (#6639)
  PR Code Review (#6043)
  fix(docs): use dynamic import for globby ESM module (#6636)
  chore: trigger CI
  Document tab completion (#6635)
  Install goose-mcp crate dependencies (#6632)
  feat(goose): standardize agent-session-id for session correlation (#6626)
fbalicchia pushed a commit to fbalicchia/goose that referenced this pull request Jan 23, 2026
…ock#6626)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: fbalicchia <fbalicchia@cuebiq.com>
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