aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

feat(cli): bgagent ask Phase 2 (POST /tasks/{id}/asks)

Open
#446 1 comment 0 reactions 0 assignees View on GitHub
agent-runtime cli enhancement orchestration
Dominant language
TypeScript
Stars
143
Forks
46
Avg merge
3d 9h
Merged PRs (30d)
20

Description

**Context:** ROADMAP.md → `bgagent ask` (Phase 2)

---

## Component

Scripts / CLI

## Describe the feature

Mid-run **questions to the agent**: `POST /tasks/{id}/asks`; answers durable as `status_response` events. CLI `bgagent ask ""` with foreground block-and-poll. Enables interactive summaries without burning a separate status API.

## Use case

Operators need "why did you change X?" mid-flight without `nudge`ing implementation guidance. Answers must survive CLI disconnect.

## Proposed solution

1. REST: create ask, poll events by `correlation_id=ask_id`.
2. Agent between-turns hook injects ask as user turn; emits `status_response`.
3. CLI spinner + adaptive poll; `bgagent asks show ` for reconnect.
4. Sync `cli/src/types.ts` with `cdk/.../types.ts`.
5. Fanout Slack renderer for `status_response` (Phase 2).

## Other information

- Full spec: `docs/design/INTERACTIVE_AGENTS.md` §5.5, AD-6/AD-7.
- `status_response` already in fanout allowlist (forward-compat).

- [ ] This might be a breaking change

Contributor guide

Open the contributing guide

Research direction

Read docs/design/INTERACTIVE_AGENTS.md §5.5 and AD-6/AD-7 first, then inspect the CLI and CDK type definitions at cli/src/types.ts and cdk/.../types.ts. Trace the REST ask flow, between-turn hook, event polling, reconnect command, and Slack status_response fanout described in the proposal. Done means the Phase 2 behavior and synchronized types cover all listed paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.