@@ -117,12 +117,18 @@ func TestRpc(t *testing.T) {
117117
118118func TestSessionRpc (t * testing.T ) {
119119 ctx := testharness .NewTestContext (t )
120+ client := ctx .NewClient ()
121+ t .Cleanup (func () { client .ForceStop () })
122+
123+ if err := client .Start (t .Context ()); err != nil {
124+ t .Fatalf ("Failed to start client: %v" , err )
125+ }
120126
121127 // session.model.getCurrent is defined in schema but not yet implemented in CLI
122128 t .Run ("should call session.RPC.Model.GetCurrent" , func (t * testing.T ) {
123129 t .Skip ("session.model.getCurrent not yet implemented in CLI" )
124130
125- session , err := ctx . Client .CreateSession (t .Context (), & copilot.SessionConfig {
131+ session , err := client .CreateSession (t .Context (), & copilot.SessionConfig {
126132 Model : "claude-sonnet-4.5" ,
127133 })
128134 if err != nil {
@@ -143,7 +149,7 @@ func TestSessionRpc(t *testing.T) {
143149 t .Run ("should call session.RPC.Model.SwitchTo" , func (t * testing.T ) {
144150 t .Skip ("session.model.switchTo not yet implemented in CLI" )
145151
146- session , err := ctx . Client .CreateSession (t .Context (), & copilot.SessionConfig {
152+ session , err := client .CreateSession (t .Context (), & copilot.SessionConfig {
147153 Model : "claude-sonnet-4.5" ,
148154 })
149155 if err != nil {
0 commit comments