Skip to content

itdove/devaiflow#343: daf sync fails with 'Session already exists' when non-development session exists for same issue#356

Merged
itdove merged 1 commit intomainfrom
343
Mar 31, 2026
Merged

itdove/devaiflow#343: daf sync fails with 'Session already exists' when non-development session exists for same issue#356
itdove merged 1 commit intomainfrom
343

Conversation

@itdove
Copy link
Copy Markdown
Owner

@itdove itdove commented Mar 31, 2026

Jira Issue: #343

Description

Fixes an issue where daf sync fails with "Session already exists" error when a non-development session (specifically a ticket_creation session) exists for the same issue.

The fix automatically converts ticket_creation sessions to development sessions during the sync operation, allowing users to seamlessly transition from ticket creation workflows to development workflows without manual session cleanup.

Technical changes:

  • Modified sync_command.py to detect existing ticket_creation sessions and auto-convert them to development type
  • Updated command documentation in docs/reference/commands.md to reflect the new behavior
  • Added test coverage in tests/test_sync_command.py for the auto-conversion scenario
  • Updated AGENTS.md with relevant workflow information

Assisted-by: Claude

Testing

Steps to test

  1. Pull down the PR
  2. Create a ticket_creation session: daf start --session-type ticket_creation --issue PROJ-123
  3. Attempt to sync the same issue: daf sync PROJ-123
  4. Verify that the sync succeeds and the session is converted to development type
  5. Check daf status to confirm the session type is now development
  6. Verify that subsequent syncs work without errors

Scenarios tested

  • Syncing an issue with an existing ticket_creation session successfully converts to development
  • Syncing an issue with an existing development session continues to work as expected
  • Syncing a new issue (no existing session) creates a new development session
  • Session metadata and state are preserved during the conversion

Deployment considerations

  • This code change is ready for deployment on its own
  • This code change requires the following considerations before being deployed:

- Add session type detection before creating new development sessions
- Convert ticket_creation sessions to development when names match during sync
- Skip investigation sessions with clear warning message
- Update session metadata and tracking when converting sessions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@itdove itdove marked this pull request as ready for review March 31, 2026 18:26
@itdove itdove merged commit 29ac3f2 into main Mar 31, 2026
7 checks passed
@itdove itdove deleted the 343 branch March 31, 2026 19:18
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