Skip to content

fix(cli): improve --continue flag reliability with Promise-based response handling#5141

Merged
marius-kilocode merged 2 commits intoKilo-Org:mainfrom
PeterDaveHelloKitchen:fix/cli-continue-reliability
Jan 17, 2026
Merged

fix(cli): improve --continue flag reliability with Promise-based response handling#5141
marius-kilocode merged 2 commits intoKilo-Org:mainfrom
PeterDaveHelloKitchen:fix/cli-continue-reliability

Conversation

@PeterDaveHello
Copy link
Contributor

Summary

  • Replace fixed 2-second setTimeout with proper Promise-based request/response pattern for task history requests
  • This ensures the CLI waits for an actual response rather than hoping the arbitrary delay is enough
  • Add 5-second timeout with clear error message for timeout cases

Changes

  • Use addPendingRequestAtom/removePendingRequestAtom for request tracking
  • Improve error handling to distinguish timeout from other errors
  • Add comprehensive tests for task history pending request atoms

Test plan

  • Added unit tests for task history pending request atoms
  • Tests pass locally (pnpm test src/state/atoms/__tests__/taskHistory.test.ts)

…onse handling

Replace fixed 2-second setTimeout with proper Promise-based request/response
pattern for task history requests. This ensures the CLI waits for an actual
response rather than hoping the arbitrary delay is enough.

Changes:
- Use addPendingRequestAtom/removePendingRequestAtom for request tracking
- Add 5-second timeout with clear error message
- Improve error handling to distinguish timeout from other errors
- Add comprehensive tests for task history pending request atoms
@changeset-bot
Copy link

changeset-bot bot commented Jan 17, 2026

🦋 Changeset detected

Latest commit: e32611c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kilocode/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@marius-kilocode
Copy link
Collaborator

@PeterDaveHello thanks!

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.

2 participants