goose icon indicating copy to clipboard operation
goose copied to clipboard

Jetbrains Extension Failure - Attempted access outside session directory

Open danielmtavares opened this issue 3 months ago • 4 comments

Describe the bug

The Jetbrains extension fails and attempting to have goose help debug the failure ends with an error saying " Attempted access outside session directory".

To Reproduce

Steps to reproduce the behavior:

  1. Enable the Jetbrains extension
  2. Start a new goose session
  3. Allow goose to help debug the JetBrains extension failure
  4. See error

Expected behavior Goose should initialize without any errors.

Screenshots

➜  test pwd
/Users/daniel/Dev/test
➜  test goose session
◇  Would you like me to help debug the 'jetbrains' extension failure?
│  Yes 
│
🔧 Starting debugging session...
  2025-08-26T20:22:52.188419Z  WARN goose::session::storage: Attempted access outside session directory: "/var/folders/dh/75xccttx7c1_1kw53kxglcxc0000gn/T/goose_debug_extension_jetbrains.jsonl" not within "/Users/daniel/.local/share/goose/sessions"                                                                                                                                                                      
    at crates/goose/src/session/storage.rs:191

Warning: Failed to load message history: Path not allowed
Analyzing the extension failure...
  2025-08-26T20:22:52.188663Z  WARN goose::session::storage: Attempted access outside session directory: "/var/folders/dh/75xccttx7c1_1kw53kxglcxc0000gn/T/goose_debug_extension_jetbrains.jsonl" not within "/Users/daniel/.local/share/goose/sessions"                                                                                                                                                                      
    at crates/goose/src/session/storage.rs:191

❌ Debugging session failed: Path not allowed
starting session | provider: google model: gemini-2.0-flash-exp
    logging to /Users/daniel/.local/share/goose/sessions/20250826_162249.jsonl
    working directory: /Users/daniel/Dev/test

Goose is running! Enter your instructions, or try asking what goose can do.

Context: ○○○○○○○○○○ 0% (0/1000000 tokens)
( O)> Press Enter to send, Ctrl-J for new line

Closing session. Recorded to /Users/daniel/.local/share/goose/sessions/20250826_162249.jsonl
➜  test goose -V
 1.6.0
➜  test cat /Users/daniel/.local/share/goose/sessions/20250826_162249.jsonl
➜  test 

Please provide following information:

  • OS & Arch: macOS Sequoia 15.6.1
  • Interface: CLI
  • Version: 1.6.0
  • Extensions enabled: Computer Controller, Developer, Jetbrains
  • Provider & Model: Google - gemini-2.0-flash-exp

Additional context

I'm using Jetbrains Rider and I do have the MCP Server Plugin installed.

danielmtavares avatar Aug 26 '25 20:08 danielmtavares

Even I faced the same issue . Does anyone knows the fix for this . It is happening when configuring custom extensions in CLI mode .

🔧 Starting debugging session...
  2025-09-23T16:55:43.962280Z  WARN goose::session::storage: Attempted access outside session directory: "/tmp/goose_debug_extension_unify.jsonl" not within "/root/.local/share/goose/sessions"
    at crates/goose/src/session/storage.rs:206

Amankkc avatar Sep 23 '25 17:09 Amankkc

Even I faced the same issue . Does anyone knows the fix for this . It is happening when configuring custom extensions in CLI mode .

🔧 Starting debugging session...
  2025-09-23T16:55:43.962280Z  WARN goose::session::storage: Attempted access outside session directory: "/tmp/goose_debug_extension_unify.jsonl" not within "/root/.local/share/goose/sessions"
    at crates/goose/src/session/storage.rs:206

This is not the proper root cause . Try debugging further using - goose session --with-extension --debug to find the exact RCA . In my case one file was missing and I was able to find the proper I/O error after debugging .

Amankkc avatar Sep 25 '25 18:09 Amankkc

I agree, I think the issue here is that it tries to load a session outside of the allowed range when debugging, not when loading the extension. this should be fixed on main. can you try there?

DOsinga avatar Sep 30 '25 12:09 DOsinga

@danielmtavares @Amankkc Can you report on whether this still happens on newer versions of goose?

alexhancock avatar Oct 30 '25 21:10 alexhancock

Going to close this one out, but feel free to re-open if there is an issue

alexhancock avatar Nov 10 '25 20:11 alexhancock