Skip to content

Conversation

@codegen-sh
Copy link
Contributor

@codegen-sh codegen-sh bot commented Jul 16, 2025

This PR adds comprehensive documentation for Codegen's real-time interrupt system that allows users to send follow-up messages while the agent is actively working.

What's Added

New Documentation Page: /docs/capabilities/interrupts.mdx

Key sections covered:

  • Overview: How interrupts enable real-time, conversational interactions
  • Technical Implementation: Detailed explanation of the interrupt flow using BaseRunner, TaskTimeline, and LangGraph
  • Supported Channels: Specific guidance for Slack and Linear interrupts
  • Message Format: Technical details of interrupt message structure
  • Best Practices: User guidance and common use cases
  • Examples: Real-world Slack and Linear interrupt scenarios
  • Troubleshooting: Common issues and solutions

Updated Navigation

  • Added capabilities/interrupts to the docs.json navigation structure

Technical Background

Based on analysis of the cloud repo implementation:

  1. BaseRunner (app/agent_runners/base_runner.py): Handles interrupt detection and routing
  2. TaskTimeline (app/agents/agent_run/task_timeline.py): Stores interrupt messages in the interrupt_messages queue
  3. LangGraph (app/agents/langgraph_utils/graph.py): Processes interrupts as [INTERRUPT] prefixed messages
  4. Memory Store (app/agents/langgraph_utils/memory_store.py): Manages interrupt message processing and indexing

User Impact

This documentation will help users understand:

  • How to effectively use interrupts to provide real-time feedback
  • Why their follow-up messages are immediately acknowledged
  • Best practices for interrupt timing and content
  • Troubleshooting when interrupts don't work as expected

The documentation is positioned in the "Capabilities" section alongside existing wake-up and general capabilities docs.


💻 View my work • 👤 Initiated by Jay Hack • 💬 Initiated in #ext-notion-codegenAbout Codegen

- Document how real-time interrupts work during agent execution
- Explain technical implementation with BaseRunner and TaskTimeline
- Include examples for both Slack and Linear workflows
- Add best practices and troubleshooting guidance
- Update docs.json navigation to include new interrupts page
@codecov
Copy link

codecov bot commented Jul 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Interrupt messages are structured as:

```json
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the technical implementation since htese are user-facing docs!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it! I'll remove the technical implementation section since these are user-facing docs and update the Linear section with the mention requirements. Making those changes now! 📝

💻 View my work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Updated the documentation with your feedback!

Changes made:

  • Added clear warning that @codegen mentions are required in Slack channels (but not in DMs)
  • Added note that Linear responds automatically unless other users are tagged
  • Removed technical implementation section to keep it user-focused
  • Updated best practices and troubleshooting to emphasize mention requirements

The docs now clearly explain when mentions are needed vs. when Codegen responds automatically. Much more user-friendly! 🎯

💻 View my work

- Add clear warning that @codegen mentions are required in Slack channels (not DMs)
- Add note that Linear responds automatically unless other users are tagged
- Remove technical implementation section for user-facing docs
- Update best practices and troubleshooting with mention requirements
@jayhack jayhack merged commit 3c14f40 into develop Jul 16, 2025
18 checks passed
@jayhack jayhack deleted the codegen-bot/add-interrupts-documentation-1752686334 branch July 16, 2025 17:25
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