Skip to content

Recover stale Slack thread_ts in hook mode#16

Merged
koichiro merged 1 commit intomainfrom
feature/recover-slack-broken-thread
Apr 5, 2026
Merged

Recover stale Slack thread_ts in hook mode#16
koichiro merged 1 commit intomainfrom
feature/recover-slack-broken-thread

Conversation

@koichiro
Copy link
Copy Markdown
Owner

@koichiro koichiro commented Apr 5, 2026

Add automatic recovery when a saved Slack thread timestamp is rejected. Introduces SlackClient::Error with an error_code, and adds HookRunner helpers (session_root_text, stale_thread_error?, post_with_thread_recovery) that clear the stored thread, recreate the session thread, and retry the post once for errors like thread_not_found, message_not_found, or invalid_ts. Update pre/post-tool, prompt submit and stop handlers to use the recovery path. Add tests for UserPromptSubmit and Stop recovery, and document the behavior in the README. Also add a small session file used by tests.

Add automatic recovery when a saved Slack thread timestamp is rejected. Introduces SlackClient::Error with an error_code, and adds HookRunner helpers (session_root_text, stale_thread_error?, post_with_thread_recovery) that clear the stored thread, recreate the session thread, and retry the post once for errors like thread_not_found, message_not_found, or invalid_ts. Update pre/post-tool, prompt submit and stop handlers to use the recovery path. Add tests for UserPromptSubmit and Stop recovery, and document the behavior in the README. Also add a small session file used by tests.
@koichiro koichiro merged commit e5613e8 into main Apr 5, 2026
4 checks passed
@koichiro koichiro deleted the feature/recover-slack-broken-thread branch April 5, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant