Skip to content

branch create rejects a title field that the exec tool requires #2000

Closed

Description

@yyhhyyyyyy

While smoke-testing the branch scenarios, 35 of 40 sessions called branch create, and every one of those 35 put a title field on its first create call; 44 branch create calls in total were rejected for it. The other five sessions never called branch. title was the only unknown field in every one of those calls. The runs are the scenario evaluation added in #1999.

Scenario Runs Runs that called branch create Rejected create calls
root-opens-after-switch 10 10 10
switch-continue-directly 10 10 10
switch-then-open-lines 10 10 14
identity-after-compaction 10 5 10
Total 40 35 44

Every title rejection returned isError: true with this text:

Invalid branch arguments: unknown field `title`, expected one of `action`, `prompt`, `at`, `idleNotice`, `to`, `content`, `mode`, `branch`, `after`, `limit`

In the 30 switch-scenario runs, every affected run dropped title and retried, and each one opened the lines it asked for. One run retried the same prompt once with title before dropping it, and one run sent two prompts in one batch, both with title, then both without.

In identity-after-compaction, five of the ten runs sent a batch of two creates with title. Four of them retried both creates without title and opened two lines. In the fifth run (current run 0), the batch's two creates were both rejected, the run did not retry them, and it made both changes on the main line without opening a line.

The tool's input type is BranchInput in timeline_tree.rs, which derives Deserialize with #[serde(deny_unknown_fields)]. The rejection text is invalid()'s Invalid branch arguments: {reason} in the same file.

The tool description in that file lists only the create, message, read and end actions and never mentions title. The JSON schema next to it sets additionalProperties: false and lists action, prompt, at, idleNotice, to, content, mode, branch, after and limit.

Other tools in these sessions declare title as required. The exec tool, which these sessions use, has "required": ["command", "title"] in exec.rs. The collaboration tool's request action also lists title among its required fields in collaboration.rs.

The effect is one extra rejected request each time a model puts title on branch create: 44 rejected branch create calls across the 40 sessions, and in one of the five affected compact-scenario runs no line was opened afterward. Two further calls, both branch read with a branchId field, were rejected for the same reason, which brings the number of calls rejected for an unknown field to 46.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions