feat: disable cache if exit with non-zero#102
Merged
branchseer merged 2 commits intomainfrom Jan 14, 2026
Merged
Conversation
fengmk2
approved these changes
Jan 14, 2026
Add CacheUpdateStatus enum to track whether cache was updated after task execution and why. This provides visibility into cache behavior in the Finish event. - Add CacheNotUpdatedReason enum with CacheHit, CacheDisabled, NonZeroExitStatus - Add CacheUpdateStatus enum with Updated and NotUpdated variants - Include cache_update_status in ExecutionEventKind::Finish - Update all Finish event emissions to include appropriate status Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
d50092b to
2041b38
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Enhanced Task Caching with Cache Update Status Tracking
TL;DR
Added detailed cache update status tracking to the task execution system to provide better visibility into caching operations.
What changed?
CacheUpdateStatus: Tracks whether the cache was updated or notCacheNotUpdatedReason: Provides specific reasons why a cache wasn't updated (cache hit, disabled caching, non-zero exit status)ExecutionEventKind::Finishevent to include the newcache_update_statusfieldHow to test?
Run tasks with different caching scenarios and verify the correct cache update status is reported:
CacheHitstatusCacheDisabledstatusNonZeroExitStatusstatusUpdatedstatusWhy make this change?
This change provides more detailed information about cache operations, making it easier to understand why a task's cache was or wasn't updated. This visibility helps with debugging cache-related issues and provides better insights into the task execution system's behavior.