What feature would you like to see?
HAPI currently integrates Cursor Agent CLI remote mode through agent -p --output-format stream-json --trust. This works for basic streaming/tool activity, but it misses richer client-side interaction support.
Cursor CLI now supports ACP via agent acp, and HAPI should migrate the Cursor integration to ACP mode for a more complete remote-control experience.
Expected Cursor ACP support in HAPI:
- Use
agent acp instead of agent -p --output-format stream-json --trust for remote Cursor sessions.
- Handle ACP
session/request_permission so HAPI web/mobile can show approve/deny UI.
- approve once
- approve for session / allow always
- reject once
- cancel/abort
- Preserve Cursor session resume/load behavior through ACP if supported.
- Render ACP
session/update events:
- assistant/user message chunks
- tool calls / tool call updates
- plan updates
- mode changes
- available commands
- Support Cursor ACP extension methods:
cursor/ask_question
cursor/create_plan
cursor/update_todos
cursor/task
cursor/generate_image
- Support Cursor modes via ACP:
- Support Cursor model selection through ACP where possible:
session/set_model
- session
configOptions
- Keep MCP server wiring compatible with HAPI’s existing happy MCP bridge.
- Prefer reusing HAPI’s existing ACP infrastructure:
AcpSdkBackend
PermissionAdapter
- existing web permission cards
- existing ACP message conversion path used by Gemini/OpenCode/Kimi
This would make Cursor behave more like the other ACP-backed agents in HAPI and avoid the limitations of current headless agent -p mode.
Additional information
Related Cursor issues already filed in HAPI:
Those issues are narrower bugs. This issue proposes the broader integration migration: move Cursor remote mode to ACP so permission approval, plan approval, questions, todos, model/mode changes, and richer tool updates can be handled through one protocol.
Current limitation in docs/guide/cursor.md says remote Cursor mode uses agent -p and --trust, so tools run without per-request approval. ACP should let HAPI remove that limitation.
What feature would you like to see?
HAPI currently integrates Cursor Agent CLI remote mode through
agent -p --output-format stream-json --trust. This works for basic streaming/tool activity, but it misses richer client-side interaction support.Cursor CLI now supports ACP via
agent acp, and HAPI should migrate the Cursor integration to ACP mode for a more complete remote-control experience.Expected Cursor ACP support in HAPI:
agent acpinstead ofagent -p --output-format stream-json --trustfor remote Cursor sessions.session/request_permissionso HAPI web/mobile can show approve/deny UI.session/updateevents:cursor/ask_questioncursor/create_plancursor/update_todoscursor/taskcursor/generate_imagesession/set_modelconfigOptionsAcpSdkBackendPermissionAdapterThis would make Cursor behave more like the other ACP-backed agents in HAPI and avoid the limitations of current headless
agent -pmode.Additional information
Related Cursor issues already filed in HAPI:
planmessage type unhandled) #687 — Cursor plan mode: plan items not rendered in web UIThose issues are narrower bugs. This issue proposes the broader integration migration: move Cursor remote mode to ACP so permission approval, plan approval, questions, todos, model/mode changes, and richer tool updates can be handled through one protocol.
Current limitation in
docs/guide/cursor.mdsays remote Cursor mode usesagent -pand--trust, so tools run without per-request approval. ACP should let HAPI remove that limitation.