fix(cli): handle session.error in run command to prevent infinite wait
When session.error occurs with incomplete todos, the run command now: - Captures the error via handleSessionError() - Exits with code 1 instead of waiting indefinitely - Shows clear error message to user Previously, run command ignored session.error events, causing infinite 'Waiting: N todos remaining' loop when agent errors occurred. 🤖 Generated with assistance of OhMyOpenCode https://github.com/code-yeongyu/oh-my-opencode
This commit is contained in:
@@ -74,6 +74,8 @@ describe("event handling", () => {
|
||||
const ctx = createMockContext("my-session")
|
||||
const state: EventState = {
|
||||
mainSessionIdle: true,
|
||||
mainSessionError: false,
|
||||
lastError: null,
|
||||
lastOutput: "",
|
||||
lastPartText: "",
|
||||
currentTool: null,
|
||||
|
||||
Reference in New Issue
Block a user