feat(sisyphus_task): enhance error messages with detailed context

Add formatDetailedError helper that includes:
- Full args dump (description, category, agent, skills)
- Session ID and agent info
- Stack trace (first 10 lines)

Applied to all catch blocks for better debugging.
This commit is contained in:
justsisyphus
2026-01-15 18:54:04 +09:00
parent 6c8099e78e
commit 4ccc0b3f26
2 changed files with 84 additions and 10 deletions
+4 -2
View File
@@ -541,10 +541,12 @@ describe("sisyphus-task", () => {
toolContext
)
// #then - should return error message with the prompt error
// #then - should return detailed error message with args and stack trace
expect(result).toContain("❌")
expect(result).toContain("Failed to send prompt")
expect(result).toContain("Send prompt failed")
expect(result).toContain("JSON Parse error")
expect(result).toContain("**Arguments**:")
expect(result).toContain("**Stack Trace**:")
})
test("sync mode success returns task result with content", async () => {