Skip to content

Add paper creation output tab and improve file writing#3

Merged
xprilion merged 1 commit into
mainfrom
dev
Apr 26, 2026
Merged

Add paper creation output tab and improve file writing#3
xprilion merged 1 commit into
mainfrom
dev

Conversation

@xprilion
Copy link
Copy Markdown
Owner

@xprilion xprilion commented Apr 26, 2026

This pull request introduces several major improvements to OpenMLR, notably a simplified and stricter mode system (now just "plan" and "execute" modes), robust interrupt handling for background jobs, and enhanced resource management for plans and papers. The changes streamline the agent's workflow, improve reliability for task interruption, and ensure that plans and papers are consistently saved and accessible.

Mode System Simplification and Enforcement

  • Reworked the system prompt (system_prompt.yaml) to only support "plan" and "execute" modes, removing the previous "research" and "write" modes for clarity and stricter separation of planning vs. execution. Each mode has clear tool access rules and workflow instructions.
  • Updated the agent loop to set and reinforce the new mode system, with concise per-message hints and strict enforcement of tool availability per mode.

Interrupt Handling for Background Jobs

  • Added Redis-based interrupt signaling and polling, allowing both in-process and Celery background workers to be reliably interrupted from the API. This includes new functions to publish, check, and clear interrupts, and polling logic in agent tasks to cancel sessions when an interrupt is detected. [1] [2] [3] [4]

Plan and Paper Resource Management

  • Implemented new database operations to upsert (create or update) pinned PLAN.md and paper draft resources for each conversation, ensuring the latest plan and paper are always available and auto-saved.
  • Enhanced the plan_tool to automatically generate and save a PLAN.md markdown document whenever the plan is created or updated, and emit resource updates to the frontend. [1] [2] [3]

Tool Argument Robustness

  • Improved the file writing tool to be more robust to abbreviated or alternative argument names (e.g., 'p' for 'path'), reducing errors from model-generated tool calls.

Other Cleanups

  • Removed outdated knowledge disclaimer from the system prompt, as model behavior is now strictly controlled by mode and tool access.

These changes make the agent's workflow more predictable, improve user control and visibility, and ensure better reliability in both interactive and background processing scenarios.

@github-actions
Copy link
Copy Markdown

Qodana for Python

105 new problems were found

Inspection name Severity Problems
Unused imports 🔶 Warning 21
Unused local symbols ◽️ Notice 43
Unclear exception clauses ◽️ Notice 21
Shadowing names from outer scopes ◽️ Notice 8
Accessing a protected member of a class or a module ◽️ Notice 6
Method is not declared static ◽️ Notice 3
PEP 8 naming convention violation ◽️ Notice 3

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@xprilion xprilion merged commit 590306e into main Apr 26, 2026
5 checks passed
@xprilion xprilion deleted the dev branch April 26, 2026 09: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