Skip to content

Conversation

@wpfleger96
Copy link
Collaborator

@wpfleger96 wpfleger96 commented Oct 8, 2025

Summary

This PR standardizes session attribute naming by migrating from the description field to name throughout the codebase, with full backwards compatibility support. The change introduces a user_set_name boolean flag to differentiate between user-provided names and auto-generated names, preventing AI from overwriting custom session names.

Key Changes

Backend: Updated SessionManager and Session struct to use name field with user_set_name flag. Database schema migration to v3 renames the sessions.description column to sessions.name and adds user_set_name column. Serde alias ensures backwards compatibility for JSON deserialization. The maybe_update_name method now respects user-set names.

Frontend: Added sessionCompat.ts utility module providing getSessionName() helper that gracefully handles both old (description) and new (name) formats. Updated components (SessionHistoryView, SessionItem, SessionListView, SessionsView) to use the compatibility layer. OpenAPI schema and TypeScript types updated to reflect new field names.

Database Migration: Includes goose-db-helper.sh script for safe schema migrations with backup capabilities. Migration tests ensure data integrity during the transition. Database changes are non-destructive with automatic backups before migration.

Type of Change

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

Testing

I added 2 unit tests for this work, and I manually tested with my local Goose

Related Issues

Related to #5044

Screenshots/Demos (for UX changes)

Before:

After:

@wpfleger96 wpfleger96 changed the title Standardize Session Name Attribute Standardize Session Name Attribute (WIP) Oct 8, 2025
@DOsinga
Copy link
Collaborator

DOsinga commented Oct 11, 2025

let me know when you need a review

* main: (55 commits)
  [docs] Add Blog Post: "Designing AI for Users, Not Just LLMs" (block#5190)
  docs: update cognee, jetbrains, mbot extensions config (block#5172)
  Minimally disable subagents when not in autonomous model (block#5149)
  Fix provider sort (block#5188)
  blog: Getting Started with Goose on Windows (block#5156)
  feat: add CI/CD Pipeline recipe (block#5183)
  feat: add Daily Standup Report Generator recipe (block#5123)  (block#5131)
  Sort providers in alphabetical vs random (block#5090)
  Declarative providers (block#5084)
  adding youtube link to firecrawl mcp tutorial, merge after 9am Eastern Oct 15 (block#5173)
  Ollama integration: modified default model + added models  (block#5153)
  Fix codex subagent configuration in documentation (block#5180)
  fix: include apple silicon build of the desktop app in build artifacts (block#5174)
  fixing video embed (block#5171)
  chore: clean up random unused files (block#5166)
  fix: adjust download_cli.sh to tolerate no OS variable (block#5169)
  mcp tutorial page for firecrawl (block#5152)
  Remove orphaned tool calls before compaction (block#5059)
  feat: add copy as markdown button to documentation pages (block#5158)
  chore: include vendored node executable (block#5160)
  ...
* main:
  Compaction overhaul (block#5186)
  fix: block#3960 better approach to input schema for dynamic task params (block#5189)
  used recipe id or deeplink to start agent (block#5154)
@wpfleger96 wpfleger96 marked this pull request as ready for review October 15, 2025 23:51
@wpfleger96
Copy link
Collaborator Author

@DOsinga this should be ready for review now!

let me know what you think about the goose-db-helper.sh script, it was pretty helpful for me while testing but it ended up getting pretty massive... maybe that should be refactored into a proper Python package

@wpfleger96 wpfleger96 changed the title Standardize Session Name Attribute (WIP) Standardize Session Name Attribute Oct 16, 2025
@wpfleger96
Copy link
Collaborator Author

wpfleger96 commented Oct 16, 2025

Test failure is unrelated and addressed in #5207

* main:
  Blog: Best Practices for Prompt Engineering with goose (block#5204)
  force WAL sync after session create (block#5202)
  Feat: goose Apify MCP integration docs (block#5047)
  feat: enhance goose to search sessions for easy recall (block#5177)
  Skip hidden & real format (block#5194)
  docs: Hacktoberfest blog submission - Best Practices for Using Goose in Enterprise Environments by Anudhyan Datta. (block#5184)
  docs: prompt injection detection (block#5193)
  Fix mcp large response race condition (block#5065)
* main:
  Revert "feat: enhance goose to search sessions for easy recall (block#5177)" (block#5209)
@wpfleger96
Copy link
Collaborator Author

@DOsinga I think I addressed all your feedback, would you mind giving this another glance over before I merge?

Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

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

I think we should revert to making name required when starting a session

@wpfleger96 wpfleger96 force-pushed the wpfleger/standardize-session-attributes branch from 2f28716 to 43d9416 Compare October 17, 2025 20:14
Resolved conflicts in auto-generated API files by regenerating them
using the updated @hey-api/openapi-ts v0.85.2 package. The regenerated
files properly incorporate both the session naming standardization
changes from this branch and the latest updates from main.
@wpfleger96
Copy link
Collaborator Author

@DOsinga ok this should be ready for another glance over, per your feedback I reverted back to requiring a name when starting a session

@DOsinga
Copy link
Collaborator

DOsinga commented Oct 17, 2025

yeah merge when ready!

@DOsinga DOsinga merged commit b8c3508 into block:main Oct 17, 2025
13 of 15 checks passed
michaelneale added a commit that referenced this pull request Oct 18, 2025
* main:
  Standardize Session Name Attribute (#5085)
  Docs: Include step-by-step model configuration instructions for first… (#5239)
  Delete message visibility filter (#5216)
  delete flaky pricing integration tests (#5207)
  chore: upgrade most npm packages to latest (#5185)
  Release/1.11.0 (#5224)
  Rewrite extension management tools (#5057)
  fix: re-sync package-lock.json (#5235)
  docs: Hacktoberfest MCP youtube short entry to community-content.json (#5150)
  feat: add schedule button to recipe entries (#5217)
  Autocompact threshold UI cleanup (#5232)
  fix: correct schema for openai tools (#5229)
@michaelneale
Copy link
Collaborator

this isn't backwards compatible if you roll back a version of goose (which may happen):

image
17:46:43.054 › from renderer: [UNHANDLED REJECTION] Error: Failed to create session: error returned from database: (code: 1) table sessions has no column named description

or in cli:

thread 'main' panicked at /Users/micn/Development/goose/crates/goose-cli/src/session/builder.rs:319:10:
called Result::unwrap() on an Err value: error returned from database: (code: 1) table sessions has no column named description

So this is only one way compatible. I think need to roll it back unless there is a strategy for this.

@DOsinga
Copy link
Collaborator

DOsinga commented Oct 18, 2025

it's a good point. we should roll this back and then do it by adding the column name and keep description around for a while

@wpfleger96
Copy link
Collaborator Author

👍 great point, let's roll back and I'll try again next week and be careful to make this more backwards compatible

@DOsinga
Copy link
Collaborator

DOsinga commented Oct 18, 2025

thank you @wpfleger96 !

tlongwell-block added a commit that referenced this pull request Oct 18, 2025
* origin/main: (66 commits)
  Revert "Rewrite extension management tools" (#5243)
  Standardize Session Name Attribute (#5085)
  Docs: Include step-by-step model configuration instructions for first… (#5239)
  Delete message visibility filter (#5216)
  delete flaky pricing integration tests (#5207)
  chore: upgrade most npm packages to latest (#5185)
  Release/1.11.0 (#5224)
  Rewrite extension management tools (#5057)
  fix: re-sync package-lock.json (#5235)
  docs: Hacktoberfest MCP youtube short entry to community-content.json (#5150)
  feat: add schedule button to recipe entries (#5217)
  Autocompact threshold UI cleanup (#5232)
  fix: correct schema for openai tools (#5229)
  Break compaction back into check_ and do_ compaction (#5212)
  fix: revert built app name to uppercase Goose (#5206)
  feat: add Code Documentation Generator recipe (#5121) (#5125)
  Revert "feat: enhance goose to search sessions for easy recall (#5177)" (#5209)
  Blog: Best Practices for Prompt Engineering with goose (#5204)
  force WAL sync after session create (#5202)
  Feat: goose Apify MCP integration docs (#5047)
  ...
lifeizhou-ap added a commit that referenced this pull request Oct 19, 2025
* main: (32 commits)
  turn off WAL (#5203)
  Skip subagents for gemini (#5257)
  Revert "Standardize Session Name Attribute" (#5250)
  improve provider request logging a bit (#5236)
  Fix OpenAI empty choices panic (#5248)
  Revert "Rewrite extension management tools" (#5243)
  Standardize Session Name Attribute (#5085)
  Docs: Include step-by-step model configuration instructions for first… (#5239)
  Delete message visibility filter (#5216)
  delete flaky pricing integration tests (#5207)
  chore: upgrade most npm packages to latest (#5185)
  Release/1.11.0 (#5224)
  Rewrite extension management tools (#5057)
  fix: re-sync package-lock.json (#5235)
  docs: Hacktoberfest MCP youtube short entry to community-content.json (#5150)
  feat: add schedule button to recipe entries (#5217)
  Autocompact threshold UI cleanup (#5232)
  fix: correct schema for openai tools (#5229)
  Break compaction back into check_ and do_ compaction (#5212)
  fix: revert built app name to uppercase Goose (#5206)
  ...
katzdave added a commit that referenced this pull request Oct 20, 2025
* 'main' of github.com:block/goose:
  docs: provide more clarity in tagging step of releases (#5269)
  docs: add GOOSE_DEBUG environment variable (#5265)
  Lifei/UI parameter input (#5222)
  turn off WAL (#5203)
  Skip subagents for gemini (#5257)
  Revert "Standardize Session Name Attribute" (#5250)
  improve provider request logging a bit (#5236)
  Fix OpenAI empty choices panic (#5248)
  Revert "Rewrite extension management tools" (#5243)
  Standardize Session Name Attribute (#5085)
  Docs: Include step-by-step model configuration instructions for first… (#5239)
  Delete message visibility filter (#5216)
  delete flaky pricing integration tests (#5207)
  chore: upgrade most npm packages to latest (#5185)
  Release/1.11.0 (#5224)
michaelneale added a commit that referenced this pull request Oct 21, 2025
* main: (40 commits)
  Fix extension manager resource deadlock (#5066)
  add new prompt for memory extension (#4945)
  feat: Stable system prompt and tool ordering for more cache hits (#5192)
  Remove gtag analytics error (#5268)
  Feat/smart task organizer recipe (#5032)
  docs: `goose recipe open` command (#5264)
  docs: provide more clarity in tagging step of releases (#5269)
  docs: add GOOSE_DEBUG environment variable (#5265)
  Lifei/UI parameter input (#5222)
  turn off WAL (#5203)
  Skip subagents for gemini (#5257)
  Revert "Standardize Session Name Attribute" (#5250)
  improve provider request logging a bit (#5236)
  Fix OpenAI empty choices panic (#5248)
  Revert "Rewrite extension management tools" (#5243)
  Standardize Session Name Attribute (#5085)
  Docs: Include step-by-step model configuration instructions for first… (#5239)
  Delete message visibility filter (#5216)
  delete flaky pricing integration tests (#5207)
  chore: upgrade most npm packages to latest (#5185)
  ...
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