Repository navigation
Description
I'm an AI agent helping Engel Nyst (@enyst) with project work.
Is there an existing issue for the same bug?
- I have searched existing issues and this is not a duplicate.
Bug Description
Since #6556 the agent server sends acp_effort on every ACP agent profile (GET /api/agent-profiles/{name} for a kind: acp profile returns "acp_effort": null or a level), but the TypeScript client's exported ACPAgentProfile type (clients/typescript/src/models/agent-profile.ts) does not declare it. A TypeScript consumer (Agent Canvas's profile editor) cannot read or write the profile's effort under the exported type. #6556 updated the other hand-written client types (ACP_SETTINGS_KEYS, ConversationInfo.current_effort / available_efforts, switchAcpEffort) but not this one.
The generated transport contract (src/generated/agent-server-schema.ts, AcpAgentProfile) also lacks the field, which is expected until the next release's version-bump PR regenerates it from the pinned image (config.agentServerImage is 1.61.0, released before #6556).
Expected Behavior
ACPAgentProfile declares acp_effort?: string | null, so every field the server sends on an ACP profile is typed.
Actual Behavior
Type-checking the keys of a real server response against the exported type fails: error TS2353: ... '"acp_effort"' does not exist in type 'Shape<ACPAgentProfile>' (f21-exported-tsc.txt);`` the response: acp-profile-response.json.```` The same check against the generated contract fails the same way (f21-contract-tsc.txt).````` Reproduced twice (once independently).
Steps to Reproduce
Checkout 5ff99f1b6ca28f7d16870b69f57a31351e59bcd0, uv sync --dev, then:
export PATH=$PWD/.agents/skills/verify-agent-server/scripts:$PATH
control-agent-server map run --file F21 --only F21.ts-payload-types --freshThe recipe (F21.ts-payload-types in .agents/skills/verify-agent-server/references/feature-map/F21-agent-profiles.md) saves an ACP profile, reads it back, and type-checks its keys with the client's own tsc against the generated contract and then the exported types. Introduced by #6556 (450a8af).
Acceptance Criteria
-
ACPAgentProfileinclients/typescript/src/models/agent-profile.tsdeclaresacp_effort(optional,string | null), and it is accepted where profiles are created or updated. - The client's unit tests pass;
agent-server-contract-types.test.tsstays green now and after the next release regenerates the contract. - Once the generated contract includes the field,
control-agent-server map run --file F21 --only F21.ts-payload-types --freshpasses.
Installation Method
uv sync in a checkout of main
SDK Version
TypeScript client in main 5ff99f1 (server 1.61.0+)
Version Confirmation
- I have confirmed this bug exists on the LATEST version of OpenHands SDK
Python Version
3.13
Model Name (if applicable)
N/A
Operating System
Linux
Generated by Claude Code
OpenHands AI triage
The following comments and acceptance criteria were added by the OpenHands AI agent.
Triage
Verified on main (5ff99f1..06b3587): the Python ACPAgentProfile (openhands-sdk/openhands/sdk/profiles/agent_profile.py) sends acp_effort (defaulting to null), but the exported ACPAgentProfile in clients/typescript/src/models/agent-profile.ts does not declare it, while #6556 updated the sibling client surfaces (ACP_SETTINGS_KEYS, ConversationInfo.current_effort/available_efforts, switchAcpEffort, and the derive-switch-plan.ts live-field list, which already keys on acp_effort via an unchecked cast). The generated contract lacks the field only because the pinned image (1.61.0) predates #6556. Note that agent-server-contract-types.test.ts pins exact key parity (Equal<keyof ACPAgentProfile, keyof GeneratedACPAgentProfile>), so per the repository's contract-generation mechanism the handwritten field must land together with the regenerated 1.62.0 contract, not as a standalone edit against the 1.61.0 schema.
Implementer note: this exact change already exists on origin/rel-1.62.0 (commit f63b842, "fix(typescript): propagate ACP profile reasoning effort") and is included in open Release PR #6731, which also regenerates the contract from the 1.62.0 image. If #6731 merges first, verify the criteria below against that state and close this issue; do not duplicate the edit on main.
Non-goals: no Python SDK or Agent Server changes; no Agent Canvas UI changes (owned by OpenHands/OpenHands); no hand-editing of src/generated/agent-server-schema.ts (regenerated from the pinned image per AGENTS.md); no new effort-value validation or endpoints; no behavior change for agent_kind: 'openhands' profiles.
Acceptance Criteria
-
ACPAgentProfileinclients/typescript/src/models/agent-profile.tsdeclaresacp_effort?: string | null, and an ACP profile payload returned byGET /api/agent-profiles/{name}(carrying"acp_effort": nullor a level) type-checks against the exported type without theTS2353error (the F21exported.tscheck compiles). -
AgentProfileSaveInputacceptsacp_effortforagent_kind: 'acp', sosaveAgentProfileandmaterializeAgentProfiledrafts type-check both with the field set to a level and cleared tonull. -
npm testinclients/typescriptpasses, including theagent-server-contract-types.test.tskey-parity pin forACPAgentProfileagainst the generated contract, which holds once the regenerated 1.62.0 contract (AcpAgentProfilewithacp_effort?: string | null) is in place alongside the field. - After the contract regeneration,
control-agent-server map run --file F21 --only F21.ts-payload-types --freshpasses, with both the generated-contract and exported-type checks compiling against live server payloads.
Activity
docs(verify-agent-server): F01-F11 and F20-F24 replayed on 9bf835c