Visual Studio 2022 - endless ' Loading Cody chat ..' (cody 0.4.0)

From the Cody Console:

11:33:46.479: [ProcessId:59320] [ThreadId:1] Info [Create] Version: 0.4.0.0 (x64) Agent:vscode-v1.66.0 Node:20.12.2 Release build
11:33:46.530: [ProcessId:59320] [ThreadId:1] Info [InitializeServices] Visual Studio version: 17.13.3 (Professional)
11:33:46.801: [ProcessId:59320] [ThreadId:35] Info [CreateConnector] Process agent connector created
11:33:47.006: [ProcessId:59320] [ThreadId:9] Error [OnDisconnected] Agent disconnected due to Reached end of stream. (reason: RemotePartyTerminated)
11:33:47.011: [ProcessId:59320] [ThreadId:24] Info [DisconnectInternal] The connection with the agent has been terminated.
11:33:47.074: [ProcessId:59320] [ThreadId:24] Info [OnAgentDisconnected] Restarting the agent.
11:33:47.082: [ProcessId:59320] [ThreadId:24] Info [CreateConnector] Process agent connector created
11:33:47.116: [ProcessId:59320] [ThreadId:35] Info [CreateAgentService] A connection with the agent has been established.
11:33:47.282: [ProcessId:59320] [ThreadId:12] Error [OnDisconnected] Agent disconnected due to Reached end of stream. (reason: RemotePartyTerminated)
11:33:47.175: [ProcessId:59320] [ThreadId:35] Error [InitializeAgent] Agent initialization failed.
Cannot access a disposed object.
Object name: 'Cody.VisualStudio.Client.TraceJsonRpc'.
   at Microsoft.Verify.NotDisposed(IDisposableObservable disposedValue, String message)
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__156`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Cody.VisualStudio.Client.AgentClient.<Initialize>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Cody.VisualStudio.CodyPackage.<<InitializeAgent>b__42_0>d.MoveNext()

11:33:47.285: [ProcessId:59320] [ThreadId:24] Info [DisconnectInternal] The connection with the agent has been terminated.
11:33:47.352: [ProcessId:59320] [ThreadId:24] Info [OnAgentDisconnected] Restarting the agent.
11:33:47.353: [ProcessId:59320] [ThreadId:24] Info [CreateConnector] Process agent connector created
11:33:47.765: [ProcessId:59320] [ThreadId:17] Error [OnDisconnected] Agent disconnected due to Reached end of stream. (reason: RemotePartyTerminated)
11:33:47.768: [ProcessId:59320] [ThreadId:24] Info [DisconnectInternal] The connection with the agent has been terminated.

And right now the Cody Output is like that:

11:40:03.265: [ProcessId:7752] [ThreadId:1] Info [Create] Version: 0.4.0.0 (x64) Agent:vscode-v1.66.0 Node:20.12.2 Release build
11:40:03.349: [ProcessId:7752] [ThreadId:1] Info [InitializeServices] Visual Studio version: 17.13.3 (Professional)
11:40:03.552: [ProcessId:7752] [ThreadId:41] Info [CreateConnector] Process agent connector created
11:40:03.770: [ProcessId:7752] [ThreadId:5] Error [OnDisconnected] Agent disconnected due to Reached end of stream. (reason: RemotePartyTerminated)
11:40:03.776: [ProcessId:7752] [ThreadId:30] Info [DisconnectInternal] The connection with the agent has been terminated.
11:40:03.868: [ProcessId:7752] [ThreadId:41] Info [CreateAgentService] A connection with the agent has been established.
11:40:03.916: [ProcessId:7752] [ThreadId:30] Info [OnAgentDisconnected] Restarting the agent.
11:40:03.927: [ProcessId:7752] [ThreadId:41] Error [InitializeAgent] Agent initialization failed.
Cannot access a disposed object.
Object name: 'Cody.VisualStudio.Client.TraceJsonRpc'.
   at Microsoft.Verify.NotDisposed(IDisposableObservable disposedValue, String message)
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__156`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Cody.VisualStudio.Client.AgentClient.<Initialize>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Cody.VisualStudio.CodyPackage.<<InitializeAgent>b__42_0>d.MoveNext()

Hey @muffmolch

Thanks for the issue report. The extension for Visual Studio is in an early experimental state and not yet as mature as for Visual Studio Code or JetBrains. We are working hard to improve it.

Sorry for the inconvenience.