microsoft / microsoft/amplifier

[app-cli] Emit a lifecycle event on user interrupt (Ctrl+C currently writes nothing to events.jsonl)

Open
#318 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.1k
Forks
261
Avg merge
3h 28m
Merged PRs (30d)
13

Description

Observed on amplifier 2026.07.06-7ec5dcd (scripted PTY, twice — once during a long bash tool call, once during a long streaming response): sending \x03 mid-turn wrote zero records to events.jsonl — no cancel:*, no prompt:complete. (In our scripted-PTY environment the turn also ran to completion, so this may interact with prompt_toolkit key handling; the on-disk silence is the part this issue is about.)

Problem. External consumers of the event log cannot distinguish "turn interrupted by the user" from "turn still running". For tooling that shows busy/idle state per session, an interrupted turn leaves a stale busy indicator until the next turn completes.

Ask. Emit a lifecycle record when a turn is interrupted/cancelled — either a cancel:* event or a prompt:complete with a status: cancelled field — so the turn's open/closed state is always recoverable from the log.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the app-cli handling for Ctrl+C or turn cancellation and the code that writes lifecycle records to events.jsonl. Reproduce an interrupt during a long bash call or streaming response, then ensure the log contains a cancellation or cancelled completion record so the turn's open/closed state is recoverable.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.