Skip to content

feat(examples): add offline interrupt and resume demo - #40

Merged
folathecoder merged 1 commit into
lunarstack-co:mainfrom
Alan-donk:feat/interrupt-resume-example
Nov 6, 2026
Merged

folathecoder merged 1 commit into
lunarstack-co:mainfrom
Alan-donk:feat/interrupt-resume-example

Conversation

@Alan-donk

Copy link
Copy Markdown
Contributor

Summary

  • Add a fully offline example demonstrating how to interrupt a streamed AgentSession after the first ToolResultEvent and resume the same task.
  • Use ScriptedModel to demonstrate two consecutive tool calls followed by a final answer.
  • Add regression tests verifying the interrupted status, successful continuation, and preservation of a single TaskStep.
  • Update the README examples list and Unreleased changelog.

Closes #27.

Testing

  • uv run python -m examples.cli_interrupt_resume — passed.
  • uv run pytest tests/test_examples.py -k interrupt -v — 2 passed.
  • uv run pytest tests/test_examples.py -q — 29 passed.
  • uv run ruff check src tests examples — passed.
  • uv run ruff format --check src tests examples — passed.
  • uv run mypy src tests examples — passed.
  • uv run mypy --strict src — passed.
  • uv build — passed.

Linux CI: All required checks passed on Python 3.11, 3.12, and 3.13.

CI verification: https://github.com/Alan-donk/agentling/actions/runs/42258732068

Windows note: The local full test suite has one pre-existing timing-sensitive failure in test_parallel_timeout_keeps_other_results, involving a 10 ms tool timeout. This failure was reproducible before this change. The complete Linux CI matrix passes without modifying or skipping the test.

No core Agentling implementation or dependency changes were made.

@folathecoder
folathecoder self-requested a review November 6, 2026 21:35

@folathecoder folathecoder left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Thanks for contributing.
You can optionally star the project to give it more visibility, thanks @Alan-donk

@folathecoder
folathecoder merged commit 6673e58 into lunarstack-co:main Nov 6, 2026
3 checks passed
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.

Add an example: interrupt a run and resume it

2 participants