Inspiration
Aegisub remains one of the most powerful tools for creating and typesetting advanced subtitles, but its workflow is still fundamentally designed for one person editing one local file at a time.
Subtitle teams usually work around this limitation by splitting an episode into separate sections, assigning each section to a different member, and manually merging the resulting files afterward. This creates several recurring problems: there is no single source of truth, transitions between sections require extra cleanup, styles can become inconsistent, proofreading feedback is scattered across chat messages and timestamps, and project leads cannot easily see the overall progress.
This is especially painful for time-sensitive releases, where timers, translators, proofreaders, and typesetters need to work in parallel.
We created Aegisub Together to answer a simple question:
What would Aegisub look like if an entire subtitle team could work inside the same subtitle file at the same time?
We also wanted to explore how far OpenAI Codex could go beyond generating a small demo: could an AI coding agent help understand a mature C++ application, design a reliable collaboration protocol, implement both client and server components, and build the tests and deployment tooling needed to make the result usable?
What it does
Aegisub Together adds native real-time collaboration to the existing Aegisub desktop experience.
Team members can create or join a self-hosted collaboration room and edit the same .ass subtitle document simultaneously. Changes to dialogue lines, styles, script information, and collaboration metadata are synchronized through a central server.
The application provides:
- Real-time subtitle synchronization
- Stable identities for subtitle lines, even when lines are inserted, moved, copied, split, deleted, or restored
- Atomic line-level locking to prevent two people from accidentally editing the same lines
- Live member presence and visual indicators showing who is working on each line
- Comments and suggested subtitle revisions for proofreading
- Collaborative undo and redo that only reverses the current member’s confirmed changes
- A maintenance mode that temporarily gives one member exclusive write access for whole-file scripts and batch operations
- Offline editing with conflict detection and reconciliation after reconnecting
- Recovery copies when a batch cannot be safely applied
- Password-protected, persistent collaboration rooms
- Self-hosted deployment through Docker Compose or systemd
When collaboration is not enabled, Aegisub Together continues to behave like the original standalone Aegisub application. Users do not need to abandon their existing workflow, automation scripts, macros, or local media setup.
Only the core subtitle document is synchronized. Videos, fonts, images, and other large project assets remain on each member’s computer, keeping the server lightweight and allowing teams to continue using their existing asset-distribution workflow.
How we built it
Aegisub Together is built as a fork of the actively developed arch1t3cht Aegisub branch.
The desktop client remains primarily a native C++ application. We integrated collaboration into Aegisub’s existing document and commit architecture rather than replacing the editor with a web application. The Windows client communicates with the collaboration server through WinHTTP WebSocket connections.
The collaboration server is written in Go and uses SQLite in WAL mode for persistence. Each room has an authoritative subtitle state, an operation log, periodic snapshots, deleted-line tombstones, comments, member presence, lock ownership, and audit records. A dedicated goroutine serializes operations for each room, giving the server a clear and deterministic ordering authority.
The synchronization protocol is based on atomic operation batches. Instead of repeatedly transmitting the complete subtitle file, clients send operations such as:
- Insert a line
- Modify a line
- Delete or restore a line
- Move a line
- Replace the Styles section
- Replace Script Info
Each subtitle line receives a stable collaboration ID stored in Aegisub’s extradata. Line order is represented separately through server-assigned position keys, so inserting or moving one line does not require renumbering the entire document.
On the client, we maintain a confirmed server state, a queue of pending local batches, and a projected state containing both. This allows local edits to remain responsive without incorrectly treating unconfirmed changes as authoritative.
We deliberately chose server sequencing and line-level locking instead of introducing a CRDT or operational-transformation framework. Subtitle teams usually work on different lines, so line-level concurrency provides a simpler and more predictable user experience while still supporting the project’s primary workflow.
OpenAI Codex served as an engineering partner throughout the project. It helped us inspect the legacy codebase, translate workflow requirements into a protocol specification, implement interconnected C++ and Go components, generate tests, investigate race conditions and state-management failures, and repeatedly review the design for cases that were easy to overlook.
The project also includes protocol fixtures, automated Go tests, race-detector testing, C++ collaboration tests, WinHTTP integration smoke tests, release packaging, Docker images, checksums, software bills of materials, and GitHub Actions release pipelines.
Challenges we ran into
The largest challenge was adding distributed state to an application that was never designed for collaboration.
Aegisub represents many edits as changes to a complete subtitle document. Features such as undo, macros, line duplication, splitting, merging, and template generation can affect many lines at once. We needed to detect the semantic difference between inserted, modified, moved, deleted, and restored lines without breaking existing Aegisub functionality or requiring every automation script to be rewritten.
Line identity was another difficult problem. Array indexes cannot be used because they change whenever someone inserts or moves a line. Copying, splitting, undoing a deletion, or pasting content from another project can also duplicate or resurrect identifiers. We built an ID-reconciliation pass on the client and added server-side validation as a second layer of protection.
Collaborative undo required a complete redesign. Aegisub’s original undo system stores whole-document states, which could cause one person’s undo action to overwrite another member’s work. In collaboration mode, we instead track inverse operations for each member’s confirmed batches and validate them against current locks and versions.
We also had to support large automation scripts. A typesetting or karaoke script may modify almost every line in a file, making normal line-level locking impractical. Maintenance mode solves this by temporarily freezing other writers while preserving visibility and automatically recovering from disconnects or timeouts.
Finally, AI-assisted development still required careful human direction. Codex could generate and modify large amounts of code, but reliable results depended on precise specifications, explicit invariants, adversarial test cases, small reviewable commits, and repeated verification across the protocol, server, client, persistence layer, and user interface.
Accomplishments that we're proud of
We are proud that Aegisub Together feels like an extension of Aegisub rather than a replacement for it.
Users retain the native subtitle grid, timing tools, visual typesetting features, automation scripts, local video playback, and established keyboard-driven workflow. Collaboration appears only when it is needed, and disconnecting from the server returns the application to normal standalone behavior.
We are also proud that the project goes beyond a basic WebSocket synchronization demo. It addresses difficult collaboration cases such as atomic multi-line edits, stable line identity, rejected batches, reconnect recovery, deleted-line restoration, comments, presence, safe undo, whole-document scripts, persistent rooms, authentication, rate limiting, backups, and secure self-hosted deployment.
Most importantly, the project demonstrates that an AI coding agent can help modernize a large legacy desktop application—not only by writing isolated functions, but by contributing to architecture, protocol design, implementation, testing, documentation, packaging, and deployment.
What we learned
We learned that real-time collaboration is primarily a state-consistency problem, not a networking problem. Opening a WebSocket connection is easy; defining exactly what happens during concurrent edits, reconnects, rejected changes, undo operations, batch scripts, and partial failures is much harder.
We also learned that the most sophisticated distributed algorithm is not always the best product decision. Because subtitle collaborators generally work on different lines, server sequencing and fast line-level locks provide understandable behavior without the complexity of character-level collaborative editing.
Another important lesson was that compatibility is a feature. By synchronizing changes at Aegisub’s document-commit boundary, existing macros and automation scripts can participate in collaboration without requiring individual integrations.
From working with Codex, we learned that AI-generated software becomes significantly more reliable when the agent is given durable engineering artifacts: a protocol specification, explicit invariants, test fixtures, acceptance criteria, narrow commit boundaries, and automated verification. The quality of the architecture and tests determines the quality of AI-assisted implementation.
What's next for Aegisub Together
Our next priority is broader real-world testing with subtitle teams. We want to collect feedback on locking behavior, room management, large scripts, unreliable networks, long editing sessions, and the workflows used by translators, timers, proofreaders, and typesetters.
We also plan to improve:
- Conflict-resolution and recovery interfaces
- Comment and review workflows
- Room administration and audit tools
- Performance for very large subtitle documents
- Deployment, monitoring, backup, and upgrade tooling
- Linux and macOS client support
- Compatibility with future upstream Aegisub changes
- Documentation and onboarding for non-technical teams
In the longer term, we want to explore optional OpenAI-powered assistance inside the collaborative workflow. Potential features include terminology consistency checks, translation review, missing-text detection, style and formatting validation, contextual proofreading, and automatic summaries of unresolved comments.
Our goal is not to replace subtitle creators. It is to give them a shared workspace where people—and eventually AI assistants—can collaborate without sacrificing the precision and control that made Aegisub essential in the first place.
Log in or sign up for Devpost to join the conversation.