diff --git a/src/session.ts b/src/session.ts index 2e2f5fc3..8fd69402 100644 --- a/src/session.ts +++ b/src/session.ts @@ -1317,9 +1317,9 @@ export class Session extends EventEmitter { assignTask(taskId: string): void { this._currentTaskId = taskId; this._status = 'busy'; - this._terminalBuffer = ''; + this._terminalBuffer.clear(); this._outputBuffer = ''; - this._textOutput = ''; + this._textOutput.clear(); this._errorBuffer = ''; this._messages = []; this._lastActivityAt = Date.now(); diff --git a/test/session.test.ts b/test/session.test.ts index 4e3e31c2..37146936 100644 --- a/test/session.test.ts +++ b/test/session.test.ts @@ -15,7 +15,7 @@ describe('Interactive Session Lifecycle', () => { afterAll(async () => { await server.stop(); - }); + }, 60000); // Extended timeout for cleanup describe('Session Creation', () => { it('should create session with default working directory', async () => {