You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenCode sessions can fail to reopen when session lookup exceeds its 2-second budget #699
What happened: A user reports that reopening an existing OpenCode session associated with a managed worktree can stop at Checking for existing OpenCode session... with:
Cannot safely resume OpenCode: OpenCode session query timed out within its time budget. No replacement conversation was launched.
The report followed closing the linked ticket. The failure is consistent with the project-scoped opencode session list --format json query exceeding DAF's current 2-second OpenCode query budget. The budget includes version detection and session listing. The fail-closed behavior correctly avoids replacing the native session ID or launching a different conversation.
Ticket closure or the worktree may be relevant context, but the error alone does not prove either caused the timeout: the session identity check happens before the issue-status transition.
Expected behavior: A valid existing OpenCode session should be resumable when session listing is merely slow, while keeping the query bounded and preserving fail-closed identity checks when ownership cannot be verified.
Steps to reproduce:
Configure OpenCode and create a development session using a managed worktree.
Close the linked ticket.
Later run daf open <session-name>.
If the project-scoped OpenCode session listing takes longer than the current 2-second budget, observe that DAF refuses to resume the session.
Environment: DAF, OpenCode, and OS versions were not included in the report.
Acceptance Criteria
Slow but successful OpenCode session lookups can complete within a bounded, appropriate budget (for example, through a retry or configurable timeout).
A failed, timed-out, or ambiguous lookup never overwrites a saved native session ID or launches a replacement conversation.
Timeout guidance provides a clear recovery path for resuming the verified session in its recorded project/worktree.
Regression tests cover a slow existing-session lookup and verify that final failure preserves session identity and metadata.
Implemented issue #699. OpenCode fallback capture and saved-ID reopen verification now use a bounded 10-second query budget. Timeout or failed/ambiguous checks preserve the saved identity and metadata and refuse replacement launches; recovery guidance identifies the recorded project/worktree and verified-ID update/reopen steps. Regression coverage includes a >2-second successful reopen and timeout metadata preservation. Validation: 121 focused tests passed, mypy passed, and the isolated integration suite passed 19/19.
Activity
itdove commentedon Nov 22, 2026
Implemented issue #699. OpenCode fallback capture and saved-ID reopen verification now use a bounded 10-second query budget. Timeout or failed/ambiguous checks preserve the saved identity and metadata and refuse replacement launches; recovery guidance identifies the recorded project/worktree and verified-ID update/reopen steps. Regression coverage includes a >2-second successful reopen and timeout metadata preservation. Validation: 121 focused tests passed, mypy passed, and the isolated integration suite passed 19/19.
itdove commentedon Nov 22, 2026
Pull request created: #700
itdove commentedon Nov 22, 2026
✅ Session Complete
Project: devaiflow
Goal: #699: OpenCode sessions can fail to reopen when session lookup exceeds its 2-second budget
Time Spent:
1h 25m total
Branch: 699
No significant activity detected in this session.
Session Notes:
Session Notes: itdove-devaiflow-699
JIRA: #699
2026-11-22 11:00
Generated by DevAIFlow
itdove commentedon Nov 24, 2026
✅ Session Complete
Project: devaiflow
Goal: #699: OpenCode sessions can fail to reopen when session lookup exceeds its 2-second budget
Time Spent:
1h 32m total
Branch: 699
No significant activity detected in this session.
Session Notes:
Session Notes: itdove-devaiflow-699
JIRA: #699
2026-11-22 11:00
2026-11-23 19:33
Generated by DevAIFlow